remapAsync function

Future<Mat> remapAsync(
  1. InputArray src,
  2. InputArray map1,
  3. InputArray map2,
  4. int interpolation, {
  5. OutputArray? dst,
  6. int borderMode = BORDER_CONSTANT,
  7. Scalar? borderValue,
})

Remap applies a generic geometrical transformation to an image.

For further details, please see: https:///docs.opencv.org/master/da/d54/group__imgproc__transform.html#gab75ef31ce5cdfb5c44b6da5f3b908ea4

Implementation

Future<Mat> remapAsync(
  InputArray src,
  InputArray map1,
  InputArray map2,
  int interpolation, {
  OutputArray? dst,
  int borderMode = BORDER_CONSTANT,
  Scalar? borderValue,
}) {
  borderValue ??= Scalar();
  dst ??= Mat.empty();
  return cvRunAsync0(
    (callback) => cimgproc.cv_remap(
      src.ref,
      dst!.ref,
      map1.ref,
      map2.ref,
      interpolation,
      borderMode,
      borderValue!.ref,
      callback,
    ),
    (c) {
      return c.complete(dst);
    },
  );
}