Tesseract OCR, Python and Windows XP

Evening everyone,

I am trying to use a tesseract (OCR) python wrapper found here, with the first example: https://code.google.com/p/python-tesseract/wiki/CodeSnippets

I am using Python27, on a Windows XP machine. Everything is 32 bit.

I have installed all the dependencies, found in this guide: http://opencvpython.blogspot.com/2012/05/install-opencv-in-windows-for-python.html

I checked the environment variable: TESSDATA_PREFIX = C:Program FilesTesseract-OCRtessdata

Then finally, I try to execute the script in cmd.exe: "python.exe 119.py" (119.py being the first example in CodeSnippets, with a different image ofc), and I get the following error:

C:Python27>python.exe 119.py Error opening data file C:Program FilesTesseract-OCRtessdatatessdata/eng.trai neddata Please make sure the TESSDATA_PREFIX environment variable is set to the parent d irectory of your "tessdata" directory. Failed loading language 'eng' Tesseract couldn't load any languages!

Now, the only thing I notice here is the slash (/) instead of backslash () before the eng.traineddata, that's the bit automatically added after the environment variable. I am hoping this is the only thing that needs fixing, but I have no clue on how to do it, and that is why I am here... :)

So, seasoned programmers, binary Gods, please help me out. Thanks in advance. :)

ps

I need to be using a Windows machine for this project, so swiching to Linux as an easy way out is not an option here. :(

链接地址: http://www.djcxy.com/p/96736.html

上一篇: 在Windows上开始使用Python OCR?

下一篇: Tesseract OCR,Python和Windows XP