On Thu, Apr 25, 2013 at 2:23 AM, Xander Cage <[email protected]> wrote:

> I am trying to use tesseract with Python in a win7 environment.



I've never done this (I have used leptonica from Python), but here's some
suggestions.

1) Grown your own up to date solution:

Basically, you use the Python ctypes module --- the documentation is at [1]
for Python 3.x, or [2] for Python 2.x (read these *carefully* and you'll
learn everything you need to know) --- the appropriate libtesseract DLL,
and capi.h [3].

An alternative is using boost python [4] if you want to try accessing
libtesseract via the C++ interface (baseapi.h).

Some people on the python mailing list [5] tend to suggest Cython [6] when
this sort of question comes up.

Frankly, I would never attempt this myself without becoming very familiar
with using libtesseract from C/C++ first. Otherwise it can be difficult to
know what *should* be happening and therefore distinguish Python calling
issues from incorrect libtesseract usage (or bugs).

As I mentioned in another recent post, you can still get Visual Studio 2008
Express free from here [7] if you want to try C/C++. Also then read my
(somewhat out of date) "Visual Studio 2008 Developer Notes for
Tesseract-OCR" docs [8].

Or...

2) Try python-tesseract [9] even though it's not the latest version of
tesseract (but once you understand how it works it can probably be updated
without too much trouble).


[1] http://docs.python.org/3/library/ctypes.html

[2] http://docs.python.org/2/library/ctypes.html

[3] http://code.google.com/p/tesseract-ocr/source/browse/trunk/api/capi.h

[4] http://www.boost.org/doc/libs/1_53_0/libs/python/doc/

[5] http://mail.python.org/mailman/listinfo/python-list

[6] http://cython.org/

[7] [2]
http://download.microsoft.com/download/E/8/E/E8EEB394-7F42-4963-A2D8-29559B738298/VS2008ExpressWithSP1ENUX1504728.iso

[8] http://tesseract-ocr.googlecode.com/svn/trunk/vs2008/doc/index.html

[9] https://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

--- 
You received this message because you are subscribed to the Google Groups 
"tesseract-ocr" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to