morphologyExAsync function

Future<Mat> morphologyExAsync(
  1. Mat src,
  2. int op,
  3. Mat kernel, {
  4. Mat? dst,
  5. Point? anchor,
  6. int iterations = 1,
  7. int borderType = BORDER_CONSTANT,
  8. Scalar? borderValue,
})

MorphologyEx performs advanced morphological transformations.

For further details, please see: https:///docs.opencv.org/master/d4/d86/group__imgproc__filter.html#ga67493776e3ad1a3df63883829375201f

Implementation

Future<Mat> morphologyExAsync(
  Mat src,
  int op,
  Mat kernel, {
  Mat? dst,
  Point? anchor,
  int iterations = 1,
  int borderType = BORDER_CONSTANT,
  Scalar? borderValue,
}) {
  borderValue = borderValue ?? Scalar();
  dst ??= Mat.empty();
  anchor ??= Point(-1, -1);
  return cvRunAsync0(
    (callback) => cimgproc.cv_morphologyEx_1(
      src.ref,
      dst!.ref,
      op,
      kernel.ref,
      anchor!.ref,
      iterations,
      borderType,
      borderValue!.ref,
      callback,
    ),
    (c) {
      return c.complete(dst);
    },
  );
}