Class DocumentQualityAnalyzerConfiguration
- java.lang.Object
-
- io.scanbot.sdk.documentqualityanalyzer.DocumentQualityAnalyzerConfiguration
-
public class DocumentQualityAnalyzerConfiguration extends java.lang.ObjectDocument Quality Analyzer configuration.
-
-
Constructor Summary
Constructors Constructor Description DocumentQualityAnalyzerConfiguration()Constructs DocumentQualityAnalyzerConfiguration with default parameters.DocumentQualityAnalyzerConfiguration(java.util.List<DocumentQualityThreshold> qualityThresholds, java.util.List<DocumentQuality> qualityIndices, boolean detectOrientation, boolean inspectSmallText, int maxImageSize, int minEstimatedNumberOfSymbolsForDocument, double minProcessedFraction, double maxProcessedFraction, int minNumberOfRequiredSymbols, double minRequiredOrientationConfidence, int tileSize, boolean returnQualityHeatmap)Constructs DocumentQualityAnalyzerConfiguration with the given params.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleangetDetectOrientation()Getter for detectOrientation field.booleangetInspectSmallText()Getter for inspectSmallText field.intgetMaxImageSize()Getter for maxImageSize field.doublegetMaxProcessedFraction()Getter for maxProcessedFraction field.intgetMinEstimatedNumberOfSymbolsForDocument()Getter for minEstimatedNumberOfSymbolsForDocument field.intgetMinNumberOfRequiredSymbols()Getter for minNumberOfRequiredSymbols field.doublegetMinProcessedFraction()Getter for minProcessedFraction field.doublegetMinRequiredOrientationConfidence()Getter for minRequiredOrientationConfidence field.java.util.List<DocumentQuality>getQualityIndices()Getter for qualityIndices field.java.util.List<DocumentQualityThreshold>getQualityThresholds()Getter for qualityThresholds field.booleangetReturnQualityHeatmap()Getter for returnQualityHeatmap field.intgetTileSize()Getter for tileSize field.voidsetDetectOrientation(boolean detectOrientation)Setter for detectOrientation field.voidsetInspectSmallText(boolean inspectSmallText)Setter for inspectSmallText field.voidsetMaxImageSize(int maxImageSize)Setter for maxImageSize field.voidsetMaxProcessedFraction(double maxProcessedFraction)Setter for maxProcessedFraction field.voidsetMinEstimatedNumberOfSymbolsForDocument(int minEstimatedNumberOfSymbolsForDocument)Setter for minEstimatedNumberOfSymbolsForDocument field.voidsetMinNumberOfRequiredSymbols(int minNumberOfRequiredSymbols)Setter for minNumberOfRequiredSymbols field.voidsetMinProcessedFraction(double minProcessedFraction)Setter for minProcessedFraction field.voidsetMinRequiredOrientationConfidence(double minRequiredOrientationConfidence)Setter for minRequiredOrientationConfidence field.voidsetQualityIndices(java.util.List<DocumentQuality> qualityIndices)Setter for qualityIndices field.voidsetQualityThresholds(java.util.List<DocumentQualityThreshold> qualityThresholds)Setter for qualityThresholds field.voidsetReturnQualityHeatmap(boolean returnQualityHeatmap)Setter for returnQualityHeatmap field.voidsetTileSize(int tileSize)Setter for tileSize field.
-
-
-
Constructor Detail
-
DocumentQualityAnalyzerConfiguration
public DocumentQualityAnalyzerConfiguration(java.util.List<DocumentQualityThreshold> qualityThresholds, java.util.List<DocumentQuality> qualityIndices, boolean detectOrientation, boolean inspectSmallText, int maxImageSize, int minEstimatedNumberOfSymbolsForDocument, double minProcessedFraction, double maxProcessedFraction, int minNumberOfRequiredSymbols, double minRequiredOrientationConfidence, int tileSize, boolean returnQualityHeatmap)
Constructs DocumentQualityAnalyzerConfiguration with the given params.- Parameters:
qualityThresholds- Quality thresholds to separate quality levels.qualityIndices- quality levels.detectOrientation- Enable orientation detection. Document orientation will be returned in `DocumentQualityAnalyzerResult.orientation`. Default is falseinspectSmallText- 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 falsemaxImageSize- Maximum image size in pixels, if image is bigger, it will be resized. Default is 2000minEstimatedNumberOfSymbolsForDocument- If estimated number of symbols is less than this value, return that document is not found. Default is 20minProcessedFraction- At least this fraction of the image will be processed, range is from 0 to 1. Decreasing this value below 1.0 can lead to faster processing but may result in less accurate prediction, as only a subset of the image tiles will be analyzed. Default is 1maxProcessedFraction- At most this fraction of the image will be processed, range is from 0 to 1. Decreasing this value below 1.0 can lead to faster processing but may result in less accurate prediction, as only a subset of the image tiles will be analyzed. Default is 1minNumberOfRequiredSymbols- If this number of symbols is found and minProcessedFraction of the image is processed, the processing stops. Default is 100minRequiredOrientationConfidence- 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. Default is 0tileSize- Image will be processed in tiles of this size; will be ignored if image is small. Default is 300returnQualityHeatmap- 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
-
DocumentQualityAnalyzerConfiguration
public DocumentQualityAnalyzerConfiguration()
Constructs DocumentQualityAnalyzerConfiguration with default parameters.
-
-
Method Detail
-
getQualityThresholds
public java.util.List<DocumentQualityThreshold> getQualityThresholds()
Getter for qualityThresholds field. See constructor documentation for more information about the field.- Returns:
- qualityThresholds
-
setQualityThresholds
public void setQualityThresholds(java.util.List<DocumentQualityThreshold> qualityThresholds)
Setter for qualityThresholds field. See constructor documentation for more information about the field.- Parameters:
qualityThresholds- Value to set.
-
getQualityIndices
public java.util.List<DocumentQuality> getQualityIndices()
Getter for qualityIndices field. See constructor documentation for more information about the field.- Returns:
- qualityIndices
-
setQualityIndices
public void setQualityIndices(java.util.List<DocumentQuality> qualityIndices)
Setter for qualityIndices field. See constructor documentation for more information about the field.- Parameters:
qualityIndices- Value to set.
-
getDetectOrientation
public boolean getDetectOrientation()
Getter for detectOrientation field. See constructor documentation for more information about the field.- Returns:
- detectOrientation
-
setDetectOrientation
public void setDetectOrientation(boolean detectOrientation)
Setter for detectOrientation field. See constructor documentation for more information about the field.- Parameters:
detectOrientation- Value to set.
-
getInspectSmallText
public boolean getInspectSmallText()
Getter for inspectSmallText field. See constructor documentation for more information about the field.- Returns:
- inspectSmallText
-
setInspectSmallText
public void setInspectSmallText(boolean inspectSmallText)
Setter for inspectSmallText field. See constructor documentation for more information about the field.- Parameters:
inspectSmallText- Value to set.
-
getMaxImageSize
public int getMaxImageSize()
Getter for maxImageSize field. See constructor documentation for more information about the field.- Returns:
- maxImageSize
-
setMaxImageSize
public void setMaxImageSize(int maxImageSize)
Setter for maxImageSize field. See constructor documentation for more information about the field.- Parameters:
maxImageSize- Value to set.
-
getMinEstimatedNumberOfSymbolsForDocument
public int getMinEstimatedNumberOfSymbolsForDocument()
Getter for minEstimatedNumberOfSymbolsForDocument field. See constructor documentation for more information about the field.- Returns:
- minEstimatedNumberOfSymbolsForDocument
-
setMinEstimatedNumberOfSymbolsForDocument
public void setMinEstimatedNumberOfSymbolsForDocument(int minEstimatedNumberOfSymbolsForDocument)
Setter for minEstimatedNumberOfSymbolsForDocument field. See constructor documentation for more information about the field.- Parameters:
minEstimatedNumberOfSymbolsForDocument- Value to set.
-
getMinProcessedFraction
public double getMinProcessedFraction()
Getter for minProcessedFraction field. See constructor documentation for more information about the field.- Returns:
- minProcessedFraction
-
setMinProcessedFraction
public void setMinProcessedFraction(double minProcessedFraction)
Setter for minProcessedFraction field. See constructor documentation for more information about the field.- Parameters:
minProcessedFraction- Value to set.
-
getMaxProcessedFraction
public double getMaxProcessedFraction()
Getter for maxProcessedFraction field. See constructor documentation for more information about the field.- Returns:
- maxProcessedFraction
-
setMaxProcessedFraction
public void setMaxProcessedFraction(double maxProcessedFraction)
Setter for maxProcessedFraction field. See constructor documentation for more information about the field.- Parameters:
maxProcessedFraction- Value to set.
-
getMinNumberOfRequiredSymbols
public int getMinNumberOfRequiredSymbols()
Getter for minNumberOfRequiredSymbols field. See constructor documentation for more information about the field.- Returns:
- minNumberOfRequiredSymbols
-
setMinNumberOfRequiredSymbols
public void setMinNumberOfRequiredSymbols(int minNumberOfRequiredSymbols)
Setter for minNumberOfRequiredSymbols field. See constructor documentation for more information about the field.- Parameters:
minNumberOfRequiredSymbols- Value to set.
-
getMinRequiredOrientationConfidence
public double getMinRequiredOrientationConfidence()
Getter for minRequiredOrientationConfidence field. See constructor documentation for more information about the field.- Returns:
- minRequiredOrientationConfidence
-
setMinRequiredOrientationConfidence
public void setMinRequiredOrientationConfidence(double minRequiredOrientationConfidence)
Setter for minRequiredOrientationConfidence field. See constructor documentation for more information about the field.- Parameters:
minRequiredOrientationConfidence- Value to set.
-
getTileSize
public int getTileSize()
Getter for tileSize field. See constructor documentation for more information about the field.- Returns:
- tileSize
-
setTileSize
public void setTileSize(int tileSize)
Setter for tileSize field. See constructor documentation for more information about the field.- Parameters:
tileSize- Value to set.
-
getReturnQualityHeatmap
public boolean getReturnQualityHeatmap()
Getter for returnQualityHeatmap field. See constructor documentation for more information about the field.- Returns:
- returnQualityHeatmap
-
setReturnQualityHeatmap
public void setReturnQualityHeatmap(boolean returnQualityHeatmap)
Setter for returnQualityHeatmap field. See constructor documentation for more information about the field.- Parameters:
returnQualityHeatmap- Value to set.
-
-