i'm using the tessnet2 wrapper to the Tesseract 2.04 Source on windows XP, configured it to work with x86.
TessarctTest project main function contains:
Bitmap bmp = new Bitmap(@"C:\temp\New Folder\dotnet\eurotext.tif");
tessnet2.Tesseract ocr = new tessnet2.Tesseract();
// ocr.SetVariable("tessedit_char_whitelist", "0123456789");
ocr.Init(@"C:\temp\tessdata", "eng", false);
// List<tessnet2.Word> r1 = ocr.DoOCR(bmp, new Rectangle(792, 247, 130, 54));
List<tessnet2.Word> r1 = ocr.DoOCR(bmp, Rectangle.Empty);
int lc = tessnet2.Tesseract.LineCount(r1);
when i try to run the program it crashes on the following line inside the ocr.Init
int result = m_myTessBaseAPIInstance->InitWithLanguage((char *)_tessdata.ToPointer(), NULL, (char *)_lang.ToPointer(), NULL, numericMode, 0, NULL);
Any one has an idea?
Appreciate!
For anyone still having a problem after all these, make sure if you're using tessnet2 that you download the correct language files.
You want English language data for Tesseract (2.00 and up) and not the English language data for Tesseract 3.01 version. I hope this saves you a few hours! :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With