DocumentDetector.detectDocument Method

Module: DocumentDetector

Definition

Detects a document on a delimited area of the specified DocumentImage and returns a DetectedDocument.

Important

Document templates must be loaded before calling this method.

detect_document(self, image: DocumentImage, detection_zone: Rectangle) -> DetectedDocument

Parameters

in Source image to process

detection_zone Rectangle
in Crop in the image where to look for document. Default is the full image. Output corners are in the full image referential.

Returns

Detected document in the image

Exceptions

An error has occurred during Document Library execution.
DetectedDocument detectDocument(DocumentImage image, Rectangle detectionZone)

Parameters

in Source image to process

detectionZone Rectangle
in Crop in the image where to look for document. Default is the full image. Output corners are in the full image referential.

Returns

Detected document in the image

Exceptions

An error has occurred during Document Library execution.
public DetectedDocument DetectDocument(DocumentImage image, Rectangle detectionZone)

Parameters

in Source image to process

detectionZone Rectangle
in Crop in the image where to look for document. Default is the full image. Output corners are in the full image referential.

Returns

Detected document in the image

Exceptions

An error has occurred during Document Library execution.
public DetectedDocument detectDocument(DocumentImage image, Rectangle detectionZone) throws DocumentException

Parameters

in Source image to process

detectionZone Rectangle
in Crop in the image where to look for document. Default is the full image. Output corners are in the full image referential.

Returns

Detected document in the image

Exceptions

An error has occurred during Document Library execution.
public func detectDocument(image: DocumentImage, detectionZone: Rectangle) throws -> DetectedDocument

Parameters

in Source image to process

detectionZone Rectangle
in Crop in the image where to look for document. Default is the full image. Output corners are in the full image referential.

Returns

Detected document in the image

Exceptions

An error has occurred during Document Library execution.
int id3DocumentDetector_DetectDocument (
    ID3_DOCUMENT_DETECTOR hDocumentDetector,
    ID3_DOCUMENT_IMAGE hImage,
    const id3DocumentRectangle * sDetectionZone,
    ID3_DETECTED_DOCUMENT hDetectedDocument)

Parameters

hDocumentDetector ID3_DOCUMENT_DETECTOR
in Handle to the DocumentDetector object.

in Source image to process

in Crop in the image where to look for document. Default is the full image. Output corners are in the full image referential.

hDetectedDocument ID3_DETECTED_DOCUMENT
out Detected document in the image

Returns

int
An error code.
See id3DocumentError file for the list of possible error codes.