0

I referenced tessnet lib to my project and called following code..but it exists w/o any exception on Init call

var fd = new OpenFileDialog();
        if (fd.ShowDialog() == DialogResult.OK)
        {
            var fileP = fd.FileName;
            var bmp = new Bitmap(fileP);
            var tessocr = new tessnet2.Tesseract();
            tessocr.Init(@"C:\Downloads\TesseractApp\TessApp\bin\Debug\", "eng", false);
            tessocr.GetThresholdedImage(bmp, Rectangle.Empty).Save("c:\\Downloads\\" + Guid.NewGuid() + ".bmp");
        }

get the project from here http://ge.tt/5AqxgSN/v/0?c

Prashan Fernando
  • 281
  • 4
  • 11

1 Answers1

0

The first parameter of Init specifies the location of language data files (.inttemp, .normproto, etc.). So be sure to copy them to the Debug folder when you build the project.

nguyenq
  • 8,212
  • 1
  • 16
  • 16