I have a .net console application running in Visual Studio 10, Windows Vista Home Premium. I am trying to get the tessnet2 example to work. here is my code:
Ocr ocr = new Ocr();
using (var bmp = new Bitmap(@"C:\aaa\a-nsl\Caselines\Scanned Documents\Test_Scan_04.jpg"))
{
var tessocr = new tessnet2.Tesseract();
tessocr.Init(@"C:\Users\Paul\Documents\visual studio 2010\Projects\tessnet2Wpf\ConsoleApplication1\bin\Debug", "eng", false);
tessocr.GetThresholdedImage(bmp, Rectangle.Empty).Save("c:\\temp\\" + Guid.NewGuid() + ".bmp");
Console.WriteLine("Multithread version");
ocr.DoOCRMultiThred(bmp, "eng");
Console.WriteLine("Normal version");
ocr.DoOCRNormal(bmp, "eng");
}
The application terminates with code 1 when tessocr.Init is called.
I placed all 9-language language files in the debug directory of the application.
Not sure what else can I do?
source
share