tessnet2 加载失败

tessnet2 fails to load(tessnet2 加载失败)
本文介绍了tessnet2 加载失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 windows XP 上使用 tessnet2 包装器到 Tesseract 2.04 源,将其配置为与 x86 一起使用.

i'm using the tessnet2 wrapper to the Tesseract 2.04 Source on windows XP, configured it to work with x86.

TessarctTest 项目主要功能包含:

TessarctTest project main function contains:

        Bitmap bmp = new Bitmap(@"C:	empNew Folderdotneteurotext.tif");
        tessnet2.Tesseract ocr = new tessnet2.Tesseract();
        // ocr.SetVariable("tessedit_char_whitelist", "0123456789");
        ocr.Init(@"C:	emp	essdata", "eng", false);
        // List<tessnet2.Word> r1 = ocr.DoOCR(bmp, new Rectangle(792, 247, 130, 54));
        List<tessnet2.Word> r1 = ocr.DoOCR(bmp, Rectangle.Empty);
        int lc = tessnet2.Tesseract.LineCount(r1);

当我尝试运行程序时,它在 ocr.Init 内的以下行崩溃

when i try to run the program it crashes on the following line inside the ocr.Init

int result = m_myTessBaseAPIInstance->InitWithLanguage((char *)_tessdata.ToPointer(), NULL, (char *)_lang.ToPointer(), NULL, numericMode, 0, NULL);

有人有想法吗?

欣赏!

推荐答案

对于在所有这些之后仍然有问题的任何人,请确保如果您使用的是 tessnet2,请确保您下载了正确的语言文件.

For anyone still having a problem after all these, make sure if you're using tessnet2 that you download the correct language files.

您需要Tesseract(2.00 及更高版本)的英语语言数据,而不是Tesseract 3.01 的英语语言数据.我希望这可以为您节省几个小时!:)

You want English language data for Tesseract (2.00 and up) and not the English language data for Tesseract 3.01 version. I hope this saves you a few hours! :)

这篇关于tessnet2 加载失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

DispatcherQueue null when trying to update Ui property in ViewModel(尝试更新ViewModel中的Ui属性时DispatcherQueue为空)
Drawing over all windows on multiple monitors(在多个监视器上绘制所有窗口)
Programmatically show the desktop(以编程方式显示桌面)
c# Generic Setlt;Tgt; implementation to access objects by type(按类型访问对象的C#泛型集实现)
InvalidOperationException When using Context Injection in ASP.Net Core(在ASP.NET核心中使用上下文注入时发生InvalidOperationException)
LINQ many-to-many relationship, how to write a correct WHERE clause?(LINQ多对多关系,如何写一个正确的WHERE子句?)