Resource Base
Table of contents

DocumentDetect Class

DocumentDetect implements IDocumentDetect.

This class is used to configure document boundaries detection feature in capture viewer. Please refer to How to configure boundaries detection.

The APIs for this class include:

API Name Description
detect() Detect the boundaries quadrangle.
processDetectResult() Process the detected result.
getStatusMsg() Get the message of status during detection.

detect()

Detect the boundaries quadrangle.

Syntax

detect(image: VImageData, config?: DocumentDetectConfig): Promise<DocumentDetectResult>;

Parameters

image: The image to detect boundaries. Please refer to VImageData.

config: The configuration of document detect. Please refer to DocumentDetectConfig.

Return Value

A promise resolving to an DocumentDetectResult object that contains the detected result.

Remark

The border detection process will periodically call the custom detect method to obtain the detected result.

processDetectResult()

Process the detected result.

Syntax

processDetectResult(detectResult: DetectResult): DocumentDetectResult;

Parameters

detectResult: The detected result. Please refer to DetectResult.

Return Value

A promise resolving to an DocumentDetectResult object that contains the detected result.

getStatusMsg()

Get the message of status during detection.

Syntax

getStatusMsg(status: EnumDocumentDetectionStatus): string;

Parameters

status: The status during detection. Please refer to EnumDocumentDetectionStatus.

Return Value

The status message string.

This page is compatible for:

Is this page helpful?

YesYes NoNo

In this article:

latest version

    • Latest version(2.0)
    • Version 1.x
      • Version 1.1
    Change +