Hello everyone,
I am completely new to Python and have only limited programming experience
but hopefully you can help me out. I am usingpython-tesseract-0.7.win32-py2.7
My script processes a picture (crops, invert colors) using PIL. I then try
to send it straight into tesseract but I receive the following error:
TypeError: in method 'ProcessPagesRaw', argument 1 of type 'char const *'
My workaround has been to save the image to disk and then in the next line
opening it again. There must be a better way?
Sample code:
im = Image.open("AH.bmp")
region_bo = im.crop((1180, 280, 1280, 730))
ImageOps.invert(region_bo).save('ah31.bmp')
Img_bo = "ah31.bmp"
result_dps = tesseract.ProcessPagesRaw(Img_bo,api).splitlines( )
<http://code.google.com/p/python-tesseract/>
--
You received this message because you are subscribed to the Google
Groups "tesseract-ocr" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/tesseract-ocr?hl=en