connectedComponents function
ConnectedComponents computes the connected components labeled image of boolean image.
For further details, please see: https:///docs.opencv.org/master/d3/dc0/group__imgproc__shape.html#gaedef8c7340499ca391d459122e51bef5
Implementation
int connectedComponents(Mat image, Mat labels, int connectivity, int ltype, int ccltype) {
final p = calloc<ffi.Int>();
cvRun(
() => cimgproc.cv_connectedComponents(
image.ref,
labels.ref,
connectivity,
ltype,
ccltype,
p,
ffi.nullptr,
),
);
final rval = p.value;
calloc.free(p);
return rval;
}