I am a beginner in Machine Learning and I wanted to try text extraction code. Here is my code:
import pytesseract from PIL import Image
pytesseract.pytesseract.tesseract_cmd = r"C:\Program Files (x86)\Tesseract OCR.exe"
img = Image.open('image.png')
img.load()
imgString = pytesseract.image_to_string(img)
However, this results in this error:
TypeError: int() argument must be a string, a bytes-like object or a number, not 'tuple`'
I am using Jupyter Notebook (python 3) to run this program. Is there anything I can do or is there an easier way to extract text from an image?