recognizeBuffer method

Future<List<List<OcrLine>>?> recognizeBuffer(
  1. Uint8List bytes,
  2. int width,
  3. int height,
  4. int stride,
  5. int format,
  6. int rotation,
)

MRZ detection. bytes - image buffer. Returns a List of List<OcrLine>.

Implementation

Future<List<List<OcrLine>>?> recognizeBuffer(Uint8List bytes, int width,
    int height, int stride, int format, int rotation) async {
  final dsImage = jsify({
    'bytes': bytes,
    'width': width,
    'height': height,
    'stride': stride,
    'format': format,
    'orientation': rotation
  });

  CapturedResult capturedResult =
      await handleThenable(_cvr!.capture(dsImage, modelName));

  return await _resultWrapper(capturedResult.items);
}