detectAndDecodeMulti method
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<cobjdetect.VecVecChar>();
final points = calloc<cobjdetect.VecPoint>();
final codes = calloc<cobjdetect.VecMat>();
final rval = calloc<ffi.Bool>();
cvRun(() => cobjdetect.QRCodeDetector_DetectAndDecodeMulti(ref, img.ref, info, points, codes, rval));
final ret = (
rval.value,
VecVecChar.fromPointer(info).asStringList(),
VecPoint.fromPointer(points),
VecMat.fromPointer(codes),
);
calloc.free(rval);
return ret;
}