distanceTransformAsync function

Future<(Mat, Mat)> distanceTransformAsync(
  1. Mat src,
  2. int distanceType,
  3. int maskSize,
  4. int labelType,
)

DistanceTransform Calculates the distance to the closest zero pixel for each pixel of the source image.

distanceType: DistanceTypes maskSize: DistanceTransformMasks labelType: DistanceTransformLabelTypes

For further details, please see: https:///docs.opencv.org/master/d7/d1b/group__imgproc__misc.html#ga8a0b7fdfcb7a13dde018988ba3a43042

Implementation

Future<(Mat dst, Mat labels)> distanceTransformAsync(
  Mat src,
  int distanceType,
  int maskSize,
  int labelType,
) async =>
    cvRunAsync2(
      (callback) => cimgproc.DistanceTransform_Async(src.ref, distanceType, maskSize, labelType, callback),
      matCompleter2,
    );