Class FinderDocumentScannerConfiguration

    • Constructor Detail

      • FinderDocumentScannerConfiguration

        FinderDocumentScannerConfiguration()
    • Method Detail

      • setPhotoQualityPrioritization

         final Unit setPhotoQualityPrioritization(CapturePhotoQualityPrioritization value)

        The prioritization of still image quality and capturing speed. Defaults to CapturePhotoQualityPrioritization.BALANCED. If you experience lots of blurry still images try to set this property to CapturePhotoQualityPrioritization.QUALITY

      • setDelayAfterFocusCompleteMs

         final Unit setDelayAfterFocusCompleteMs(Long delay)

        Delay that camera will took before snap on auto focus complete called from camera core in ms. For some devices this callback could call even before real auto focus completed, so we need to take some delay before snapping. Usually you can set 500ms. By default it is set to 20ms.

      • setAutoSnappingEnabled

         final Unit setAutoSnappingEnabled(Boolean autoSnappingEnabled)

        When auto-snapping is enabled the document scanner will take a photo automatically when a document is detected, conditions are good and the auto-snapping time-out elapses. In this mode the user can still tap the shutter button to snap a document.

        When auto-snapping is disabled, the user must manually take a photo by tapping the shutter button.

        The default value is TRUE.

      • setFlashEnabled

         final Unit setFlashEnabled(Boolean flashEnabled)

        Controls whether the flash should be initially enabled. The default value is false.

      • setAutoSnappingSensitivity

         final Unit setAutoSnappingSensitivity(Float autoSnappingSensitivity)

        Controls the auto-snapping speed. Sensitivity must be within the 0..1 range. A value of 1.0 triggers automatic capturing immediately, a value of 0.0 delays the automatic by 3 seconds. The default value is 0.66 (2 seconds)

      • setIgnoreBadAspectRatio

         final Unit setIgnoreBadAspectRatio(Boolean ignoreBadAspectRatio)

        Sets whether to ignore the DetectionResult.OK_BUT_BAD_ASPECT_RATIO detection status. Default value is false.

      • setAcceptedAngleScore

         final Unit setAcceptedAngleScore(Double acceptedAngleScore)

        The minimum score in percent (0 - 100) of the perspective distortion to accept a detected document. Default is 75.0.

      • setAcceptedSizeScore

         final Unit setAcceptedSizeScore(Double acceptedSizeScore)

        The minimum document width or height in percent (0 - 100) of the screen size to accept a detected document. Default is 80.0.

      • setAcceptedBrightnessThreshold

         final Unit setAcceptedBrightnessThreshold(Double acceptedBrightnessThreshold)

        The brightness threshold to accept a detected document in the range of 0 (very dark) to 255 (very bright). If the average brightness value of the detectors input image is below this value, the status of the detection will be set to ERROR_TOO_DARK. Default is 50.0.

      • setImageScale

         final Unit setImageScale(Float imageScale)

        The image scaling factor. The factor must be within the 0..1 range. A factor of 1 means that the resulting images retain their original size. When the factor is less than 1, resulting images will be made smaller by that factor. By default the scale is 1.

      • setDocumentImageSizeLimit

         final Unit setDocumentImageSizeLimit(Integer documentImageHeightLimit, Integer documentImageWidthLimit)

        Document image size limit. Should be positives Ints. Means that if the document size will be bigger than a limit, then it will be downscaled with keeped aspectRatio. By default the limit is Int.MAX_VALUE, so there are no scaling.

      • setPolygonColor

         final Unit setPolygonColor(Integer polygonColor)

        The color of the detected document outline when the document's angle, size or aspect ratio is not yet sufficiently good. (All detection statuses in io.scanbot.sdk.core.contourdetector.DetectionStatus that have the OK_BUT_XXX prefix).

      • setPolygonColorOK

         final Unit setPolygonColorOK(Integer polygonColorOK)

        The color of the detected document outline when we are ready to snap io.scanbot.sdk.core.contourdetector.DetectionStatus.OK.

      • setAutoSnapProgressColor

         final Unit setAutoSnapProgressColor(Integer polygonAutoSnapProgressColor)

        The color of the outline progress animation before the snap being taken after the successful document detection io.scanbot.sdk.core.contourdetector.DetectionStatus.OK.

      • setPolygonBackgroundColor

         final Unit setPolygonBackgroundColor(Integer polygonBackgroundColor)

        The background color of the detected document outline when the document's angle, size or aspect ratio is not yet sufficiently good. (All io.scanbot.sdk.core.contourdetector.DetectionStatus with OK_BUT_XXX).

      • setPolygonBackgroundColorOK

         final Unit setPolygonBackgroundColorOK(Integer polygonBackgroundColorOK)

        The background color of the detected document outline when we are ready to snap io.scanbot.sdk.core.contourdetector.DetectionStatus.OK.

      • setDrawPolygonShadows

         final Unit setDrawPolygonShadows(Boolean drawPolygonShadows)

        Draw shadows under polygon stroke if polygon background color is transparent.

      • setShutterSoundEnabled

         final Unit setShutterSoundEnabled(Boolean shutterSoundEnabled)

        Set camera shutter sound state. {@code true} if a sound should be played when taking a picture, {@code false} - otherwise By default, the camera plays the system-defined camera shutter sound when taking a picture.

        <p> Note that devices may not always allow disabling the camera shutter sound. If the shutter sound state cannot be set to the desired value, this value will be ignored. <p> This value is always {@code true} for pre-JELLY_BEAN_MR1
        Parameters:
        shutterSoundEnabled - if shutter sound should be enabled
      • setShutterButtonHidden

         final Unit setShutterButtonHidden(Boolean shutterButtonHidden)

        Controls whether the shutter button is hidden or not. If true - enable auto-snapping mode and hides the auto-snapping toggle button.

      • setTextHintOK

         final Unit setTextHintOK(String textHintOK)

        Text hint that will be shown when the current detection status is io.scanbot.sdk.core.contourdetector.DetectionStatus.OK.

      • setTextHintTooSmall

         final Unit setTextHintTooSmall(String textHintTooSmall)

        Text hint that will be shown when the current detection status is io.scanbot.sdk.core.contourdetector.DetectionStatus.OK_BUT_TOO_SMALL.

      • setTextHintBadAngles

         final Unit setTextHintBadAngles(String textBadAngles)

        Text hint that will be shown when the current detection status is io.scanbot.sdk.core.contourdetector.DetectionStatus.OK_BUT_BAD_ANGLES.

      • setTextHintBadAspectRatio

         final Unit setTextHintBadAspectRatio(String textHintBadAspectRatio)

        Text hint that will be shown when the current detection status is io.scanbot.sdk.core.contourdetector.DetectionStatus.OK_BUT_BAD_ASPECT_RATIO.

      • setTextHintNothingDetected

         final Unit setTextHintNothingDetected(String textHintNothingDetected)

        Text hint that will be shown when the current detection status is io.scanbot.sdk.core.contourdetector.DetectionStatus.ERROR_NOTHING_DETECTED.

      • setTextHintTooNoisy

         final Unit setTextHintTooNoisy(String textHintTooNoisy)

        Text hint that will be shown when the current detection status is io.scanbot.sdk.core.contourdetector.DetectionStatus.ERROR_TOO_NOISY.

      • setTextHintOffCenter

         final Unit setTextHintOffCenter(String textHintOffCenter)

        Text hint that will be shown when the current detection status is io.scanbot.sdk.core.contourdetector.DetectionStatus.OK_OFF_CENTER.

      • setTextHintTooDark

         final Unit setTextHintTooDark(String textHintTooDark)

        Text hint that will be shown when the current detection status is io.scanbot.sdk.core.contourdetector.DetectionStatus.ERROR_TOO_DARK.

      • setEnableCameraExplanationText

         final Unit setEnableCameraExplanationText(String enableCameraExplanationText)

        Text that will be displayed when the app is not allowed to use the camera, prompting the user to enable the usage of the camera.

      • setEnableCameraButtonTitle

         final Unit setEnableCameraButtonTitle(String enableCameraButtonTitle)

        Title of the button that opens the screen where the user can allow the usage of the camera by the app.

      • setForceMaxSnappingSize

         final Unit setForceMaxSnappingSize(Boolean enabled)

        Set whether camera should force maximum possible size of snapped picture or use maximum size that available with the same aspect ratio as preview by default set to false This parameter works only with ScanbotCameraXView enabled