DocumentQualityAnalyzerConfiguration

data class DocumentQualityAnalyzerConfiguration(var qualityThresholds: List<DocumentQualityThreshold> = listOf( DocumentQualityThreshold( symbolQuality = 0.5, symbolRatio = 0.5 ), DocumentQualityThreshold( symbolQuality = 0.7, symbolRatio = 0.3 ), DocumentQualityThreshold( symbolQuality = 0.85, symbolRatio = 0.3 ), DocumentQualityThreshold( symbolQuality = 0.9, symbolRatio = 0.1 ) ), var qualityIndices: List<DocumentQuality> = listOf( DocumentQuality.VERY_POOR, DocumentQuality.POOR, DocumentQuality.REASONABLE, DocumentQuality.GOOD, DocumentQuality.EXCELLENT ), var detectOrientation: Boolean = false, var inspectSmallText: Boolean = false, var maxImageSize: Int = 2000, var minEstimatedNumberOfSymbolsForDocument: Int = 20, var minProcessedFraction: Double = 0.0, var maxProcessedFraction: Double = 0.5, var earlyStopIfNSymbolsFound: Int = 100, var tileSize: Int = 300, var returnQualityHeatmap: Boolean = false) : Parcelable

Document Quality Analyzer configuration.

Constructors

Link copied to clipboard
constructor(source: Map<String, Any?>)
constructor(json: JSONObject)
constructor(qualityThresholds: List<DocumentQualityThreshold> = listOf( DocumentQualityThreshold( symbolQuality = 0.5, symbolRatio = 0.5 ), DocumentQualityThreshold( symbolQuality = 0.7, symbolRatio = 0.3 ), DocumentQualityThreshold( symbolQuality = 0.85, symbolRatio = 0.3 ), DocumentQualityThreshold( symbolQuality = 0.9, symbolRatio = 0.1 ) ), qualityIndices: List<DocumentQuality> = listOf( DocumentQuality.VERY_POOR, DocumentQuality.POOR, DocumentQuality.REASONABLE, DocumentQuality.GOOD, DocumentQuality.EXCELLENT ), detectOrientation: Boolean = false, inspectSmallText: Boolean = false, maxImageSize: Int = 2000, minEstimatedNumberOfSymbolsForDocument: Int = 20, minProcessedFraction: Double = 0.0, maxProcessedFraction: Double = 0.5, earlyStopIfNSymbolsFound: Int = 100, tileSize: Int = 300, returnQualityHeatmap: Boolean = false)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Enable orientation detection. Document orientation will be returned in DocumentQualityAnalyzerResult.orientation.

Link copied to clipboard

If this number of symbols is found and minProcessedFraction of the image is processed, the processing stops.

Link copied to clipboard

Inspect small text (typically less than 12 pixels height) when analyzing the document quality. If true, processing will be slower, but when the quality issue with a document is the low resolution of the text, then the issue will be caught.

Link copied to clipboard

Maximum image size in pixels, if image is bigger, it will be resized.

Link copied to clipboard

At most this fraction of the image will be processed, range is from 0 to 1.

Link copied to clipboard

If estimated number of symbols is less than this value, return that document is not found.

Link copied to clipboard

At least this fraction of the image will be processed, range is from 0 to 1.

Link copied to clipboard

quality levels.

Link copied to clipboard

Quality thresholds to separate quality levels.

Link copied to clipboard

If true, will return the quality heatmap as a part of the result. In this case, the entire image will be processed and the minProcessedFraction will be ignored. Useful for debugging situations where the returned quality doesn't appear to match the perceived quality.

Link copied to clipboard

Image will be processed in tiles of this size; will be ignored if image is small.

Functions

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