Class ConnectedComponents
connected components that is returned from Cv2.ConnectedComponentsEx
Inheritance
System.Object
ConnectedComponents
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: OpenCvSharp
Assembly: OpenCvSharp.dll
Syntax
public class ConnectedComponents
Properties
| Improve this Doc View SourceBlobs
All blobs
Declaration
public IReadOnlyList<ConnectedComponents.Blob> Blobs { get; }
Property Value
Type | Description |
---|---|
IReadOnlyList<ConnectedComponents.Blob> |
LabelCount
The number of labels -1
Declaration
public int LabelCount { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Labels
destination labeled value
Declaration
public ReadOnlyArray2D<int> Labels { get; }
Property Value
Type | Description |
---|---|
ReadOnlyArray2D<System.Int32> |
Methods
| Improve this Doc View SourceFilterByBlob(Mat, Mat, ConnectedComponents.Blob)
Filter a image with the specified blob object.
Declaration
public void FilterByBlob(Mat src, Mat dst, ConnectedComponents.Blob blob)
Parameters
Type | Name | Description |
---|---|---|
Mat | src | Source image. |
Mat | dst | Destination image. |
ConnectedComponents.Blob | blob | Blob value. |
FilterByBlobs(Mat, Mat, IEnumerable<ConnectedComponents.Blob>)
Filter a image with the specified blob objects.
Declaration
public void FilterByBlobs(Mat src, Mat dst, IEnumerable<ConnectedComponents.Blob> blobs)
Parameters
Type | Name | Description |
---|---|---|
Mat | src | Source image. |
Mat | dst | Destination image. |
IEnumerable<ConnectedComponents.Blob> | blobs | Blob values. |
FilterByLabel(Mat, Mat, Int32)
Filter a image with the specified label value.
Declaration
public void FilterByLabel(Mat src, Mat dst, int labelValue)
Parameters
Type | Name | Description |
---|---|---|
Mat | src | Source image. |
Mat | dst | Destination image. |
System.Int32 | labelValue | Label value. |
FilterByLabels(Mat, Mat, IEnumerable<Int32>)
Filter a image with the specified label values.
Declaration
public void FilterByLabels(Mat src, Mat dst, IEnumerable<int> labelValues)
Parameters
Type | Name | Description |
---|---|---|
Mat | src | Source image. |
Mat | dst | Destination image. |
IEnumerable<System.Int32> | labelValues | Label values. |
GetLargestBlob()
Find the largest blob.
Declaration
public ConnectedComponents.Blob GetLargestBlob()
Returns
Type | Description |
---|---|
ConnectedComponents.Blob | the largest blob |
RenderBlobs(Mat)
Draws all blobs to the specified image.
Declaration
public void RenderBlobs(Mat img)
Parameters
Type | Name | Description |
---|---|---|
Mat | img | The target image to be drawn. |