decodeAsync method
Implementation
Future<(String ret, VecPoint? points, Mat? straightCode)> decodeAsync(
InputArray img,
) async {
final rval = cvRunAsync3<(String, VecPoint, Mat)>(
(callback) => cffi.QRCodeDetector_Decode_Async(ref, img.ref, callback),
(c, prval, points, straightCode) {
// prval is a char ** pointer
final rval = prval.cast<ffi.Pointer<ffi.Char>>().value.toDartString();
calloc.free(prval);
return c.complete(
(
rval,
VecPoint.fromPointer(points.cast<cvg.VecPoint>()),
Mat.fromPointer(straightCode.cast<cvg.Mat>()),
),
);
});
return rval;
}