Configurations
This section describes the available auto capture configurations.
The document capture and MRZ reader features are customizable and allow configuring the shown texts, colors, buttons, timers and object detection parameters.
The configurations can be defined as exemplified below:
For more information about each possible configuration see the corresponding data model below:
Models
CaptureType type
Determines the type of objects the camera is allowed to detect. (ID Card, Passport or Face)
Float? threshold
Adjusts the minimum score limit for the detected objects to be considered optimal within a range of [0.0, 1.0].
Defaults to 0.75.
Int? margin
Adds a margin of pixels around the captured image.
Boolean? cameraChange
Determines the visibility of the button to switch between the available camera.
Defaults to true.
Boolean? enablePortrait
When enabled, allows the camera to be used in portrait mode.
Defaults to false.
Int? timerCapture
The time in seconds until a photo is captured from the moment an object is detected.
Defaults to 2 seconds.
ManualPhotoOptions? takePhoto
Defines the configurations of the button to manually capture a photo.
CaptureTextOptions? i18n
Defines the texts used for the camera preview.
CaptureStyleOptions? style
Defines the colors for the camera preview.
Boolean? active
Determines the visibility of the button to manually capture a photo.
Defaults to true.
Int? timer
The time in seconds until the button to manually capture a photo is visible, from the moment the camera was started.
Defaults to 30 seconds.
String? outOfFocus
Defines the text shown when the image is out of focus.
String? frameCard
Defines the text shown when no cards are inside the frame.
String? holdStill
Defines the text immediately after a document is detected inside the frame.
String? success
Defines the text shown when the capture is terminated with success.
String? error
Defines the text shown when the camera encounters an error.
@ColorRes Int? textColor
Defines the color of the text shown.
@ColorRes Int? textBackground
Defines the color of the background shown behind the text.
@ColorRes Int? overlayColor
Defines the color for the camera overlay stroke.
@ColorRes Int? overlaySuccessColor
Defines the color for the camera overlay stroke shown when the capture is completed.
IdCard
Indicates the detector only considers objects of type "card".
Passport
Indicates the detector only considers objects of type "passport".
Face
Indicates the detector only considers objects of type "face".
Was this helpful?