grabCutAsync function
Future<(Mat, Mat, Mat)>
grabCutAsync(
- InputArray img,
- InputOutputArray mask,
- Rect rect,
- InputOutputArray bgdModel,
- InputOutputArray fgdModel,
- int iterCount, {
- int mode = GC_EVAL,
Grabcut runs the GrabCut algorithm. The function implements the GrabCut image segmentation algorithm. For further details, please see: https:///docs.opencv.org/master/d3/d47/group__imgproc__segmentation.html#ga909c1dda50efcbeaa3ce126be862b37f
Implementation
Future<(Mat mask, Mat bgdModel, Mat fgdModel)> grabCutAsync(
InputArray img,
InputOutputArray mask,
Rect rect,
InputOutputArray bgdModel,
InputOutputArray fgdModel,
int iterCount, {
int mode = GC_EVAL,
}) {
return cvRunAsync0(
(callback) => cimgproc.cv_grabCut(
img.ref,
mask.ref,
rect.ref,
bgdModel.ref,
fgdModel.ref,
iterCount,
mode,
callback,
),
(c) {
return c.complete((mask, bgdModel, fgdModel));
},
);
}