DocumentScannerService class

Specialized service providing Document Edge Detection, Perspective Matrix calculations, Shadow Removal image filters, and Auto Crop bounds.

Constructors

DocumentScannerService()

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

applyBinarizationFilter(Uint8List grayBytes, {int threshold = 128}) Uint8List
Converts grayscale buffer to pure black and white (monochrome) document scan.
applyGrayscaleFilter(Uint8List bytes) Uint8List
Converts color bytes buffer to normalized grayscale.
applyMagicColorFilter(Uint8List grayBytes) Uint8List
Applies Magic Color document enhancement (contrast boost + high clarity).
applyShadowRemovalFilter(Uint8List grayBytes) Uint8List
Applies shadow removal and background whitening to document byte buffer.
computePerspectiveTransform(DocumentCorners corners, Size targetSize) Matrix4
Calculates perspective transformation matrix to flatten quadrilateral into rectangle.
detectDocumentEdges(Size imageSize) DocumentCorners
Detects document rectangular corners in image frame dimensions.