Click here to Skip to main content
15,885,537 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
Why I am not able to recognize text in image using Tesseract? On debuggin the code after Init case the application isn't working. Required dll is also added. The exe and testdata folder compatible is set in the bin/debug folder. I am using C#3.5 too. Did so following below link:
http://www.dotnetissues.com/2011/09/ocr-in-c-using-googles-tessnet2-fetch.html[^]


My Code is as follows:

string imagename = System.Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + @"\Images\out.tif";


Bitmap image = new Bitmap(imagename);
tessnet2.Tesseract ocr = new tessnet2.Tesseract();
//ocr.SetVariable("tessedit_char_whitelist", "0123456789"); // If digit only


ocr.Init(@"D:\OCR R & D\OCR\TesseractWindowsTest\TesseractWindowsTest\bin\Debug\", "eng", false); // To

List<tessnet2.word> result = ocr.DoOCR(image, Rectangle.Empty);
foreach (tessnet2.Word word in result)
Console.WriteLine("{0} : {1}", word.Confidence, word.Text);
Posted
Updated 24-Nov-14 3:11am
v2
Comments
Sergey Alexandrovich Kryukov 24-Nov-14 10:49am    
What's not working? If everything was fine but the result of recognition was incorrect or inaccurate, it means: 1) your image or the font wasn't clear enough, and 2) tesseract is not so good product.
—SA

1 solution

You can download this Tesseract .Net wrapper: https://github.com/charlesw/tesseract[^], and run the OCR sample inside. More Tesseract wrapper links could be found on Tesseract-OCR addons[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900