简体   繁体   English

Tess4J,未找到tessdata

[英]Tess4J, not finding tessdata

So I am working on this project and I need to use tess4J inorder to read some text on some images. 因此,我正在从事这个项目,我需要使用tess4J才能读取某些图像上的一些文本。 Unfortunatly i can not seem to resolve the following error: 不幸的是,我似乎无法解决以下错误:

Error opening data file C:\Users\****\eclipse workspace\****\tessdata\eng.traineddata Please make sure the TESSDATA_PREFIX environment variable is set to your "tessdata" directory. Failed loading language 'eng' Tesseract couldn't load any languages!

The path for the tessdata folder is given using instance.setDatapath("C:\\\\Users\\\\****\\\\eclipse workspace\\\\****\\\\tessdata\\\\") 使用instance.setDatapath("C:\\\\Users\\\\****\\\\eclipse workspace\\\\****\\\\tessdata\\\\")来指定tessdata文件夹的路径

Where instance is ITesseract instance = new Tesseract(); 如果实例是ITesseract instance = new Tesseract();

Any help to resolve this issue is appreciated. 感谢您为解决此问题提供的任何帮助。

Thank you 谢谢

Make sure your eng.traineddata file is not corrupted and of the correct version. 确保您的eng.traineddata文件未损坏且版本正确。 If it is for Tesseract 4.0, use either fast or best. 如果它适用于Tesseract 4.0,请使用快速或最佳方式。

https://github.com/tesseract-ocr https://github.com/tesseract-ocr

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM