Click or drag to resize

Cv2ConnectedComponentsEx Method

computes the connected components labeled image of boolean image. image with 4 or 8 way connectivity - returns N, the total number of labels [0, N-1] where 0 represents the background label. ltype 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.

Namespace:  OpenCvSharp
Assembly:  OpenCvSharp (in OpenCvSharp.dll) Version: 1.0.0
Syntax
public static ConnectedComponents ConnectedComponentsEx(
	InputArray image,
	PixelConnectivity connectivity = PixelConnectivity.Connectivity8,
	ConnectedComponentsAlgorithmsTypes ccltype = ConnectedComponentsAlgorithmsTypes.Default
)

Parameters

image
Type: OpenCvSharpInputArray
the image to be labeled
connectivity (Optional)
Type: OpenCvSharpPixelConnectivity
8 or 4 for 8-way or 4-way connectivity respectively
ccltype (Optional)
Type: OpenCvSharpConnectedComponentsAlgorithmsTypes

[Missing <param name="ccltype"/> documentation for "M:OpenCvSharp.Cv2.ConnectedComponentsEx(OpenCvSharp.InputArray,OpenCvSharp.PixelConnectivity,OpenCvSharp.ConnectedComponentsAlgorithmsTypes)"]

Return Value

Type: ConnectedComponents

[Missing <returns> documentation for "M:OpenCvSharp.Cv2.ConnectedComponentsEx(OpenCvSharp.InputArray,OpenCvSharp.PixelConnectivity,OpenCvSharp.ConnectedComponentsAlgorithmsTypes)"]

See Also