recognizeBuffer method
Performs OCR on an image buffer.
Parameters:
bytes
: Raw image data (RGBA).width
: Image width in pixels.height
: Image height in pixels.stride
: Number of bytes per row.format
: Pixel format index (e.g.,ImagePixelFormat.IPF_ARGB_8888.index
).rotation
: Rotation angle in degrees (0, 90, 180, 270).
Returns a list of OCR results, where each item is a list of OcrLine representing one text region (like MRZ or VIN blocks).
Implementation
@override
Future<List<List<OcrLine>>?> recognizeBuffer(Uint8List bytes, int width,
int height, int stride, int format, int rotation) async {
return _cvm.recognizeBuffer(bytes, width, height, stride, format, rotation);
}