PartiallyVisibleDocumentConfiguration

data class PartiallyVisibleDocumentConfiguration(var allowPartiallyVisibleDocuments: Boolean = false, var accumulationDuration: Int = 700, var retentionTime: Int = 1500, var minimumBrightness: Int = 0) : Parcelable

Configuration for handling partially visible documents.

Constructors

Link copied to clipboard
constructor(source: Map<String, Any?>)
constructor(json: JSONObject)
constructor(allowPartiallyVisibleDocuments: Boolean = false, accumulationDuration: Int = 700, retentionTime: Int = 1500, minimumBrightness: Int = 0)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Duration in milliseconds over which the document has to be detected as partially visible. If on any frame the document is not detected as partially visible, or detected as having a completely different Displacement, the accumulation will be reset. During the accumulation, the document scanner will return a status of ERROR_NOTHING_DETECTED instead of one of the partially visible statuses. Set to 0 to disable this behavior.

Link copied to clipboard

If true, the document scanner will return a status of ERROR_PARTIALLY_VISIBLE or ERROR_PARTIALLY_VISIBLE_TOO_CLOSE if a document-like shape is detected, but not all four corners of the document are visible. If false, a status of ERROR_NOTHING_DETECTED will be returned instead.

Link copied to clipboard

Minimum brightness of a partially visible potential document. Increasing this value can reduce the number of spurious detections.

Link copied to clipboard

Time in milliseconds during which the detection status ERROR_NOTHING_DETECTED is changed to ERROR_PARTIALLY_VISIBLE_TOO_CLOSE if no document was detected following the detection of a partially visible document. Set to 0 to disable this behavior.

Functions

Link copied to clipboard
Link copied to clipboard
fun toJson(config: ToJsonConfiguration = ToJsonConfiguration.default()): JSONObject