| MatConnectedComponents Method (OutputArray, PixelConnectivity, MatType) | 
        
         
            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: 3.4.1.20180605-33-CaRLSharp
 Syntax
Syntaxpublic int ConnectedComponents(
	OutputArray labels,
	PixelConnectivity connectivity,
	MatType ltype
)
Public Function ConnectedComponents ( 
	labels As OutputArray,
	connectivity As PixelConnectivity,
	ltype As MatType
) As Integer
public:
int ConnectedComponents(
	OutputArray^ labels, 
	PixelConnectivity connectivity, 
	MatType ltype
)
member ConnectedComponents : 
        labels : OutputArray * 
        connectivity : PixelConnectivity * 
        ltype : MatType -> int 
function ConnectedComponents(labels, connectivity, ltype);
Parameters
- labels
- Type: OpenCvSharpOutputArray
 destination labeled image
- connectivity
- Type: OpenCvSharpPixelConnectivity
 8 or 4 for 8-way or 4-way connectivity respectively
- ltype
- Type: OpenCvSharpMatType
 output image label type. Currently CV_32S and CV_16U are supported.
Return Value
Type: 
Int32The number of labels
 See Also
See Also