DocumentDetector.alignDocument Method¶
Module: DocumentDetector
Definition¶
Aligns and crops the specified document on the specified image and returns a new DocumentImage.
align_document(self, source_image: DocumentImage, detected_document: DetectedDocument) -> DocumentImage
Parameters
source_image
DocumentImagein The source image containing the document.detected_document
DetectedDocumentin The detected document in the image.
Returns
Realigned and cropped image of the document.
Exceptions
An error has occurred during Document Library execution.
DocumentImage alignDocument(DocumentImage sourceImage, DetectedDocument detectedDocument)
Parameters
sourceImage
DocumentImagein The source image containing the document.detectedDocument
DetectedDocumentin The detected document in the image.
Returns
Realigned and cropped image of the document.
Exceptions
An error has occurred during Document Library execution.
public DocumentImage AlignDocument(DocumentImage sourceImage, DetectedDocument detectedDocument)
Parameters
sourceImage
DocumentImagein The source image containing the document.detectedDocument
DetectedDocumentin The detected document in the image.
Returns
Realigned and cropped image of the document.
Exceptions
An error has occurred during Document Library execution.
public DocumentImage alignDocument(DocumentImage sourceImage, DetectedDocument detectedDocument) throws DocumentException
Parameters
sourceImage
DocumentImagein The source image containing the document.detectedDocument
DetectedDocumentin The detected document in the image.
Returns
Realigned and cropped image of the document.
Exceptions
An error has occurred during Document Library execution.
public func alignDocument(sourceImage: DocumentImage, detectedDocument: DetectedDocument) throws -> DocumentImage
Parameters
sourceImage
DocumentImagein The source image containing the document.detectedDocument
DetectedDocumentin The detected document in the image.
Returns
Realigned and cropped image of the document.
Exceptions
An error has occurred during Document Library execution.
int id3DocumentDetector_AlignDocument (
ID3_DOCUMENT_DETECTOR hDocumentDetector,
ID3_DOCUMENT_IMAGE hSourceImage,
ID3_DETECTED_DOCUMENT hDetectedDocument,
ID3_DOCUMENT_IMAGE hAlignedImage)
Parameters
hDocumentDetector
ID3_DOCUMENT_DETECTORin Handle to the DocumentDetector object.hSourceImage
ID3_DOCUMENT_IMAGEin The source image containing the document.hDetectedDocument
ID3_DETECTED_DOCUMENTin The detected document in the image.hAlignedImage
ID3_DOCUMENT_IMAGEout Realigned and cropped image of the document.
Returns