OcrImage class
A decoded RGBA raster in plain Dart memory - the form the OCR pipeline works in, so all of its geometry/cropping/resizing is pure Dart and unit testable off a GPU.
Pixels are row-major, 4 bytes (R, G, B, A) each, top-left origin, y down -
the same convention as ui.Image.toByteData(rawRgba) and an OCR model's
pixel boxes.
Properties
Methods
-
crop(
Rect rect) → OcrImage -
A copy of the sub-rectangle
rect(clamped to the image bounds). -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
pixel(
int x, int y) → ({int b, int g, int r}) -
The RGB value at integer pixel
x,y(clamped to the image). -
resize(
int newWidth, int newHeight) → OcrImage -
A bilinearly-resampled copy at
newWidthxnewHeight. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
fromUiImage(
Image image) → Future< OcrImage> - Reads a page raster off the GPU into an OcrImage.