1

I'm trying to writte code which change text from jpg to console. I used to write: tessnet2 and Tesseract-OCR (in c#). Now everthing is work fine when I have pure text, but problem is when the text is in circle like here:

enter image description here

Actually console return me this:

118 : Text
61 : 1
219 : @

Sometimes it change @ to ~(depend of size of circle). There is my code:

  var image = new Bitmap(@"D:\OCR\texttoread.bmp");
            tessnet2.Tesseract ocr = new tessnet2.Tesseract();
            ocr.Init(@"C:\tessdata", "eng", false);
            List<tessnet2.Word> result = ocr.DoOCR(image, Rectangle.Empty);
            foreach (tessnet2.Word word in result)
            {
                Console.WriteLine("{0} : {1}", word.Confidence, word.Text);
                }
                Console.Read();

Can someone tell me what I should do to read this text?

Dmitrii Z.
  • 2,287
  • 3
  • 19
  • 29
Thomas
  • 77
  • 1
  • 5

1 Answers1

0

Try Ironocr plugin and use the following. It have more accuracy I think, Hope this will help you. Please find the below code for read.

var Ocr = new AutoOcr();
var Result = Ocr.Read(bmpCrop);
string text = Result.Text; 
return text;
vijesh
  • 1,115
  • 1
  • 11
  • 27