Skip to content

Qengineering/OpenCV_OCR_Tesseract

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenCV_OCR_Tesseract

output image

Recognize text with tesseract on a bare Raspberry Pi 4.

License

Special made for a bare Raspberry Pi 4, see Q-engineering deep learning examples


Tip.

👉 See also PaddleOCR-Lite solution. It is 10 times faster!


Dependencies.

To run the application, you have to:

  • A raspberry Pi 4 with a 32 or 64-bit operating system. It can be the Raspberry 64-bit OS, or Ubuntu 18.04 / 20.04. Install 64-bit OS
  • OpenCV 64-bit installed. Install OpenCV 4.5
  • Install tesseract: sudo apt-get install libtesseract-dev tesseract-ocr
  • Code::Blocks installed. ($ sudo apt-get install codeblocks)

Notes.

Tesseract is very fast. It can handle multiple long lines of text at a time.
In contrast to the deep learning approach, tesseract is sensitive to font, colour, noise, scale, and skew.
See this repo as a starting point in your OCR project.
For more iinformation check the Tesseract tutorial.


Installing the app.

To extract and run the network in Code::Blocks
$ mkdir MyDir
$ cd MyDir
$ wget https://github.com/Qengineering/OpenCV_OCR_Tesseract/archive/refs/heads/main.zip
$ unzip -j master.zip
Remove master.zip, LICENSE and README.md as they are no longer needed.
$ rm master.zip
$ rm LICENSE
$ rm README.md

Your MyDir folder must now look like this:
*.png
OpenCV_OCR_Tesseract.cpb
main.cpp


Running the app.

To run the application load the project file OpenCV_OCR_Tesseract.cbp in Code::Blocks.
Next, follow the instructions at Hands-On.


paypal