On Sun, Mar 25, 2012 at 3:23 PM, João Real <[email protected]> wrote:
> Hi to all,
>
> I'm having the same problem. Which is the "correct path to the language
> data"?
> If I have my project in this directory the "C:\WindowsFormsApplication1\",
> which path should I use?
> ->
> tessocr.Init(@"C:\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\tessdata",
> "eng", false);
> ->
> tessocr.Init(@"C:\WindowsFormsApplication1\WindowsFormsApplication1\tessdata",
> "eng", false
>
> By the way I downloaded the file tesseract-ocr-3.01.eng.tar.gz.
>
> Thanks in advance
The easiest solution is to set the TESSDATA_PREFIX enviroment
variable, that way you don't have to have multiple copies of the very
large tessdata directory (especially when you use Visual Studio). Make
sure that TESSDATA_PREFIX points to the *parent* directory of tessdata
*not* at tessdata itself. Also be sure to include the trailing / (or
\).
I don't know about v3.01, but with 3.02 (the latest trunk version),
there are 3 TessBaseAPI init() methods. The one that takes 3 arguments
does NOT take a boolean but an OcrEngineMode as the last arg. See
baseap.h for details. You probably want to just do something like:
int main(int argc, char **argv) {
tesseract::TessBaseAPI api;
int rc = api.Init(argv[0], "eng");
if (rc < 0)
exit(1);
...
}
While it's not done yet, also see [1] for lots of information on
building tesseract using Visual Studio 2008.
[1] http://tesseract-ocr.googlecode.com/svn/trunk/vs2008/doc/index.html
--
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