connectedComponentsWithStats function
ConnectedComponentsWithStats computes the connected components labeled image of boolean image and also produces a statistics output for each label.
For further details, please see: https:///docs.opencv.org/master/d3/dc0/group__imgproc__shape.html#ga107a78bf7cd25dec05fb4dfc5c9e765f
Implementation
int connectedComponentsWithStats(
Mat src,
Mat labels,
Mat stats,
Mat centroids,
int connectivity,
int ltype,
int ccltype,
) {
return cvRunArena<int>((arena) {
final p = arena<ffi.Int>();
cvRun(
() => cffi.ConnectedComponentsWithStats(
src.ref,
labels.ref,
stats.ref,
centroids.ref,
connectivity,
ltype,
ccltype,
p,
),
);
return p.value;
});
}