drawMatches function

void drawMatches(
  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

void drawMatches(
  InputArray img1,
  VecKeyPoint keypoints1,
  InputArray img2,
  VecKeyPoint keypoints2,
  VecDMatch matches1to2,
  InputOutputArray outImg, {
  Scalar? matchColor,
  Scalar? singlePointColor,
  VecChar? matchesMask,
  DrawMatchesFlag flags = DrawMatchesFlag.DEFAULT,
}) {
  matchColor ??= Scalar.all(-1);
  singlePointColor ??= Scalar.all(-1);
  matchesMask ??= VecChar.fromList([]);
  cvRun(
    () => cffi.DrawMatches(
      img1.ref,
      keypoints1.ref,
      img2.ref,
      keypoints2.ref,
      matches1to2.ref,
      outImg.ref,
      matchColor!.ref,
      singlePointColor!.ref,
      matchesMask!.ref,
      flags.value,
    ),
  );
}