Class PartiallyVisibleDocumentConfiguration

Configuration for handling partially visible documents.

Constructors

Properties

accumulationDuration: number = 700

Live mode only: 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.

In single-shot mode, the document scanner will return ERROR_PARTIALLY_VISIBLE if a document is detected as partially visible, regardless of the value of this parameter.

Default is 700

allowPartiallyVisibleDocuments: boolean = false

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.

Only used in ML engine mode.

Default is false

minimumBrightness: number = 0

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

Default is 0

retentionTime: number = 1500

Live mode only: 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.

In single-shot mode this parameter has no effect.

Default is 1500