watershedAsync function

Future<Mat> watershedAsync(
  1. InputArray image,
  2. InputOutputArray markers
)

Watershed performs a marker-based image segmentation using the watershed algorithm.

For further details, please see: https:///docs.opencv.org/4.x/d3/d47/group__imgproc__segmentation.html#ga3267243e4d3f95165d55a618c65ac6e1

Implementation

Future<Mat> watershedAsync(InputArray image, InputOutputArray markers) async {
  return cvRunAsync0(
    (callback) => cimgproc.cv_watershed(image.ref, markers.ref, callback),
    (c) {
      return c.complete(markers);
    },
  );
}