I learning python and I want read a document but ones words are diferent. I use this code,
pytesseract.pytesseract.tesseract_cmd = r'C:\Program Files (x86)\Tesseract-OCR\tesseract'
img = cv2.imread('tes_palabra.png')
words = pytesseract.image_to_string(img)
print(words)
image used and required is https://ibb.co/KscWbD3
but return Unsupported image object
>Solution :
Try somethink like this, using Image module from PIL:
from PIL import Image
import pytesseract
pytesseract.pytesseract.tesseract_cmd = r'C:\Program Files (x86)\Tesseract-OCR\tesseract'
img_file = r'tes_palabra.png'
img = Image.open(img_file)
words = pytesseract.image_to_string(img)
print(words)