增加手法的力量

时间:2018-09-26 18:48:58

标签: c#

我正在研究一个识别图像的项目,但是,我无法通过tesseract获得100%的分析结果...我可以做些什么来提高成功率?

enter image description here

pictureBox2.Image.Save("image.bmp", System.Drawing.Imaging.ImageFormat.Bmp);

var engine = new TesseractEngine(@ "./tessdata", "eng", EngineMode.Default);

engine.SetVariable("tessedit_char_whitelist", "0123456789");

//var imgarray = ImageToByteArray(pictureBox2.Image);

var img = Pix.LoadFromFile("image.bmp");

var page = engine.Process(img);

var result = page.GetText();

label1.Text = "Confidence: " + page.GetMeanConfidence();

if (string.IsNullOrEmpty(result) || result == "\n\n")
 textBox3.Text = "Error, cant solve!";
else
 textBox3.Text = result;

0 个答案:

没有答案