3

I am using picture

enter image description here

And i want to recognize numbers from it

var engine = new TesseractEngine(@"./tessdata", "eng", EngineMode.TesseractOnly);
engine.SetVariable("tessedit_char_whitelist", "0123456789");
var img = Pix.LoadFromFile(@"D:/Ex.png");
var page = engine.Process(img);
var text = page.GetText();
Console.Write("Press any key to continue . . . ");
Console.ReadKey(true);

Result is very bad 31 3 963 How to improve it?

Loïc Sombart
  • 230
  • 5
  • 19
A191919
  • 3,422
  • 7
  • 49
  • 93

1 Answers1

0

You can train your own tessdata file using your pic replacing the eng. Download the source code of tesseract-ocr from github(https://github.com/tesseract-ocr/tesseract),and read the wiki(https://github.com/tesseract-ocr/tesseract/wiki/Training-Tesseract-3.00–3.02) ,it can help you to train your tessdata. Hope it helps.

ZhyZhao
  • 1
  • 1