ScannerCv class

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

adjust(RgbaImage src, {double brightness = 0, double contrast = 1, double sharpness = 0}) RgbaImage
Brightness -100..100, contrast 0.4..2.5, sharpness 0..2.
analyzeFrame(Uint8List bytes, int width, int height, int stride, {required bool isBgra, int cannyPasses = 2, bool useHoughFallback = true, bool refineCorners = true}) FrameAnalysis
One-call live-frame analysis: quad detection + luma + focus, with a single downscale and a single buffer copy across the FFI boundary. bytes is a tightly packed luma plane (isBgra=false) or a 4-byte-per- pixel BGRA/RGBA buffer (isBgra=true), with stride bytes per row.
applyFilter(RgbaImage src, ScanFilter filter) RgbaImage
Apply a named document filter, returning a new buffer.
compositeOver(RgbaImage dst, RgbaImage overlay) → void
Alpha-composite overlay over dst in place (must be same size).
detectDocument(RgbaImage src) Quad?
Detect the document in a full-resolution RGBA still.
detectQuad(Uint8List gray, int width, int height, int stride) Quad?
Detect the document quad in a grayscale (luma) frame. Returns normalized corners or null when nothing convincing was found.
encodeJpeg(RgbaImage src, int quality) Uint8List
Encode RGBA pixels as a baseline JPEG (4:2:0).
frameStats(Uint8List gray, int width, int height, int stride) FrameStats
Mean luma + focus (variance of Laplacian) for a grayscale frame.
limitSize(RgbaImage src, int maxDim) RgbaImage
Resize so the long side is at most maxDim (no-op when small enough).
resize(RgbaImage src, int dw, int dh) RgbaImage
Bilinear resize.
rgbaToGray(Uint8List rgba, int width, int height, int stride) Uint8List
Convert an RGBA/BGRA buffer to grayscale.
rotateFlip(RgbaImage src, int quarterTurns, bool flipH) RgbaImage
Rotate clockwise by quarter turns, then optionally mirror horizontally.
version() int
warp(RgbaImage src, Quad pixelQuad) RgbaImage
Perspective-warp src so that pixelQuad maps to a straight rectangle.