How to install pytesseract in python
Steps
- Run this command in anaconda cmd pip install pytesseract
- First go to the site or just simply download 64bit version
- Now click double click on the setup
- Now click on next till you reach this stage (pic below) . While installing make sure you learned where you are installing because we are going to use it later on onwards
- Now move downward and click on additional language data make sure your internet is on so that it can download the additional language. Now select the additional language you want to detect /extract from image and video here as per your requirement
- After click on next and finish
Simple Demo
import cv2
import pytesseract
from PIL import Image
pytesseract.pytesseract.tesseract_cmd ='C:\\Program Files\\Tesseract-OCR\\tesseract.exe'
img = cv2.imread('toi.jpg',cv2.COLOR_BGR2GRAY)
print(pytesseract.image_to_string(img))
cv2.imshow('Result',img)
cv2.waitKey(0)
Output :NEW DELHI: The Central Board of Secondary Education (CBSE) and Council for the
Indian School Certificate Examinations (CISCE) on Thursday submitted the
assessment system for class 12 students in the Supreme Court and said the results
will be declared by July 31.
Attorney general (AG) K K Venugopal placed the scheme for CBSE which said
performance of students in class 10, 11 and 12 examinations will be considered.
0 Comments
if you are not getting it then ask i am glad to help