Free-Form OCR digitizes printed text by extracting text within a captured image with the use of Text Recognition from Google's ML Kit. During image capture, the frame displays the target data to capture. This sample application demonstrates the use of Free-Form OCR including configuring DataWedge, registering for scanner status notifications, and using the trigger to retrieve the output via intent.
This sample app performs the following:
This sample application is only intended for educational purposes, demonstrating the use of DataWedge intent API(s).
DataWedge API | App Functionality |
---|---|
Create Profile | Create the profile with specific parameters for Free-Form OCR. |
Delete Profile | Delete the profile if creating the profile fails. |
Get Profiles List | Get the list of DataWedge profiles on the device to check if a profile exists. |
Set Config | Set the appropriate configurations specified. |
Soft Scan Trigger | Start/stop or toggle the software scan trigger. |
Download and build the sample app.
Copy and install the sample app to the device.
Launch the sample app.
Tap Start Scanning or press the trigger button to start the scan.
Place the data to capture within the target crosshair. The extracted text is displayed at the bottom of the screen. Press the Capture button or the hardware trigger when ready to capture the text.
Review the text displayed to ensure the desired data is captured. When satisfied, tap Approve.
The captured text is displayed along with the corresponding screen capture.
Tap Clear Scan Data to clear the data displayed.
Related guides: