Click or drag to resize
CvInvokeConnectedComponentsWithStats Method
http://www.emgu.com
Computes the connected components labeled image of boolean image

Namespace: Emgu.CV
Assembly: Emgu.CV.World (in Emgu.CV.World.dll) Version: 3.1.0.2282 (3.1.0.2282)
Syntax
public static int ConnectedComponentsWithStats(
	IInputArray image,
	IOutputArray labels,
	IOutputArray stats,
	IOutputArray centroids,
	LineType connectivity = LineType.EightConnected,
	DepthType labelType = DepthType.Cv32S
)

Parameters

image
Type: Emgu.CVIInputArray
The boolean image
labels
Type: Emgu.CVIOutputArray
The connected components labeled image of boolean image
stats
Type: Emgu.CVIOutputArray
Statistics output for each label, including the background label, see below for available statistics. Statistics are accessed via stats(label, COLUMN) where COLUMN is one of cv::ConnectedComponentsTypes. The data type is CV_32S
centroids
Type: Emgu.CVIOutputArray
Centroid output for each label, including the background label. Centroids are accessed via centroids(label, 0) for x and centroids(label, 1) for y. The data type CV_64F.
connectivity (Optional)
Type: Emgu.CV.CvEnumLineType
4 or 8 way connectivity
labelType (Optional)
Type: Emgu.CV.CvEnumDepthType
Specifies the output label image type, an important consideration based on the total number of labels or alternatively the total number of pixels in the source image

Return Value

Type: Int32
N, the total number of labels [0, N-1] where 0 represents the background label.
See Also