How to Convert Any Image To Text using Python and PyTesseract

Опубликовано: 07 Октябрь 2024
на канале: TrainWithShubham
9,200
194

In this tutorial video, learn how you can convert any Image to Text.
(e.g. jpeg, gif, png) into a text.

Python's library PyTesseract can be used to convert your images into text.

First, you should install binary:

On Linux
sudo apt-get update
sudo apt-get install libleptonica-dev
sudo apt-get install tesseract-ocr tesseract-ocr-dev
sudo apt-get install libtesseract-dev

On Mac

brew install tesseract

On Windows
download binary from https://github.com/UB-Mannheim/tesser.... then add pytesseract.pytesseract.tesseract_cmd = 'C:\Program Files (x86)\Tesseract-OCR\tesseract.exe' to your script.

Then you should install the python package using pip:

pip install tesseract
pip install tesseract-ocr

📩 EMAIL: [email protected]

👨🏻‍💻 GITHUB: https://github.com/LondheShubham153​

💼 LINKEDIN:   / shubhamlondhe1996  

✨ INSTAGRAM:   / shubhamlondhe96  

👨‍💻 DISCORD:   / discord  

Presented to you "TrainWithShubham" by Shubham Londhe