Class DocumentQualityAnalyzerConfiguration


  • public class DocumentQualityAnalyzerConfiguration
    extends java.lang.Object
    Document Quality Analyzer configuration.
    • 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 false
        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
        maxImageSize - Maximum image size in pixels, if image is bigger, it will be resized. Default is 2000
        minEstimatedNumberOfSymbolsForDocument - If estimated number of symbols is less than this value, return that document is not found. Default is 20
        minProcessedFraction - 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 1
        maxProcessedFraction - 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 1
        minNumberOfRequiredSymbols - If this number of symbols is found and minProcessedFraction of the image is processed, the processing stops. Default is 100
        minRequiredOrientationConfidence - 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 0
        tileSize - Image will be processed in tiles of this size; will be ignored if image is small. Default is 300
        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
      • 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.