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, document_template_subset: StringList) -> DetectedDocument
Parameters
imageDocumentImagein Source image to processdetection_zoneRectanglein Crop in the image where to look for document. Default is the full image. Output corners are in the full image referential.document_template_subsetStringListin If not empty, will restrict the search to the specified document templates provided. If empty, searches across all loaded document templates.
Returns
Detected document in the image
Exceptions
An error has occurred during Document Library execution.
DetectedDocument detectDocument(DocumentImage image, Rectangle detectionZone, StringList documentTemplateSubset)
Parameters
imageDocumentImagein Source image to processdetectionZoneRectanglein Crop in the image where to look for document. Default is the full image. Output corners are in the full image referential.documentTemplateSubsetStringListin If not empty, will restrict the search to the specified document templates provided. If empty, searches across all loaded document templates.
Returns
Detected document in the image
Exceptions
An error has occurred during Document Library execution.
public DetectedDocument DetectDocument(DocumentImage image, Rectangle detectionZone, StringList documentTemplateSubset)
Parameters
imageDocumentImagein Source image to processdetectionZoneRectanglein Crop in the image where to look for document. Default is the full image. Output corners are in the full image referential.documentTemplateSubsetStringListin If not empty, will restrict the search to the specified document templates provided. If empty, searches across all loaded document templates.
Returns
Detected document in the image
Exceptions
An error has occurred during Document Library execution.
public DetectedDocument detectDocument(DocumentImage image, Rectangle detectionZone, StringList documentTemplateSubset) throws DocumentException
Parameters
imageDocumentImagein Source image to processdetectionZoneRectanglein Crop in the image where to look for document. Default is the full image. Output corners are in the full image referential.documentTemplateSubsetStringListin If not empty, will restrict the search to the specified document templates provided. If empty, searches across all loaded document templates.
Returns
Detected document in the image
Exceptions
An error has occurred during Document Library execution.
public func detectDocument(image: DocumentImage, detectionZone: Rectangle, documentTemplateSubset: StringList) throws -> DetectedDocument
Parameters
imageDocumentImagein Source image to processdetectionZoneRectanglein Crop in the image where to look for document. Default is the full image. Output corners are in the full image referential.documentTemplateSubsetStringListin If not empty, will restrict the search to the specified document templates provided. If empty, searches across all loaded document templates.
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,
ID3_DOCUMENT_RECTANGLE hDetectionZone,
ID3_DOCUMENT_STRING_LIST hDocumentTemplateSubset,
ID3_DETECTED_DOCUMENT hDetectedDocument)
Parameters
hDocumentDetectorID3_DOCUMENT_DETECTORin Handle to the DocumentDetector object.hImageID3_DOCUMENT_IMAGEin Source image to processhDetectionZoneID3_DOCUMENT_RECTANGLEin Crop in the image where to look for document. Default is the full image. Output corners are in the full image referential.hDocumentTemplateSubsetID3_DOCUMENT_STRING_LISTin If not empty, will restrict the search to the specified document templates provided. If empty, searches across all loaded document templates.hDetectedDocumentID3_DETECTED_DOCUMENTout Detected document in the image
Returns