docker_ocr_app

 

Table of contents


 

Introduction


This explanation assumes that the i-PRO camera application development environment has been completed.
If you are not ready to build the development environment, please refer to here to complete it.

Also, in this tutorial, the SDK installation directory is described as ${SDK_DIR}.

 

Operation overview


docker_ocr_app is a sample application that reads characters from images taken by a camera and displays the read characters.

 

External libraries required for operation


When building with C/C++, the following is required, but it will be automatically installed during the process of building the Docker image. Please refer to the Dockerfile.azureIoT file included in the sample app.

tesseract

 

Directory path of the sample app


The C/C++ source code is stored below.

${SDK_DIR}/src/adamapp/docker_ocr_app

No python source code.

 

How to build the sample app (C/C++)


See here for building with C/C++.

 

How to use the sample app


Install the app from the Azure Portal. Please see “Deploy to camera for details”.

For details on how to check operation, please see “Check the operation of the app“.

 

As shown below, add text to the image taken by the camera when you start the app.

20240306-171400.png

If character recognition is successful, the recognized characters will be displayed as shown below.

20240306-171401.png

Due to the low accuracy of character recognition, characters may not be readable depending on the environment. Try changing the font and size of the text.

 

Appendix


How to change preferences

This application has several settings that users can change. Below is a list of settings that users can currently change.

Resoultion:
Resolution to get jpeg images.
"160x90", "320x180", "640x360", "1280x720", "1920x1080", "2560x1440", "3840x2160", "160x120", "320x240", "400x300", "640x480", "800x600", "1280x960", "1600x1200", "2048x1536", "2560x1920", "4000x3000", "320x320", "640x640", "1280x1280", "2192x2192", "2992x2992"
However, by the ability of the camera, it may not work with the specified value.

Frame rate:
Frame rate to get YC(YUV) images which are encoded to jpeg images.
Specify 1 or more.
However, by the ability of the camera, it may not work with the specified value.