Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

tessnet init problem

I need to do an OCR of a .jpg image. I searched a lot and finally get the "tessnet2". The code looks pretty simple but I have a problem with the example :l

When I try to init the ocr, my application quits and didnt return anything. Debuging, looks like the next line is where it exits:

ocr.Init("C:\\Desarrollo\\Prueba\\ConsoleApplication1\\tessdata", "spa", false);

The first parameter its the path with "tessdata" included, isnt it? The second path is the lenguage that i want to use...

In tessdata i have the 8 files it needs.

What Im doing wrong?

Im using c# and visual studio 2010. When i try to compile it, i get an error of .net framework (i was using 4.0 and it needs 2.0, i decrease it and now compile but i get that problem).

Thanks!

like image 326
FrioneL Avatar asked Dec 28 '22 16:12

FrioneL


1 Answers

I encountered the same problem, but I found out that I had been using the language file for Tesseract 3.0 (not 2.0). When I put the files intended for 2.0, it worked.

Since you also seem to be using 2.0 SDK, download the language files for the 2.0 (http://code.google.com/p/tesseract-ocr/downloads/list). Files at the top are for 3.0. Scroll to the bottom of the list.

like image 185
ravinsp Avatar answered Dec 30 '22 09:12

ravinsp