Class ConnectedComponents
- Namespace
- OpenCvSharp
- Assembly
- OpenCvSharp.dll
connected components that is returned from Cv2.ConnectedComponentsEx
public class ConnectedComponents
- Inheritance
-
ConnectedComponents
- Inherited Members
Properties
Blobs
All blobs
public IReadOnlyList<ConnectedComponents.Blob> Blobs { get; }
Property Value
LabelCount
The number of labels -1
public int LabelCount { get; }
Property Value
Labels
destination labeled value
public ReadOnlyArray2D<int> Labels { get; }
Property Value
Methods
FilterByBlob(Mat, Mat, Blob)
Filter a image with the specified blob object.
public void FilterByBlob(Mat src, Mat dst, ConnectedComponents.Blob blob)
Parameters
srcMatSource image.
dstMatDestination image.
blobConnectedComponents.BlobBlob value.
FilterByBlobs(Mat, Mat, IEnumerable<Blob>)
Filter a image with the specified blob objects.
public void FilterByBlobs(Mat src, Mat dst, IEnumerable<ConnectedComponents.Blob> blobs)
Parameters
srcMatSource image.
dstMatDestination image.
blobsIEnumerable<ConnectedComponents.Blob>Blob values.
FilterByLabel(Mat, Mat, int)
Filter a image with the specified label value.
public void FilterByLabel(Mat src, Mat dst, int labelValue)
Parameters
FilterByLabels(Mat, Mat, IEnumerable<int>)
Filter a image with the specified label values.
public void FilterByLabels(Mat src, Mat dst, IEnumerable<int> labelValues)
Parameters
srcMatSource image.
dstMatDestination image.
labelValuesIEnumerable<int>Label values.
GetLargestBlob()
Find the largest blob.
public ConnectedComponents.Blob GetLargestBlob()
Returns
- ConnectedComponents.Blob
the largest blob
RenderBlobs(Mat)
Draws all blobs to the specified image.
public void RenderBlobs(Mat img)
Parameters
imgMatThe target image to be drawn.