DocumentQualityAnalyzerResult

data class DocumentQualityAnalyzerResult(val quality: DocumentQualityAssessment, val documentFound: Boolean, val qualityLevel: DocumentQuality?, val orientation: Double, val orientationConfidence: Double, val cumulativeQualityHistogram: List<Int>, val qualityHeatmap: ImageRef? = null, val bestInputScale: Double) : 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.

Constructors

Link copied to clipboard
constructor(source: Map<String, Any?>)
constructor(json: JSONObject)
constructor(quality: DocumentQualityAssessment, documentFound: Boolean, qualityLevel: DocumentQuality?, orientation: Double, orientationConfidence: Double, cumulativeQualityHistogram: List<Int>, qualityHeatmap: ImageRef? = null, bestInputScale: Double)

Properties

Link copied to clipboard

Returns the best inputScale whose results are used (see inputScales configuration option).

Link copied to clipboard

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.

Link copied to clipboard

Deprecated, please use quality instead, because it provides a more reliable result. True if a document was found.

Link copied to clipboard

Dominant orientation of the document, if found. 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.

Link copied to clipboard

Confidence that the reported orientation of the document is correct. The value is in the range of 0, 1. Possible reasons for low confidence are: Document contains text with multiple orientations. Text on the document is poorly readable. Text on the document is on the edge of detectable text range (text is too small or too big). Insufficient statistics because only part of the image was processed. See ProcessByTileConfiguration options in the DocumentQualityAnalyzerConfiguration.

Link copied to clipboard

Document quality as estimated from the given quality analysis model.

Link copied to clipboard

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.

Link copied to clipboard

Deprecated, please use quality instead, because it provides a more reliable result. Quality of the document, if found. The exact behavior of this value can be configured with the qualityThresholds and qualityIndices parameters.

Functions

Link copied to clipboard
Link copied to clipboard
open override fun close()
Link copied to clipboard
fun toJson(config: ToJsonConfiguration = ToJsonConfiguration.default()): JSONObject