---
description: This section describes the available auto capture configurations.
---

# Configurations

The document capture and MRZ reader features are customizable and allow configuring the shown texts, colors, buttons, timers and object detection parameters.&#x20;

The configurations can be defined as exemplified below:

<pre class="language-kotlin"><code class="lang-kotlin"><strong>val style = CaptureStyleOptions(
</strong>    textColor = R.color.black,
    textBackground = R.color.white,
    overlayColor = R.color.black,
    overlaySuccessColor = R.color.white,
)
val texts = CaptureTextOptions(title = "Insert a card", text = "inside the frame")
val photoOptions = ManualPhotoOptions(active = false)
val options = CaptureOptions(takePhoto = photoOptions, i18n = texts, style = style)
</code></pre>

For more information about each possible configuration see the corresponding data model below:

### Models

<table><thead><tr><th width="336">CaptureOptions</th><th>Description</th></tr></thead><tbody><tr><td><strong>CaptureType</strong> type</td><td>Determines the type of objects the camera is allowed to detect. (ID Card, Passport or Face)</td></tr><tr><td><strong>Float?</strong> threshold</td><td><p>Adjusts the minimum score limit for the detected objects to be considered optimal within a range of [0.0, 1.0].</p><p></p><p><strong>Defaults to 0.75.</strong></p></td></tr><tr><td><strong>Int?</strong> margin</td><td>Adds a margin of pixels around the captured image.</td></tr><tr><td><strong>Boolean?</strong> cameraChange</td><td><p>Determines the visibility of the button to switch between the available camera. </p><p></p><p><strong>Defaults to true.</strong></p></td></tr><tr><td><strong>Boolean?</strong> enablePortrait</td><td><p>When enabled, allows the camera to be used in portrait mode.</p><p></p><p><strong>Defaults to false.</strong></p></td></tr><tr><td><strong>Int?</strong> timerCapture</td><td><p>The time in seconds until a photo is captured from the moment an object is detected. </p><p></p><p><strong>Defaults to 2 seconds.</strong></p></td></tr><tr><td><strong>ManualPhotoOptions?</strong> takePhoto</td><td>Defines the configurations of the button to manually capture a photo.</td></tr><tr><td><strong>CaptureTextOptions?</strong> i18n</td><td>Defines the texts used for the camera preview.</td></tr><tr><td><strong>CaptureStyleOptions?</strong> style</td><td>Defines the colors for the camera preview.</td></tr></tbody></table>

***

| ManualPhotoOptions  | Description                                                                                                                                                                        |
| ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Boolean?** active | <p>Determines the visibility of the button to manually capture a photo.</p><p> </p><p><strong>Defaults to true.</strong></p>                                                       |
| **Int?** timer      | <p>The time in seconds until the button to manually capture a photo is visible, from the moment the camera was started. </p><p></p><p><strong>Defaults to 30 seconds.</strong></p> |

***

| CaptureTextOptions     | Description                                                                 |
| ---------------------- | --------------------------------------------------------------------------- |
| **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.                 |

***

<table><thead><tr><th width="376">CaptureStyleOptions</th><th>Description</th></tr></thead><tbody><tr><td><strong>@ColorRes</strong> <strong>Int?</strong> textColor</td><td>Defines the color of the text shown.</td></tr><tr><td><strong>@ColorRes</strong> <strong>Int?</strong> textBackground</td><td>Defines the color of the background shown behind the text.</td></tr><tr><td><strong>@ColorRes</strong> <strong>Int?</strong> overlayColor</td><td>Defines the color for the camera overlay stroke.</td></tr><tr><td><strong>@ColorRes</strong> <strong>Int?</strong> overlaySuccessColor</td><td>Defines the color for the camera overlay stroke shown when the capture is completed.</td></tr></tbody></table>

***

<table><thead><tr><th width="375">CaptureType - enum</th><th>Description</th></tr></thead><tbody><tr><td><strong>IdCard</strong></td><td>Indicates the detector only considers objects of type "card".</td></tr><tr><td><strong>Passport</strong></td><td>Indicates the detector only considers objects of type "passport".</td></tr><tr><td><strong>Face</strong></td><td>Indicates the detector only considers objects of type "face".</td></tr></tbody></table>

