detectMultiScale2Async method

Future<(VecRect, VecI32)> detectMultiScale2Async(
  1. InputArray image, {
  2. double scaleFactor = 1.1,
  3. int minNeighbors = 3,
  4. int flags = 0,
  5. (int, int) minSize = (0, 0),
  6. (int, int) maxSize = (0, 0),
})

Implementation

Future<(VecRect objects, VecI32 numDetections)> detectMultiScale2Async(
  InputArray image, {
  double scaleFactor = 1.1,
  int minNeighbors = 3,
  int flags = 0,
  (int, int) minSize = (0, 0),
  (int, int) maxSize = (0, 0),
}) async {
  final rval = cvRunAsync2<(VecRect, VecI32)>(
      (callback) => cobjdetect.CascadeClassifier_DetectMultiScale2_Async(
            ref,
            image.ref,
            scaleFactor,
            minNeighbors,
            flags,
            minSize.cvd.ref,
            maxSize.cvd.ref,
            callback,
          ), (c, ret, pnums) {
    return c.complete(
      (VecRect.fromPointer(ret.cast<cobjdetect.VecRect>()), VecI32.fromPointer(pnums.cast<cobjdetect.VecI32>())),
    );
  });
  return rval;
}