batchDistanceAsync function

Future<(Mat, Mat)> batchDistanceAsync(
  1. InputArray src1,
  2. InputArray src2,
  3. int dtype, {
  4. int normType = NORM_L2,
  5. int K = 0,
  6. InputArray? mask,
  7. int update = 0,
  8. bool crosscheck = false,
})

BatchDistance is a naive nearest neighbor finder.

For further details, please see: https://docs.opencv.org/master/d2/de8/group__core__array.html#ga4ba778a1c57f83233b1d851c83f5a622

Implementation

Future<(Mat dist, Mat nidx)> batchDistanceAsync(
  InputArray src1,
  InputArray src2,
  int dtype, {
  int normType = NORM_L2,
  int K = 0,
  InputArray? mask,
  int update = 0,
  bool crosscheck = false,
}) async =>
    cvRunAsync2<(Mat, Mat)>(
      (callback) => cffi.core_BatchDistance_Async(
        src1.ref,
        src2.ref,
        dtype,
        normType,
        K,
        mask?.ref ?? Mat.empty().ref,
        update,
        crosscheck,
        callback,
      ),
      matCompleter2,
    );