Tessnet2 using Tesseract - Working Very Incorrectly

38 views
Skip to first unread message

ANON YMOUS

unread,
Jan 3, 2015, 6:07:25 AM1/3/15
to tesser...@googlegroups.com

Hello,

I am trying to use the Tessnet2 OCR Library in a C# program. But the results are very very off.

The following is my code in a C# console project, the Program.cs class:
static void Main(string[] args)
       
{
           
try
           
{
               
Bitmap image = new Bitmap(@"C:\Users\hp\Desktop\eurotext.tif");
               
var ocr = new Tesseract();

               
//When I tried to add SetVariable(), it still gave a wrong output

                ocr
.Init(@"C:\Program Files (x86)\Tesseract-OCR", "eng", true);
               
               
var result = ocr.DoOCR(image, Rectangle.Empty);
               
foreach (Word word in result)
                   
Console.WriteLine("{0} : {1}", word.Confidence, word.Text);


               
Console.ReadLine();
           
}
           
catch (Exception exception)
           
{
               
Console.WriteLine("Error");
           
}
       
}

For this image (a large binary 300 dpi image):

This is the Tessnet2 output:

I have been searching everywhere for a solution to this, to try to increase the accuracy of the OCR. But, no luck.

I am a beginner in this topic, so please bear with me if the solution to this problem is too trivial.

Thanks!
Reply all
Reply to author
Forward
0 new messages