Class PartiallyVisibleDocumentConfiguration


  • public class PartiallyVisibleDocumentConfiguration
    extends java.lang.Object
    Configuration for handling partially visible documents.
    • Constructor Detail

      • PartiallyVisibleDocumentConfiguration

        public PartiallyVisibleDocumentConfiguration​(boolean allowPartiallyVisibleDocuments,
                                                     int accumulationDuration,
                                                     int retentionTime,
                                                     int minimumBrightness)
        Constructs PartiallyVisibleDocumentConfiguration with the given params.
        Parameters:
        allowPartiallyVisibleDocuments - If true, the document scanner will return a status of ERROR_PARTIALLY_VISIBLE or ERROR_PARTIALLY_VISIBLE_TOO_CLOSE if a document-like shape is detected, but not all four corners of the document are visible. If false, a status of ERROR_NOTHING_DETECTED will be returned instead. Default is false
        accumulationDuration - Duration in milliseconds over which the document has to be detected as partially visible. If on any frame the document is not detected as partially visible, or detected as having a completely different Displacement, the accumulation will be reset. During the accumulation, the document scanner will return a status of ERROR_NOTHING_DETECTED instead of one of the partially visible statuses. Set to 0 to disable this behavior. Default is 700
        retentionTime - Time in milliseconds during which the detection status ERROR_NOTHING_DETECTED is changed to ERROR_PARTIALLY_VISIBLE_TOO_CLOSE if no document was detected following the detection of a partially visible document. Set to 0 to disable this behavior. Default is 1500
        minimumBrightness - Minimum brightness of a partially visible potential document. Increasing this value can reduce the number of spurious detections. Default is 0
      • PartiallyVisibleDocumentConfiguration

        public PartiallyVisibleDocumentConfiguration()
        Constructs PartiallyVisibleDocumentConfiguration with default parameters.
    • Method Detail

      • getAllowPartiallyVisibleDocuments

        public boolean getAllowPartiallyVisibleDocuments()
        Getter for allowPartiallyVisibleDocuments field. See constructor documentation for more information about the field.
        Returns:
        allowPartiallyVisibleDocuments
      • setAllowPartiallyVisibleDocuments

        public void setAllowPartiallyVisibleDocuments​(boolean allowPartiallyVisibleDocuments)
        Setter for allowPartiallyVisibleDocuments field. See constructor documentation for more information about the field.
        Parameters:
        allowPartiallyVisibleDocuments - Value to set.
      • getAccumulationDuration

        public int getAccumulationDuration()
        Getter for accumulationDuration field. See constructor documentation for more information about the field.
        Returns:
        accumulationDuration
      • setAccumulationDuration

        public void setAccumulationDuration​(int accumulationDuration)
        Setter for accumulationDuration field. See constructor documentation for more information about the field.
        Parameters:
        accumulationDuration - Value to set.
      • getRetentionTime

        public int getRetentionTime()
        Getter for retentionTime field. See constructor documentation for more information about the field.
        Returns:
        retentionTime
      • setRetentionTime

        public void setRetentionTime​(int retentionTime)
        Setter for retentionTime field. See constructor documentation for more information about the field.
        Parameters:
        retentionTime - Value to set.
      • getMinimumBrightness

        public int getMinimumBrightness()
        Getter for minimumBrightness field. See constructor documentation for more information about the field.
        Returns:
        minimumBrightness
      • setMinimumBrightness

        public void setMinimumBrightness​(int minimumBrightness)
        Setter for minimumBrightness field. See constructor documentation for more information about the field.
        Parameters:
        minimumBrightness - Value to set.