decodeCurved method

(String, Mat) decodeCurved(
  1. InputArray img,
  2. VecPoint points, {
  3. OutputArray? straightQRcode,
})

Decodes QR code on a curved surface in image once it's found by the detect() method.

Returns UTF8-encoded output string or empty string if the code cannot be decoded.

https://docs.opencv.org/4.x/de/dc3/classcv_1_1QRCodeDetector.html#ac7e9526c748b04186a6aa179f56096cf

Implementation

(String rval, Mat straightQRcode) decodeCurved(
  InputArray img,
  VecPoint points, {
  OutputArray? straightQRcode,
}) {
  final s = straightQRcode?.ptr ?? calloc<cobjdetect.Mat>();
  final v = calloc<ffi.Pointer<ffi.Char>>();
  cvRun(() => cobjdetect.QRCodeDetector_decodeCurved(ref, img.ref, points.ref, s, v));
  final ss = v.value.cast<Utf8>().toDartString();
  calloc.free(v);
  return (ss, Mat.fromPointer(s));
}