DocumentQualityAnalyzerResult class

Result of document quality analysis. It can be used to determine, e.g., if a document is good enough to be used for OCR processing.

Constructors

DocumentQualityAnalyzerResult({required bool documentFound, required DocumentQuality? quality, required double? orientation, required double? orientationConfidence, required List<int> cumulativeQualityHistogram, required List<int> cumulativeContrastHistogram, required List<int> cumulativeTextSizeHistogram, ImageRef? qualityHeatmap})
DocumentQualityAnalyzerResult.fromJson(Map<String, dynamic> json)
factory

Properties

cumulativeContrastHistogram List<int>
Cumulative histogram where every entry is equal to the number of symbols with contrast equal or lower than N percent, where N is the index of the entry in the array.
final
cumulativeQualityHistogram List<int>
Cumulative histogram where every entry is equal to the number of symbols with quality equal or lower than N percent, where N is the index of the entry in the array.
final
cumulativeTextSizeHistogram List<int>
Cumulative histogram where every entry is equal to the number of symbols with text size equal or lower than N percent, where N is the index of the entry in the array.
final
documentFound bool
True if a document was found.
final
hashCode int
The hash code for this object.
no setterinherited
orientation double?
Dominant orientation of the document, if found and if orientation detection is enabled. The value is in degrees counter-clockwise, where 0 corresponds to the document being straight, and the value is in the range of [-180, 180]. To rotate the document to be straight, rotate the image clockwise by this value.
final
orientationConfidence double?
Confidence that the reported orientation of the document is correct. Returned if orientation detection is enabled. The value is in the range of [0, 1]. Possible reasons for low confidence are:
final
quality DocumentQuality?
Quality of the document, if found.
final
qualityHeatmap ImageRef?
Quality heatmap. Black marks areas of no detected text. Colors represent the quality of detected text, with red meaning the lowest quality and yellow and green meaning progressively higher quality.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

encodeImages() → void
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
release() → void
toJson({ToJsonConfiguration? config}) Map<String, dynamic>
toString() String
A string representation of this object.
inherited

Operators

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