Error on Init() Call?

1,134 views
Skip to first unread message

wilso132

unread,
Jun 25, 2009, 12:24:46 PM6/25/09
to tesseract-ocr
I've attempted to use the TesseractOCR.exe (32 bit version) with no
success as it crashes upon clicking "Do OCR". I've also tried to
integrate it into my C# application (VS 2005) using the following:

tessnet2.Tesseract tessocr = new tessnet2.Tesseract();
tessocr.Init(@tessDataPath, "eng",
false);

and also:

tessnet2.Tesseract tessocr = new tessnet2.Tesseract();
tessocr.Init(null, "eng", false);

Both of these crash immediately with no error message following the
Init() call. I do have all the appropriate runtimes as indicated on
the site and in the read me file. I also have a "tessdata" directory
that includes a subfolder "eng" to match appropriately with the calls
in both my application and the provided exe.

What am I missing?

wilso132

unread,
Jun 25, 2009, 12:26:02 PM6/25/09
to tesseract-ocr
Please note I'm referring to the Tessnet2 wrapper (http://www.pixel-
technology.com/freeware/tessnet2/). I didn't realize the link from
that site went directly to the Tesseract group instead of one for it's
own.

Remi Thomas

unread,
Jun 30, 2009, 4:23:00 AM6/30/09
to tesseract-ocr
Hi,

Don't put tessdata files in a sub directory eng.

D:\temp\tessdata>dir /b
fra.DangAmbigs
fra.freq-dawg
fra.inttemp
fra.normproto
fra.pffmtable
fra.unicharset
fra.user-words
fra.word-dawg

For this example Init(@"d:\temp\tessdata", "fra", false)

If you still have the problem, the fastest way to find it is to use
FileMon
http://technet.microsoft.com/en-us/sysinternals/bb896642.aspx

Set a filter with tessdata value and start your app. You should see
where the files are looked at.
Tesseract uses C++ Exit(); when having problem to find tessdata files,
this

Remi
> > What am I missing?- Hide quoted text -
>
> - Show quoted text -

74yrs old

unread,
Jun 30, 2009, 5:15:00 AM6/30/09
to tesser...@googlegroups.com, nguyenq
Remi,
I followed your instructions, by putting kan.tessdata files under C:\temp\tessdatafiles\kannada.
Successfully run kannada image output is Ok - vide jpg files attached. In this context,
I like to point out that output of the two lines of image is Ok. whereas more than twolines image - it generate encounter exe error.
Request for valuable guidance.
With regards,
-sriranga(76yrsold).
1tessnet2.JPG
2tessnet2.JPG
Reply all
Reply to author
Forward
0 new messages