detectAndDecodeMulti method

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

Detects QR codes in image, finds the quadrangles containing the codes, and decodes the QRCodes to strings.

Each quadrangle would be returned as a row in the points Mat and each point is a Vecf. Returns true as long as some QR code was detected even in case where the decoding failed For usage please see TestQRCodeDetector For further details, please see: https://docs.opencv.org/master/de/dc3/classcv_1_1QRCodeDetector.html#a188b63ffa17922b2c65d8a0ab7b70775

Implementation

(bool, List<String>, VecPoint, VecMat) detectAndDecodeMulti(InputArray img) {
  final info = calloc<cvg.VecVecChar>();
  final points = calloc<cvg.VecPoint>();
  final codes = calloc<cvg.VecMat>();
  final rval = calloc<ffi.Bool>();
  cvRun(
    () => cobjdetect.cv_QRCodeDetector_detectAndDecodeMulti(
      ref,
      img.ref,
      info,
      points,
      codes,
      rval,
      ffi.nullptr,
    ),
  );
  final ret = (
    rval.value,
    VecVecChar.fromPointer(info).asStringList(),
    VecPoint.fromPointer(points),
    VecMat.fromPointer(codes),
  );
  calloc.free(rval);
  return ret;
}