I'm trying to make tesseract run in python:
...image is a numpy array (uint8)...
tessApi = tesseract.TessBaseAPI()
tessApi.Init(".","spa",tesseract.OEM_DEFAULT)
tessApi.SetVariable("tessedit_char_whitelist", "0123456789ACEIMNOPRSTU/imn")
tessApi.SetPageSegMode(tesseract.PSM_AUTO)
# SetImage(imagedata, width, height, bytes_per_pixel, bytes_per_line)
w = int(final.shape[1])
h = int(final.shape[0])
tessApi.setImage(image,w,h,1,w)
text = tessApi.GetUTF8Text()
print text
And I get an error: raise AttributeError(name) AttributeError: setImage I can't figure out why. Please, can anybody help me?.
Check https://code.google.com/p/python-tesseract/source/browse/python-tesseract-0.9/src/tesseract.py
The function you are trying to call is
Use an uppcase S for SetImage, not a lowercase