DSMRZScanResult
DSMRZScanResult is a result class that contains the parsed MRZ information and the corresponding additional information.
Definition
Assembly: DynamsoftMRZScanner.xcframework
- Objective-C
- Swift
@interface DSMRZScanResult : NSObjectclass MRZScanResult : NSObject
Properties
| Property | Type | Description |
|---|---|---|
data |
DSMRZData | The parsed MRZ information. |
resultStatus |
DSResultStatus | The status of the result, which can be finished, canceled or exception. |
errorCode |
NSInteger | The error code should something go wrong during the MRZ scanning process. |
errorString |
NSString * | The error message associated with the error code should something go wrong during the MRZ scanning process. |
data
The parsed MRZ information as a MRZData object.
- Objective-C
- Swift
@property (nonatomic, nullable, readonly) DSMRZData* data;var data: MRZData? {get}
resultStatus
The status of the result represented as an EnumResultStatus.
- Objective-C
- Swift
@property (nonatomic, assign, readonly) DSResultStatus resultStatus;var resultStatus: ResultStatus {get}
Return Value
The status of the result, which can be finished, canceled or exception.
DSResultStatusFinished: The MRZ scanning is finished.DSResultStatusCanceled: The MRZ scanning activity is closed before the process is finished.DSResultStatusException: Failed to start MRZ scanning or an error occurs when scanning the MRZ.
errorCode
The error code should something go wrong during the MRZ scanning process.
- Objective-C
- Swift
@property (nonatomic, assign, readonly) NSInteger errorCode;var errorCode: Int { get }
errorString
The error message associated with the error code should something go wrong during the MRZ scanning process.
- Objective-C
- Swift
@property (nonatomic, assign, readonly) NSString * errorString;var errorString: String? { get }
Methods
| Method | Description |
|---|---|
getPortraitImage |
Returns the captured portrait image. |
getDocumentImage |
Returns the captured document image for the specified side. |
getOriginalImage |
Returns the original frame image for the specified side. |
getPortraitImage
Returns the captured portrait image, if available.
- Objective-C
- Swift
- (nullable DSImageData *)getPortraitImage;func getPortraitImage() -> ImageData?
Return Value
An ImageData object containing the portrait image, or nil if no portrait was captured or returnPortraitImage was disabled in MRZScannerConfig.
getDocumentImage
Returns the captured document image for the specified side.
- Objective-C
- Swift
- (nullable DSImageData *)getDocumentImage:(DSDocumentSide)side;func getDocumentImage(_ side: DocumentSide) -> ImageData?
Parameters
side: A DocumentSide value specifying which side of the document to retrieve. Use .mrz for the side containing the MRZ, or .opposite for the other side.
Return Value
An ImageData object containing the document image, or nil if the image was not captured or returnDocumentImage was disabled in MRZScannerConfig.
getOriginalImage
Returns the original full-frame image for the specified side.
- Objective-C
- Swift
- (nullable DSImageData *)getOriginalImage:(DSDocumentSide)side;func getOriginalImage(_ side: DocumentSide) -> ImageData?
Parameters
side: A DocumentSide value specifying which side of the document to retrieve.
Return Value
An ImageData object containing the original frame image, or nil if the image was not captured or returnOriginalImage was disabled in MRZScannerConfig.