Sample project that demonstrates how a web app can leverage Zebra Devices' OCR features offered by DataWedge. This integration is made possible by Zebra Enterprise Browser, an industrial browser that can interact with device OS and HW as a native app.
OCR Wedge uses machine learning to enable fine-tuned, use-case-specific models to extract data in real-time via the Zebra Android device camera and completely offline. Supported configurations:
- License Plates
- Identification Documents
- Vehicle Identification Number (VIN)
- Tire Identification Number (TIN)
- Shipping Container ID
- Meter Reading
Full documentation: https://techdocs.zebra.com/datawedge/latest/guide/input/workflow/#ocrwedge
zebra-eb-ocr-wedge-demo.mp4
- Zebra Device with camera (running A13 or later)
- Enterprise Browser - You can download it from Google PlayStore or here
- Mobility DNA OCR Evaluation License (or purchased one) - Please contact your Zebra Sales Rep to get it.
- Launch Enterprise Browser
- Copy all the files in this project inside one of these folders:
- /sdcard/android/data/com.zebra.mdna.enterprisebrowser/
- /enterprise/device/enterprisebrowser/
- Close and launch again the Enterprise Browser
- Enjoy 🦓
OCR functionalities rely on DataWedge which can be controlled programmatically via Intents. Leveraging on Enterprise Browser you can send and receive intents from a web app.
This project includes a pre-configured DataWedge config file that has one profile per each OCR feature. The web app switches profiles when needed by triggering an intent and get captured data through a broadcast receiver. Each profile sends acquired data to the web app using intents with different action names in order to identify the data types. You can find Enterprise Browser basic setup info here.
- Register DataWedge Intents in Enterprise Browser (one intent per each profile so that we can distinguish this):
Lines 148 to 158 in b4ba031
- Download DataWedge profile:
zebra-eb-ocr-wedge/ocr-wedge-interface.js
Lines 13 to 38 in b4ba031
- Register broadcast receiver:
zebra-eb-ocr-wedge/ocr-wedge-interface.js
Lines 115 to 118 in b4ba031
- Switch between profiles:
zebra-eb-ocr-wedge/ocr-wedge-interface.js
Lines 120 to 137 in b4ba031
- Parse captured data:
zebra-eb-ocr-wedge/ocr-wedge-interface.js
Lines 73 to 113 in b4ba031