IDocumentScannerViewController

Allows to control the state or the behavior of the IDocumentScannerView

Functions

Link copied to clipboard
abstract fun setAcceptedAngleScore(acceptedAngleScore: Double)

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

Link copied to clipboard
abstract fun setAcceptedAspectRatioScore(acceptedAspectRatioScore: Double)

The minimum score in percent (0 - 100) that the aspect ratio of the document must match one of the required aspect ratios (if any) to accept a detected document. If acceptedAspectRatioScore is more than 0, then the document is only accepted if the aspect ratio matches one of the given aspect ratios (if any), otherwise OK_BUT_BAD_ASPECT_RATIO is returned.

Link copied to clipboard
abstract fun setAcceptedBrightnessThreshold(acceptedBrightnessThreshold: Double)

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.

Link copied to clipboard
abstract fun setAcceptedSizeScore(acceptedSizeScore: Double)

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

Link copied to clipboard
abstract fun setIgnoreOrientationMismatch(ignoreOrientationMismatch: Boolean)

Flag to determine whether to treat DetectionStatus.OK_BUT_ORIENTAION_MISMATCH status as DetectionStatus.OK. Default is false

Link copied to clipboard
abstract fun setRequiredAspectRatios(requiredPageAspectRatios: List<AspectRatio>?)

Set required AspectRatios.