Configurations
This section describes all options to configure the camera preview.
This SDK is customizable and allows to choose options to configure the shown texts, colors, buttons, timers and object detection parameters.
Implementation example:
For more information about each possible configuration see the corresponding data model below:
Models
type: CaptureType
Determines the type of objects the camera is allowed to detect. Defaults to idcard.
threshold: CGFloat?
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.
margin: Int?
Adds a margin of pixels around the captured image. Must be >= 0.
cameraChange: Bool?
Determines the visibility of the button to switch between the available camera.
Defaults to true.
enablePortrait: Bool?
When enabled, allows the camera to be used in portrait mode.
Defaults to false.
timerCapture: Int?
The time in seconds until a photo is captured from the moment an object is detected. Must be > 0.
Defaults to 2 (seconds).
takePhoto: Bool
Defines if has available options to take manual photo. Defaults to true.
enableInactive: InactiveOptions?
Defines the configurations for inactivity popup. Defaults to true and 30 (seconds).
i18n: CaptureTextOptions?
Defines the texts used for the camera preview.
style: CaptureStyleOptions?
Defines the colors for the camera preview.
active: Bool?
Determines if inactivity popup should appear.
Defaults to true.
timer: Int?
Time of inactivity permitted, from the moment the camera was started. Must be > 0.
Defaults to 30 (seconds).
text: String?
Defines the overlay frame text.
holdStill: String?
Defines the text shown when a document is detected inside the frame.
error: String?
Defines the text shown when a document has an error.
invalid: String?
Defines the text shown when a document is invalid.
success: String?
Defines the text shown when a document is successfully scanned.
outOfFocus: String?
Defines the text shown when a document is out of focus.
textColor: UIColor?
Defines the color for the texts.
textBackground: UIColor?
Defines the color for text backgrounds.
overlayColor: UIColor?
Defines the color for the overlay frame when no objects are detected.
overlayActionColor: UIColor?
Defines the color for the overlay frame when an object is being detected.
overlaySuccessColor: UIColor?
Defines the color for the overlay frame when an object is detected.
overlayErrorColor: UIColor?
Defines the color for the overlay frame when an object has an error.
overlayWarningColor: UIColor?
Defines the color for the overlay frame when an object is out of focus.
idcard
Scan objects of type "card".
passport
Scan objects of type "passport".
passportNumber: String
Passport number of mrz scan
dateOfBirth: Date
Date of birth of mrz scan
expiryDate: Date
Expiry date of mrz scan
Was this helpful?