Tessnet-在我的项目中引用-应用程序在Init调用中退出



我在项目中引用了tessnet lib,并调用了以下代码。。但它存在,在Init调用时没有任何异常

var fd = new OpenFileDialog();
        if (fd.ShowDialog() == DialogResult.OK)
        {
            var fileP = fd.FileName;
            var bmp = new Bitmap(fileP);
            var tessocr = new tessnet2.Tesseract();
            tessocr.Init(@"C:DownloadsTesseractAppTessAppbinDebug", "eng", false);
            tessocr.GetThresholdedImage(bmp, Rectangle.Empty).Save("c:\Downloads\" + Guid.NewGuid() + ".bmp");
        }

从这里获取项目http://ge.tt/5AqxgSN/v/0?c

Init的第一个参数指定语言数据文件(.intemp、.normproto等)的位置。因此,在构建项目时,请确保将它们复制到Debug文件夹中。

相关内容

最新更新