MRZScanResult
MRZScanResult is a result class that contains the parsed MRZ information and the corresponding additional information.
Definition
Assembly: DynamsoftMRZScanner.aar
Namespace: com.dynamsoft.mrzscanner.ui
class MRZScanResult
Methods
| Method | Description |
|---|---|
getData |
Returns the parsed MRZ data. |
getResultStatus |
Returns the result status, which can be finished, canceled or exception. |
getErrorCode |
Returns the error code should something go wrong during the MRZ scanning process. |
getErrorString |
Returns the error message associated with the error code should something go wrong during the MRZ scanning process. |
getDocumentImage |
Returns the cropped document image for the specified document side. |
getOriginalImage |
Returns the original full-frame image for the specified document side. |
getPortraitImage |
Returns the detected portrait image. |
getData
Returns the parsed MRZ information as a MRZData object.
MRZData getData();
Return Value
A MRZData object that contains the parsed MRZ data.
getResultStatus
Returns the status of the result, which can be finished, canceled or exception.
@EnumResultStatus
int getResultStatus();
Return Value
The status of the result, which can be finished, canceled or exception.
RS_FINISHED: The MRZ scanning is finished.RS_CANCELED: The MRZ scanning activity is closed before the process is finished.RS_EXCEPTION: Failed to start MRZ scanning or an error occurs when scanning the MRZ.
getErrorCode
Returns the error code should something go wrong during the MRZ scanning process.
int getErrorCode();
Return Value
An integer representing a EnumErrorCode.
getErrorString
Returns the error message associated with the error code should something go wrong during the MRZ scanning process.
String getErrorString();
Return Value
A string representing the message of a EnumErrorCode.
getDocumentImage
Returns the cropped document image for the specified side of the document.
@Nullable
ImageData getDocumentImage(EnumDocumentSide documentSide);
Parameter(s)
documentSide: An EnumDocumentSide value specifying which side of the document to retrieve the image for.
Return Value
An ImageData object containing the cropped document image, or null if not available.
The return value will be null in the following cases:
setReturnDocumentImage(false)was set in the configuration.EnumDocumentSide.DS_OPPOSITEwas requested but the document is single-sided (e.g. passports).EnumDocumentSide.DS_OPPOSITEwas requested but the opposite side could not be captured, for example due to a capture failure or because the user exited the scanning process before the second side was scanned.
getOriginalImage
Returns the original full-frame camera image for the specified side of the document. Disabled by default — enable by calling setReturnOriginalImage(true) in the configuration.
@Nullable
ImageData getOriginalImage(EnumDocumentSide documentSide);
Parameter(s)
documentSide: An EnumDocumentSide value specifying which side of the document to retrieve the image for.
Return Value
An ImageData object containing the original full-frame image, or null if not available.
The return value will be null in the following cases:
setReturnOriginalImage(false)was set in the configuration (this is the default).EnumDocumentSide.DS_OPPOSITEwas requested but the document is single-sided (e.g. passports).EnumDocumentSide.DS_OPPOSITEwas requested but the opposite side could not be captured, for example due to a capture failure or because the user exited the scanning process before the second side was scanned.
getPortraitImage
Returns the detected portrait image extracted from the document. Returns null if the image is not available, which may happen if setReturnPortraitImage(false) was set in the configuration, or if no portrait was detected.
@Nullable
ImageData getPortraitImage();
Return Value
An ImageData object containing the portrait image, or null if not available.