1

I'm following the steps:

  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

if I call the class from lib using:

tessnet2.Tesseract ocr = new tessnet2.Tesseract(); 

I'm getting the following error:

Name Namespace or type 'tessnet2' could not be found. Need a using directive or a set of reference Modules (assembly)?

How I solve this?

Thanks!

The Mask
  • 17,007
  • 37
  • 111
  • 185

2 Answers2

1

There are two DLL versions for tessnet2: 32- and 64-bit. Make sure you add the correct one to your project. Check VietOCR.NET 2.0x for a working example of using tessnet2.

nguyenq
  • 8,212
  • 1
  • 16
  • 16
0

The error says that it can't find the namespace - even though you've added a reference to it, do you either name it using the full namespace, or can you include it as a "using" at the top of the cs file?

For reference, the translated error (from Portuguese) is:

Namespace or type 'tessnet2' could not be found. Need a using directive or an assembly reference (assembly)?

SqlRyan
  • 33,116
  • 33
  • 114
  • 199