Class DocumentQualityAnalyzerConfiguration
-
- All Implemented Interfaces:
-
android.os.Parcelable
public final class DocumentQualityAnalyzerConfiguration implements Parcelable
Document Quality Analyzer configuration.
-
-
Field Summary
Fields Modifier and Type Field Description private List<DocumentQualityThreshold>
qualityThresholds
private List<DocumentQuality>
qualityIndices
private Boolean
detectOrientation
private Boolean
inspectSmallText
private Integer
maxImageSize
private Integer
minEstimatedNumberOfSymbolsForDocument
private Double
minProcessedFraction
private Double
maxProcessedFraction
private Integer
earlyStopIfNSymbolsFound
private Integer
tileSize
private Boolean
returnQualityHeatmap
-
Constructor Summary
Constructors Constructor Description DocumentQualityAnalyzerConfiguration(Map<String, Object> source)
DocumentQualityAnalyzerConfiguration(JSONObject json)
DocumentQualityAnalyzerConfiguration(List<DocumentQualityThreshold> qualityThresholds, List<DocumentQuality> qualityIndices, Boolean detectOrientation, Boolean inspectSmallText, Integer maxImageSize, Integer minEstimatedNumberOfSymbolsForDocument, Double minProcessedFraction, Double maxProcessedFraction, Integer earlyStopIfNSymbolsFound, Integer tileSize, Boolean returnQualityHeatmap)
-
Method Summary
Modifier and Type Method Description final List<DocumentQualityThreshold>
getQualityThresholds()
Quality thresholds to separate quality levels. final Unit
setQualityThresholds(List<DocumentQualityThreshold> qualityThresholds)
Quality thresholds to separate quality levels. final List<DocumentQuality>
getQualityIndices()
quality levels. final Unit
setQualityIndices(List<DocumentQuality> qualityIndices)
quality levels. final Boolean
getDetectOrientation()
Enable orientation detection. final Unit
setDetectOrientation(Boolean detectOrientation)
Enable orientation detection. final Boolean
getInspectSmallText()
Inspect small text (typically less than 12 pixels height) when analyzing the document quality. final Unit
setInspectSmallText(Boolean inspectSmallText)
Inspect small text (typically less than 12 pixels height) when analyzing the document quality. final Integer
getMaxImageSize()
Maximum image size in pixels, if image is bigger, it will be resized. final Unit
setMaxImageSize(Integer maxImageSize)
Maximum image size in pixels, if image is bigger, it will be resized. final Integer
getMinEstimatedNumberOfSymbolsForDocument()
If estimated number of symbols is less than this value, return that document is not found. final Unit
setMinEstimatedNumberOfSymbolsForDocument(Integer minEstimatedNumberOfSymbolsForDocument)
If estimated number of symbols is less than this value, return that document is not found. final Double
getMinProcessedFraction()
At least this fraction of the image will be processed, range is from 0 to 1. final Unit
setMinProcessedFraction(Double minProcessedFraction)
At least this fraction of the image will be processed, range is from 0 to 1. final Double
getMaxProcessedFraction()
At most this fraction of the image will be processed, range is from 0 to 1. final Unit
setMaxProcessedFraction(Double maxProcessedFraction)
At most this fraction of the image will be processed, range is from 0 to 1. final Integer
getEarlyStopIfNSymbolsFound()
If this number of symbols is found and minProcessedFraction of the image is processed, the processing stops. final Unit
setEarlyStopIfNSymbolsFound(Integer earlyStopIfNSymbolsFound)
If this number of symbols is found and minProcessedFraction of the image is processed, the processing stops. final Integer
getTileSize()
Image will be processed in tiles of this size; will be ignored if image is small. final Unit
setTileSize(Integer tileSize)
Image will be processed in tiles of this size; will be ignored if image is small. final Boolean
getReturnQualityHeatmap()
If true, will return the quality heatmap as a part of the result. final Unit
setReturnQualityHeatmap(Boolean returnQualityHeatmap)
If true, will return the quality heatmap as a part of the result. final JSONObject
toJson(ToJsonConfiguration config)
final DocumentQualityAnalyzerConfiguration
clone()
final static DocumentQualityAnalyzerConfiguration
default()
-
-
Constructor Detail
-
DocumentQualityAnalyzerConfiguration
DocumentQualityAnalyzerConfiguration(Map<String, Object> source)
-
DocumentQualityAnalyzerConfiguration
DocumentQualityAnalyzerConfiguration(JSONObject json)
-
DocumentQualityAnalyzerConfiguration
DocumentQualityAnalyzerConfiguration(List<DocumentQualityThreshold> qualityThresholds, List<DocumentQuality> qualityIndices, Boolean detectOrientation, Boolean inspectSmallText, Integer maxImageSize, Integer minEstimatedNumberOfSymbolsForDocument, Double minProcessedFraction, Double maxProcessedFraction, Integer earlyStopIfNSymbolsFound, Integer tileSize, Boolean returnQualityHeatmap)
-
-
Method Detail
-
getQualityThresholds
final List<DocumentQualityThreshold> getQualityThresholds()
Quality thresholds to separate quality levels.
-
setQualityThresholds
final Unit setQualityThresholds(List<DocumentQualityThreshold> qualityThresholds)
Quality thresholds to separate quality levels.
-
getQualityIndices
final List<DocumentQuality> getQualityIndices()
quality levels.
-
setQualityIndices
final Unit setQualityIndices(List<DocumentQuality> qualityIndices)
quality levels.
-
getDetectOrientation
final Boolean getDetectOrientation()
Enable orientation detection. Document orientation will be returned in
DocumentQualityAnalyzerResult.orientation
.Default is false
-
setDetectOrientation
final Unit setDetectOrientation(Boolean detectOrientation)
Enable orientation detection. Document orientation will be returned in
DocumentQualityAnalyzerResult.orientation
.Default is false
-
getInspectSmallText
final Boolean getInspectSmallText()
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.
Default is false
-
setInspectSmallText
final Unit setInspectSmallText(Boolean inspectSmallText)
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.
Default is false
-
getMaxImageSize
final Integer getMaxImageSize()
Maximum image size in pixels, if image is bigger, it will be resized.
Default is 2000
-
setMaxImageSize
final Unit setMaxImageSize(Integer maxImageSize)
Maximum image size in pixels, if image is bigger, it will be resized.
Default is 2000
-
getMinEstimatedNumberOfSymbolsForDocument
final Integer getMinEstimatedNumberOfSymbolsForDocument()
If estimated number of symbols is less than this value, return that document is not found.
Default is 20
-
setMinEstimatedNumberOfSymbolsForDocument
final Unit setMinEstimatedNumberOfSymbolsForDocument(Integer minEstimatedNumberOfSymbolsForDocument)
If estimated number of symbols is less than this value, return that document is not found.
Default is 20
-
getMinProcessedFraction
final Double getMinProcessedFraction()
At least this fraction of the image will be processed, range is from 0 to 1.
Default is 0
-
setMinProcessedFraction
final Unit setMinProcessedFraction(Double minProcessedFraction)
At least this fraction of the image will be processed, range is from 0 to 1.
Default is 0
-
getMaxProcessedFraction
final Double getMaxProcessedFraction()
At most this fraction of the image will be processed, range is from 0 to 1.
Default is 0.5
-
setMaxProcessedFraction
final Unit setMaxProcessedFraction(Double maxProcessedFraction)
At most this fraction of the image will be processed, range is from 0 to 1.
Default is 0.5
-
getEarlyStopIfNSymbolsFound
final Integer getEarlyStopIfNSymbolsFound()
If this number of symbols is found and minProcessedFraction of the image is processed, the processing stops.
Default is 100
-
setEarlyStopIfNSymbolsFound
final Unit setEarlyStopIfNSymbolsFound(Integer earlyStopIfNSymbolsFound)
If this number of symbols is found and minProcessedFraction of the image is processed, the processing stops.
Default is 100
-
getTileSize
final Integer getTileSize()
Image will be processed in tiles of this size; will be ignored if image is small.
Default is 300
-
setTileSize
final Unit setTileSize(Integer tileSize)
Image will be processed in tiles of this size; will be ignored if image is small.
Default is 300
-
getReturnQualityHeatmap
final Boolean getReturnQualityHeatmap()
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.
Default is false
-
setReturnQualityHeatmap
final Unit setReturnQualityHeatmap(Boolean returnQualityHeatmap)
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.
Default is false
-
toJson
final JSONObject toJson(ToJsonConfiguration config)
-
clone
final DocumentQualityAnalyzerConfiguration clone()
-
default
final static DocumentQualityAnalyzerConfiguration default()
-
-
-
-