有OCR tessnet C#的问题 [英] Having Problem with OCR tessnet C#
本文介绍了有OCR tessnet C#的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
嗨伙计我尝试使用tessnet ORC将简单文本图像转换为文本(字符串)但是当我尝试做任何事情时我的意思是当我调用此任何功能时我的应用程序自动关闭我无法使用它请帮助我出去
谢谢
解决方案
图片真的很简单这里是图片链接 http://i41.tinypic.com/2cynvvo.jpg [ ^ ]
当我尝试这种方法时应用程序关闭
位图位= 新位图(ofd.OpenFile( ));
tessnet2.Tesseract OCR = new tessnet2.Tesseract();
// 应用程序如果我删除此代码,请关闭此处..
OCR .Init( D:\ tessdata, eng, false );
// 申请截止此处!
列表< tessnet2.word> r1 = OCR.DoOCR(bit,Rectangle.Empty);
foreach (tessnet2.Word res in r1)
{
textBox1.Text + = res.Confidence;
}
< / tessnet2.word >
不使用ocr来自tessnet,但也许你忘记了初始化的扩展?我会解释为什么它在Init()之后崩溃而没有真正做某事。
我认为tessdata是英语单词的字典,我是对的?
OCR.Init( D:\tessdata.JPG \ .DAT \\某些扩展名, eng , false );
最诚挚的问候
遇到OCR tessnet C#问题 [ ^ ]
Hi Folks I try to use tessnet ORC for convert simple text image to text(string) but when i try to do any with I mean when i call any function of this my application closed automatically I am unable to use it please help me out
Thanks
解决方案
Image is really simple here is image link http://i41.tinypic.com/2cynvvo.jpg[^]
and when I try this method my application closed
Bitmap bit = new Bitmap(ofd.OpenFile()); tessnet2.Tesseract OCR = new tessnet2.Tesseract(); // Application Close here if I remove this code so.. OCR.Init("D:\tessdata", "eng", false); // Appliction close here! List<tessnet2.word> r1 = OCR.DoOCR(bit, Rectangle.Empty); foreach (tessnet2.Word res in r1) { textBox1.Text += res.Confidence; } </tessnet2.word>
Hi,
don't used ocr from tessnet yet, but maybe you forgot the extension on initialzing ? would explain why it's crashing after Init() without really doing something.
I think tessdata is some "dictionary" of english words, I'm right?
OCR.Init("D:\tessdata.JPG\.DAT\some kind of extension", "eng", false);
With Best Regards
Having Problem with OCR tessnet C#[^]
这篇关于有OCR tessnet C#的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文