drawMatchesAsync function

Future<void> drawMatchesAsync(
  1. InputArray img1,
  2. VecKeyPoint keypoints1,
  3. InputArray img2,
  4. VecKeyPoint keypoints2,
  5. VecDMatch matches1to2,
  6. InputOutputArray outImg, {
  7. Scalar? matchColor,
  8. Scalar? singlePointColor,
  9. VecChar? matchesMask,
  10. DrawMatchesFlag flags = DrawMatchesFlag.DEFAULT,
})

DrawMatches draws matches on combined train and querry images.

For further details, please see: https://docs.opencv.org/master/d4/d5d/group__features2d__draw.html#gad8f463ccaf0dc6f61083abd8717c261a

Implementation

Future<void> drawMatchesAsync(
  InputArray img1,
  VecKeyPoint keypoints1,
  InputArray img2,
  VecKeyPoint keypoints2,
  VecDMatch matches1to2,
  InputOutputArray outImg, {
  Scalar? matchColor,
  Scalar? singlePointColor,
  VecChar? matchesMask,
  DrawMatchesFlag flags = DrawMatchesFlag.DEFAULT,
}) async {
  matchColor ??= Scalar.all(-1);
  singlePointColor ??= Scalar.all(-1);
  matchesMask ??= VecChar.fromList([]);
  return cvRunAsync0(
    (callback) => cfeatures2d.cv_drawMatches(
      img1.ref,
      keypoints1.ref,
      img2.ref,
      keypoints2.ref,
      matches1to2.ref,
      outImg.ref,
      matchColor!.ref,
      singlePointColor!.ref,
      matchesMask!.ref,
      flags.value,
      callback,
    ),
    (c) {
      c.complete();
    },
  );
}