Class DocumentQualityAnalyzerResult
-
- All Implemented Interfaces:
-
android.os.Parcelable
,java.lang.AutoCloseable
public final class DocumentQualityAnalyzerResult implements AutoCloseable, Parcelable
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.
-
-
Field Summary
Fields Modifier and Type Field Description private final Boolean
documentFound
private final DocumentQuality
quality
private final Double
orientation
private final List<Integer>
cumulativeQualityHistogram
private final ImageRef
qualityHeatmap
-
Constructor Summary
Constructors Constructor Description DocumentQualityAnalyzerResult(Map<String, Object> source)
DocumentQualityAnalyzerResult(JSONObject json)
DocumentQualityAnalyzerResult(Boolean documentFound, DocumentQuality quality, Double orientation, List<Integer> cumulativeQualityHistogram, ImageRef qualityHeatmap)
-
Method Summary
Modifier and Type Method Description final Boolean
getDocumentFound()
True if a document was found. final DocumentQuality
getQuality()
Quality of the document, if found. final Double
getOrientation()
Dominant orientation of the document, if found and if orientation detection is enabled. final List<Integer>
getCumulativeQualityHistogram()
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 ImageRef
getQualityHeatmap()
Quality heatmap. final JSONObject
toJson(ToJsonConfiguration config)
final DocumentQualityAnalyzerResult
clone()
Unit
close()
-
-
Constructor Detail
-
DocumentQualityAnalyzerResult
DocumentQualityAnalyzerResult(JSONObject json)
-
-
Method Detail
-
getDocumentFound
final Boolean getDocumentFound()
True if a document was found.
-
getQuality
final DocumentQuality getQuality()
Quality of the document, if found.
-
getOrientation
final Double getOrientation()
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.
-
getCumulativeQualityHistogram
final List<Integer> getCumulativeQualityHistogram()
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.
-
getQualityHeatmap
final ImageRef getQualityHeatmap()
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.
-
toJson
final JSONObject toJson(ToJsonConfiguration config)
-
clone
final DocumentQualityAnalyzerResult clone()
-
-
-
-