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
image
DocumentImagein Source image to processdetection_zone
Rectanglein 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
image
DocumentImagein Source image to processdetectionZone
Rectanglein 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
image
DocumentImagein Source image to processdetectionZone
Rectanglein 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
image
DocumentImagein Source image to processdetectionZone
Rectanglein 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
image
DocumentImagein Source image to processdetectionZone
Rectanglein 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_DETECTORin Handle to the DocumentDetector object.hImage
ID3_DOCUMENT_IMAGEin Source image to processsDetectionZone
const id3DocumentRectangle *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_DOCUMENTout Detected document in the image
Returns