Configuration

data class Configuration(val context: Context, val validators: List<DocumentAutoCaptureDetectionValidator>, val minValidFramesInRowToStartCandidateSelection: Int = DEFAULT_MIN_VALID_FRAMES_IN_ROW_TO_START_CANDIDATE_SELECTION, val candidateSelectionDurationMillis: Int = DEFAULT_CANDIDATE_SELECTION_DURATION_MILLIS, val detectionNormalizedRectangle: RectangleDouble? = null, val imageParametersNormalizedRectangle: RectangleDouble? = null, val sessionToken: String? = null)

Configuration for the Document Auto Capture Controller component.

Parameters

context

Android context.

validators

List of validators. Validations are applied in the same order in which they are stored in the list.

minValidFramesInRowToStartCandidateSelection

Minimum number of valid frames in a row to start candidate selection. Default value is 2.

candidateSelectionDurationMillis

Duration of candidate selection in milliseconds. Default value is 1000.

detectionNormalizedRectangle

Rectangle of a submitted image (via the DocumentAutoCaptureController.process method) where a document should be detected. The rectangle defines an area inside the image. E.g. if you post images of size 1080x1920 and you want to ignore top and bottom areas, you can use the detectionNormalizedRectangle as follows: RectangleDouble.of(0.0, 0.25, 1.0, 0.75)`. Source image is used if detectionNormalizedRectangle is not defined.

imageParametersNormalizedRectangle

Rectangle of a submitted image (via the DocumentAutoCaptureController.process method) where image parameters should be calculated. The rectangle defines an area inside the image. E.g. if you post images of size 1080x1920 and you want to calculate image parameters (sharpness, brightness hotspots score...) just from the center of the image, you can use the imageParametersNormalizedRectangle as follows: RectangleDouble.of(0.05, 0.35, 0.95, 0.65). Source image is used if imageParametersNormalizedRectangle is not defined.

sessionToken

Session token provided by DIS (Digital Identity Service). Set the session token if the result should be posted to DIS for evaluation. Default value is null.

Throws

if any of the validators has a missing dependency.

Constructors

Link copied to clipboard
fun Configuration(context: Context, validators: List<DocumentAutoCaptureDetectionValidator>, minValidFramesInRowToStartCandidateSelection: Int = DEFAULT_MIN_VALID_FRAMES_IN_ROW_TO_START_CANDIDATE_SELECTION, candidateSelectionDurationMillis: Int = DEFAULT_CANDIDATE_SELECTION_DURATION_MILLIS, detectionNormalizedRectangle: RectangleDouble? = null, imageParametersNormalizedRectangle: RectangleDouble? = null, sessionToken: String? = null)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard
val detectionNormalizedRectangle: RectangleDouble? = null
Link copied to clipboard
val imageParametersNormalizedRectangle: RectangleDouble? = null
Link copied to clipboard
val sessionToken: String? = null