new to tessnet2

1,704 views
Skip to first unread message

serpenthill

unread,
Jan 10, 2010, 5:29:00 AM1/10/10
to tesseract-ocr
Hi,
i recently started a project that requires ocr and I found tessnet to
meet my requirements. The problem is that I just can't seem to make it
work.

I'm using vs 2010 beta and followed the steps from
www.pixel-technology.com/freeware/tessnet2/ :

Quick Tessnet2 usage
1.Download binary here, add a reference of the assembly Tessnet2.dll
to your .NET project.
2.Download language data definition file here and put it in tessdata
directory. Tessdata directory and your exe must be in the same
directory.
3.Look at the Program.cs sample

I'm not really sure how the tessdata directory should be, but I'm
assuming that I have to create a folder named "tessdata" and in that
folder have an other folder "eng", (the language definition file I
downloaded). But where should this be? Feks when I'm developping in vs
should it be in the bin->debug->tessdata->eng?

First of all after searching the web I found that the app.config file
must be made. After that fix the program starts, but initilizing the
ocr functions makes the program exit without any warning or exception.

Stepping through the project I find the tessnet2.cpp file is missing
or not at it's original location (z:\dev\interne\cs\tesseract-ocr-svn
\dotnet\tessnet2.cpp). This happens when i try to ocr.Init... this
also happens when running lothars example (which also has an error on
line 40: "ocr.Init(cboLang.SelectedItem.ToString(), False)" where a
string is missing).

Am I missing some file(s)? Have I forgot to run some procedure?

I'm greatful for any reply that helps me find a solution to my
problems.

rthomas

unread,
Jan 12, 2010, 1:54:40 AM1/12/10
to tesseract-ocr
Hi,

tessnet2.Tesseract.Init changed to have the ability to specify full
path.
Because tesseract append "tessdata" to the path, you must:
- set the path to lower directory, for example if your english
definition files are in c:\temp\tessdata then first argument is c:
\temp
- Your definition files must be in a directory named tessdata, you
can't have something like c:\temp\tessdata\eng or another name than
tessdata

Remi

serpenthill

unread,
Jan 12, 2010, 2:56:33 PM1/12/10
to tesseract-ocr
Ok, thanks, but the problem is still the missing tessnet2.cpp file
originally located in z:\dev\interne\cs\tesseract-ocr-svn\dotnet
\tessnet2.cpp. Do you know how I can address this problem?

rthomas

unread,
Jan 15, 2010, 1:41:37 AM1/15/10
to tesseract-ocr
I checked, the file is availble in
http://www.pixel-technology.com/freeware/tessnet2/dotnet.rar

On Jan 12, 8:56 pm, serpenthill <hans.kristian.ormb...@gmail.com>
wrote:

Coy Durie

unread,
Jan 15, 2010, 4:12:28 AM1/15/10
to tesser...@googlegroups.com
I changed the SetVariable as follows in tessnet2.cpp
int tessnet2::Tesseract::Init(String^ tessdata, String^ lang, bool numericMode)
from
        SetVariable("m_data_sub_dir", "\\");

        SetVariable("m_data_sub_dir", "tessdata/");


and still receive Unable to load unicharset file C:/Users/User/Documents/Visual Studio 2008/Projects/Project/Project/bin/tessdata/eng.unicharset

That file exists at that path... Not sure where to go from here.

--
You received this message because you are subscribed to the Google Groups "tesseract-ocr" group.
To post to this group, send email to tesser...@googlegroups.com.
To unsubscribe from this group, send email to tesseract-oc...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/tesseract-ocr?hl=en.




scMad

unread,
Jan 15, 2010, 4:30:42 AM1/15/10
to tesseract-ocr
Sorry, I replied to the wrong topic, i was referring to my topic.

rthomas

unread,
Jan 15, 2010, 8:37:50 AM1/15/10
to tesseract-ocr
> - set the path to lower directory, for example if your english
> definition files are in c:\temp\tessdata then first argument is c:
> \temp

My answer was incorrect.
The correct path is c:\temp\tessdata.
Check you have the 8 mandatory files
fra.DangAmbigs
fra.freq-dawg
fra.inttemp
fra.normproto
fra.pffmtable
fra.unicharset
fra.user-words
fra.word-dawg

Rémi

serpenthill

unread,
Jan 17, 2010, 2:36:18 PM1/17/10
to tesseract-ocr
Ok, thanks for all the replies. The ocr works in my app now ;) only
problem now is that the recognition isn't too good, but I guess it'll
get better in the future.

Jorge Muñiz

unread,
Feb 18, 2014, 1:05:39 PM2/18/14
to tesser...@googlegroups.com
Hello, I need your help, I have the same issue that you had the "but the problem is still the missing tessnet2.cpp file

originally located in z:\dev\interne\cs\tesseract-ocr-svn\dotnet
\tessnet2.cpp. Do you know how I can address this problem?" error
 
How do you fix the problem?
Reply all
Reply to author
Forward
0 new messages