Create an OCR tool using Tesseract on Python.
This group-based project was completed by my partner, Saim Bin Zahid and myself, Hassan Mahmood, for their semester project for Digital Image Processing. We are the students of 6th Semester of the Department of Computer Sciences at Bahria University, Islamabad Campus.
NOTE: If you want to run this code on your PC, make sure that you have:
1.) A compatible Python IDE (We used JetBrains' PyCharm Community Edition for this purpose).
2.) The following list of Python modules:
=> numpy
=> tkinter
=> cv2 (Python wrapper for opencv)
=> pillows (imported as PIL in Python)
=> os
=> pytesseract (Python wrapper for Tesseract)
Tesseract is an OCR engine which was first developed during the 1980s as a project upon improving OCR techniques and it was later acquired by Google in the year 2005. Please note that pytesseract will not work if you have not installed Tesseract first. Windows users can use the following Github link to download and install Tesseract:
Tesseract at UB Mannheim: https://github.com/UB-Mannheim/tesseract/wiki
After installing Tesseract, run the following command on either Command Prompt or Anaconda Prompt:
pip install pytesseract
For people not using Anaconda, please refer to this link: https://stackoverflow.com/questions/29817447/how-to-run-pip-commands-from-cmd
References/Works cited:
1.) Build your own Optical Character Recognition (OCR) System using Google’s Tesseract and OpenCV - Analytics Vidhya: https://www.analyticsvidhya.com/blog/2020/05/build-your-own-ocr-google-tesseract-opencv/
2.) Using Tesseract with python - Medium: https://medium.com/analytics-vidhya/using-tesseract-with-python-1cadbe37e756