https://github.com/seraph-yang/ocr
Text detection + text recorgnition using OpenCV, Python, and Tesseract
https://github.com/seraph-yang/ocr
ocr opencv python tesseract
Last synced: 10 months ago
JSON representation
Text detection + text recorgnition using OpenCV, Python, and Tesseract
- Host: GitHub
- URL: https://github.com/seraph-yang/ocr
- Owner: seraph-yang
- Created: 2025-08-24T03:47:14.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2025-08-24T22:59:53.000Z (10 months ago)
- Last Synced: 2025-08-25T01:43:12.407Z (10 months ago)
- Topics: ocr, opencv, python, tesseract
- Language: Python
- Homepage:
- Size: 86.8 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# OpenCV OCR
Performs text detection + text recorgnition using OpenCV, Python, and Tesseract
OCR utilizees an LSTM, a type of RNN
1) Use OpenCV EAST text detector to find text in an image -> gives bounding box coordinates
2) Extract each of these Region of Interests (ROI) and pass into Tessearct deep learning recognition algorithm
3) Output gives us OCR results
4) Draw results on output
Tesseract binary needs flags:
- `-l`: language of input text
- `-oem`: OCR Engine Mode, controls algorithm used
- `psm`: Page Segmentation Mode
### Installations
```
pip install opencv-python numpy pytesseract imutils
```
### Run
```
source ocr_env/bin/activate
python text_recognition.py --east frozen_east_text_detection.pb --image images/image1.png
```
Adding `--padding 0.25` increases the bounding box; larger number means bigger bounding box