I am trying to pass configuration arguments to pytesseract's image_to_string function.
The code I am running is the following.
filename = 'address1_203.png'
img = Image.open(cam_img+filename)
ocr_out = ocr.image_to_string(img, lang='por', config='-psm 7')
print(ocr_out)
and the error message is
TypeError: image_to_string() got an unexpected keyword argument 'config'
There is another similar question in stackoverflow, but I don't think it solves the problem I am having.
I installed pytesseract through conda with conda install -c auto pytesseract
The code works if I remove the config
parameter
P.S.: this is the first question I am posting, please give me feedback if I've done it properly or not. thanks =)