Table of contents

MRZScanResult

MRZScanResult is the most basic class to represent the full MRZ result object. It comes with a result status and the parsed MRZ info as a MRZData object.

Definition

Assembly: dynamsoft-mrz-scanner-bundle-react-native

interface MRZScanResult

Properties

Property Type Description
data MRZData Represents the parsed MRZ data.
resultStatus EnumResultStatus Represents the status of the result, which can be finished, canceled or exception.
errorCode number Represents the error code should something go wrong during the MRZ scanning process.
errorString string Represents the error message associated with the error code should something go wrong during the MRZ scanning process.
portraitImage ImageSourcePropType The extracted portrait photo from the document.
mrzSideDocumentImage ImageSourcePropType The cropped, perspective-corrected image of the MRZ side of the document.
oppositeSideDocumentImage ImageSourcePropType The cropped, perspective-corrected image of the opposite (non-MRZ) side of the document.
mrzSideOriginalImage ImageSourcePropType The full camera frame captured for the MRZ side.
oppositeSideOriginalImage ImageSourcePropType The full camera frame captured for the opposite side.

data

Represents the parsed MRZ information as a MRZData object.

data?: MRZData

resultStatus

Represents the status of the result, which can be finished, canceled or exception.

resultStatus: EnumResultStatus

Remarks

The result status can be one of three things:

  • 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.

errorCode

Returns the error code when an exception occurs. This value is only valid when resultStatus is RS_EXCEPTION.

errorCode?: number

errorString

Returns the error message associated with the error code when an exception occurs. This value is only valid when resultStatus is RS_EXCEPTION.

errorString?: string

portraitImage

Returns the extracted portrait photo from the document as an ImageSourcePropType — it can be passed directly to a React Native <Image> element via its source prop. Returns undefined if portrait capture was disabled via MRZScanConfig.returnPortraitImage or if no portrait was detected.

portraitImage?: ImageSourcePropType

mrzSideDocumentImage

Returns the cropped, perspective-corrected image of the side containing the MRZ as an ImageSourcePropType. Returns undefined if document image capture was disabled via MRZScanConfig.returnDocumentImage.

mrzSideDocumentImage?: ImageSourcePropType

oppositeSideDocumentImage

Returns the cropped, perspective-corrected image of the opposite (non-MRZ) side of the document as an ImageSourcePropType. Relevant for two-sided documents such as TD1 ID cards. Returns undefined if document image capture was disabled via MRZScanConfig.returnDocumentImage or if no opposite side was captured.

oppositeSideDocumentImage?: ImageSourcePropType

mrzSideOriginalImage

Returns the full camera frame captured for the MRZ side as an ImageSourcePropType. Returns undefined if original image capture was not enabled via MRZScanConfig.returnOriginalImage.

mrzSideOriginalImage?: ImageSourcePropType

oppositeSideOriginalImage

Returns the full camera frame captured for the opposite side as an ImageSourcePropType. Returns undefined if original image capture was not enabled via MRZScanConfig.returnOriginalImage or if no opposite side was captured.

oppositeSideOriginalImage?: ImageSourcePropType

This page is compatible for: