VLDOCRControllerDelegate Protocol Reference

Conforms to NSObject
Declared in VLDOCRController.h

Overview

The VLDOCRControllerDelegate protocol provides callbacks to show live OCR results and to provide the final record created by the OCR process and the final image used to create the record.

– ocrController:didProcessResult: required method

Callback giving live results for each camera frame processed by OCR.

- (void)ocrController:(VLDOCRController *_Nonnull)ocrController didProcessResult:(VLDOCRResult *_Nullable)result

Parameters

ocrController

The VLDOCRController instance that processed the image.

result

A VLDOCRResult object that contains an output string for display to the user so they can see the OCR being performed in real time. It also contains the image that was processed as well as a set of glare areas for indicating to the user where glare is on the screen.

Discussion

Callback giving live results for each camera frame processed by OCR.

Declared In

VLDOCRController.h

– ocrController:didCompleteReading:image:forPeripheral:metadata: required method

Callback passing back the VLDRecord object with the measurement data received from the OCR process. The reading can then be presented to the user for verification and then should be submitted to the session for upload by calling submitRecord:image: on VLDSession or you can submit a record without the image by calling submitRecord: on VLDSession.

- (void)ocrController:(VLDOCRController *_Nonnull)ocrController didCompleteReading:(VLDRecord *_Nullable)record image:(UIImage *_Nullable)image forPeripheral:(VLDOCRPeripheral *_Nonnull)peripheral metadata:(NSDictionary *_Nonnull)metadata

Parameters

ocrController

The VLDOCRController instance that processed the image.

record

The VLDRecord object with the measurement data received from the OCR process.

image

The final UIImage that was processed to produce the record.

peripheral

The peripheral that the readings came from.

metadata

A dictionary containing additional metadata from the OCR process. The dictionary should contain the final full screen camera preview processed by the OCR engine, identified with the key kVLDOCRMetadataFinalPreviewKey. The dictionary will also contain the frame of the image inside the camera preview identified by the key kVLDOCRMetadataImageFrameKey. The coordinate space of this frame will be the screen’s coordinate space.

Discussion

Callback passing back the VLDRecord object with the measurement data received from the OCR process. The reading can then be presented to the user for verification and then should be submitted to the session for upload by calling submitRecord:image: on VLDSession or you can submit a record without the image by calling submitRecord: on VLDSession.

Declared In

VLDOCRController.h