Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Please call SetImage before attempting recognition.0 error by pytesser

i am trying to convert a text image into text. I am using pytesser in python for that I have already installed tesseract but on running even the following code:

from pytesser import *
im = Image.open('phototest.tif')
text = image_to_string(im)
print text

I get the following error:

Tesseract Open Source OCR Engine with Leptonica
Please call SetImage before attempting recognition.

and nothing gets printed nothing (no result). Any help on the above problem?

like image 941
user1615664 Avatar asked Oct 27 '25 13:10

user1615664


1 Answers

Try converting your image to another format and see if you have the same issue. I had this same problem using Tesseract form the command line. I had a bmp file, I saved the files in my pre processing to png and tesseract worked fine.

like image 171
Christopher Hackett Avatar answered Oct 30 '25 02:10

Christopher Hackett



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!