detectAndDecodeMultiAsync method

Future<(bool, List<String>, VecPoint, VecMat)> detectAndDecodeMultiAsync(
  1. InputArray img
)

Implementation

Future<(bool, List<String>, VecPoint, VecMat)> detectAndDecodeMultiAsync(
  InputArray img,
) async {
  final ret = cvRunAsync4<(bool, List<String>, VecPoint, VecMat)>(
      (callback) => cobjdetect.QRCodeDetector_DetectAndDecodeMulti_Async(
            ref,
            img.ref,
            callback,
          ), (c, rval, info, points, codes) {
    final rvalValue = rval.cast<ffi.Bool>().value;
    calloc.free(rval);
    final ret = (
      rvalValue,
      VecVecChar.fromPointer(info.cast<cobjdetect.VecVecChar>()).asStringList(),
      VecPoint.fromPointer(points.cast<cobjdetect.VecPoint>()),
      VecMat.fromPointer(codes.cast<cobjdetect.VecMat>())
    );
    return c.complete(ret);
  });
  return ret;
}