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 processByTileConfiguration: ProcessByTileConfiguration = ProcessByTileConfiguration( ), var minRequiredOrientationConfidence: Double = 0.0, 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, processByTileConfiguration: ProcessByTileConfiguration = ProcessByTileConfiguration( ), minRequiredOrientationConfidence: Double = 0.0, 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

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. Zero or negative value means no limit.

Link copied to clipboard

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

Link copied to clipboard

If detectOrientation is True, minNumberOfRequiredSymbols is found, and orientationConfidence is bigger than this threshold, the processing stops. If the maxProcessedFraction part of the image is processed and orientationConfidence is lower than the threshold, the returned orientation will be 0.

Link copied to clipboard

Configuration for processing image by tiles.

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.

Functions

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