Skip to content

OCR with Tesseract and OpenCV: Extract text from images effortlessly. Preprocess with OpenCV for accuracy. Display results and save output. Easy integration for document digitization and data entry automation.

Notifications You must be signed in to change notification settings

real0x0a1/ocr-opencv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 

Repository files navigation

OCR with Tesseract and OpenCV

Perform Optical Character Recognition (OCR) on images using Tesseract OCR engine with OpenCV preprocessing.

Overview

This project provides a Python script to perform OCR on images using the Tesseract OCR engine with preprocessing done using OpenCV. It allows extracting text from images in various formats and provides options to display the processed image with bounding boxes around recognized text and save the output as a text file.

Features

  • Preprocessing: Uses OpenCV to preprocess the input image for better OCR accuracy.
  • Text Extraction: Extracts text from images using Tesseract OCR engine.
  • Output Formatting: Displays the recognized text and optionally the processed image with bounding boxes around recognized text.
  • Output Saving: Saves the extracted text to a text file for further analysis or use.

TODO:

  • Live Camera OCR: Implement functionality to enable real-time OCR as an option.

Usage

Installation

  1. Clone the repository:
git clone https://github.com/real0x0a1/ocr-opencv.git
  1. Install dependencies:
pip3 install -r requirements.txt

Usage

  1. Run the script main.py:
python main.py
  1. Follow the prompts to provide the path to the image file and select options for display and output.

Example

Input Image

Input Image

Output

Output image

Acknowledgements

Contributing

Contributions are welcome! Fork the repository and submit a pull request.

Issues

Please open an issue on the GitHub repository for any bugs or feature requests.

Author

real0x0a1 (Ali)


About

OCR with Tesseract and OpenCV: Extract text from images effortlessly. Preprocess with OpenCV for accuracy. Display results and save output. Easy integration for document digitization and data entry automation.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages