https://github.com/qengineering/opencv_ocr_tesseract
Text recognition with OpenCV and tesseract
https://github.com/qengineering/opencv_ocr_tesseract
ocr ocr-recognition opencv tesseract tesseract-ocr
Last synced: 2 months ago
JSON representation
Text recognition with OpenCV and tesseract
- Host: GitHub
- URL: https://github.com/qengineering/opencv_ocr_tesseract
- Owner: Qengineering
- License: bsd-3-clause
- Created: 2022-10-13T13:00:03.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-04-15T09:24:01.000Z (about 3 years ago)
- Last Synced: 2025-06-04T10:14:56.611Z (about 1 year ago)
- Topics: ocr, ocr-recognition, opencv, tesseract, tesseract-ocr
- Language: C++
- Homepage: https://qengineering.eu/deep-learning-examples-on-raspberry-32-64-os.html
- Size: 63.5 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# OpenCV_OCR_Tesseract

## Recognize text with tesseract on a bare Raspberry Pi 4.
[](https://opensource.org/licenses/BSD-3-Clause)
Special made for a bare Raspberry Pi 4, see [Q-engineering deep learning examples](https://qengineering.eu/deep-learning-examples-on-raspberry-32-64-os.html)
------------
## Tip.
:point_right: See also [PaddleOCR-Lite](https://github.com/Qengineering/PaddleOCR-Lite-Document) 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](https://qengineering.eu/install-raspberry-64-os.html)
- OpenCV 64-bit installed. [Install OpenCV 4.5](https://qengineering.eu/install-opencv-4.5-on-raspberry-64-os.html)
- 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](https://tesseract-ocr.github.io/).
------------
## 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](https://qengineering.eu/deep-learning-examples-on-raspberry-32-64-os.html#HandsOn).
------------
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=CPZTM5BB3FCYL)