getStructuringElementAsync function

Future<Mat> getStructuringElementAsync(
  1. int shape,
  2. (int, int) ksize, {
  3. Point? anchor,
})

GetStructuringElement returns a structuring element of the specified size and shape for morphological operations.

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

Implementation

Future<Mat> getStructuringElementAsync(int shape, (int, int) ksize, {Point? anchor}) async {
  anchor ??= Point(-1, -1);
  final mat = Mat.empty();
  return cvRunAsync0(
    (callback) => cimgproc.cv_getStructuringElement(shape, ksize.cvd.ref, mat.ptr, callback),
    (c) {
      return c.complete(mat);
    },
  );
}