DocumentReader.extractFace Method¶
Module: DocumentReader
Definition¶
Extracts a crop of the face in a document.
extract_face(self, image: DocumentImage, document_name: str) -> DocumentImage
Parameters
image
DocumentImagein The image that contains the document. Must be a realigned BGR image of the document.document_name
strin The name of the document to be searched. Must be a key loaded in DocumentLibrary.
Returns
The cropped image of the face.
Exceptions
An error has occurred during Document Library execution.
DocumentImage extractFace(DocumentImage image, String? documentName)
Parameters
image
DocumentImagein The image that contains the document. Must be a realigned BGR image of the document.documentName
Stringin The name of the document to be searched. Must be a key loaded in DocumentLibrary.
Returns
The cropped image of the face.
Exceptions
An error has occurred during Document Library execution.
public DocumentImage ExtractFace(DocumentImage image, string documentName)
Parameters
image
DocumentImagein The image that contains the document. Must be a realigned BGR image of the document.documentName
stringin The name of the document to be searched. Must be a key loaded in DocumentLibrary.
Returns
The cropped image of the face.
Exceptions
An error has occurred during Document Library execution.
public DocumentImage extractFace(DocumentImage image, String documentName) throws DocumentException
Parameters
image
DocumentImagein The image that contains the document. Must be a realigned BGR image of the document.documentName
Stringin The name of the document to be searched. Must be a key loaded in DocumentLibrary.
Returns
The cropped image of the face.
Exceptions
An error has occurred during Document Library execution.
public func extractFace(image: DocumentImage, documentName: String) throws -> DocumentImage
Parameters
image
DocumentImagein The image that contains the document. Must be a realigned BGR image of the document.documentName
Stringin The name of the document to be searched. Must be a key loaded in DocumentLibrary.
Returns
The cropped image of the face.
Exceptions
An error has occurred during Document Library execution.
int id3DocumentReader_ExtractFace (
ID3_DOCUMENT_READER hDocumentReader,
ID3_DOCUMENT_IMAGE hImage,
const char * documentName,
ID3_DOCUMENT_IMAGE hCroppedFace)
Parameters
hDocumentReader
ID3_DOCUMENT_READERin Handle to the DocumentReader object.hImage
ID3_DOCUMENT_IMAGEin The image that contains the document. Must be a realigned BGR image of the document.documentName
const char *in The name of the document to be searched. Must be a key loaded in DocumentLibrary.hCroppedFace
ID3_DOCUMENT_IMAGEout The cropped image of the face.
Returns