| MatConnectedComponentsWithStats Method (OutputArray, OutputArray, OutputArray, PixelConnectivity) | 
        
         
            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 ConnectedComponentsWithStats(
	OutputArray labels,
	OutputArray stats,
	OutputArray centroids,
	PixelConnectivity connectivity = PixelConnectivity.Connectivity8
)
Public Function ConnectedComponentsWithStats ( 
	labels As OutputArray,
	stats As OutputArray,
	centroids As OutputArray,
	Optional connectivity As PixelConnectivity = PixelConnectivity.Connectivity8
) As Integer
public:
int ConnectedComponentsWithStats(
	OutputArray^ labels, 
	OutputArray^ stats, 
	OutputArray^ centroids, 
	PixelConnectivity connectivity = PixelConnectivity::Connectivity8
)
member ConnectedComponentsWithStats : 
        labels : OutputArray * 
        stats : OutputArray * 
        centroids : OutputArray * 
        ?connectivity : PixelConnectivity 
(* Defaults:
        let _connectivity = defaultArg connectivity PixelConnectivity.Connectivity8
*)
-> int 
function ConnectedComponentsWithStats(labels, stats, centroids, connectivity);
Parameters
- labels
- Type: OpenCvSharpOutputArray
 destination labeled image
- stats
- Type: OpenCvSharpOutputArray
 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
- centroids
- Type: OpenCvSharpOutputArray
 floating point centroid (x,y) output for each label, 
            including the background label
- connectivity (Optional)
- Type: OpenCvSharpPixelConnectivity
 8 or 4 for 8-way or 4-way connectivity respectively
Return Value
Type: 
Int32 See Also
See Also