Optical Character Recognition on Shunya OS

Instructions on How to use OCR on Shunya OS

OCR demo application allows user to recognize English characters in a image/video by selecting a particular region of that interest.

Hardware required: Any board which is supported by Shunya OS, USB Video Camera, PC

Pre-requisites for running the OCR Demo

1
2
3
sudo apt-get update
sudo apt install python3-dev python3-pip tesseract git
pip3 install pytesseract

OpenCV on python3

Steps to perform the OCR Demo:

Step 0:

Clone this repository using git clone

1
2
$ git clone https://github.com/shunyaos/ocr_demo.git
$ cd ocr_demo

Step 1:

Run the test_roi.py

1
$ python3 test_roi.py

Step 2:

Press ‘s’ and this will open a Roi selector window. Click, press and drag to select a region in which you want to detect text.

Note

The text in the selected region should be clear and the background noise in the image should be less to get more accuracy.

Step 3:

You can retry the process by pressing ‘s’ or quit by pressing ‘q’ on the window