java tess4j训练库,包括Tess4J到Java项目作为在Eclipse库

I have an so far empty and clean Eclipse Java project.

What do I have to do to use Tess4J as library for my web service that I want to develop?

Is it even possible to use it as library for an Android project? (would be shortcutting a lot) There is an issue regarding .tif with android that I came across.

Tess4J is a wrapper for native code, because tesseract-ocr is written in C/C++. That I've got so far. But how to include this wrapper into my project?

I've googled a lot until I have decided to drop tesseract.Net, beacuse this project is badly maintained/documented and would force me to C# (which would be okay), but I didn't manage to get it to work, so I had to default to C/C++ (which is not okay) ;)

I'm kind of lost right now, so any help is welcome.

regards.

Edit: followed the steps mentioned here (answer from nguyenq)

1: new Eclipse workspace

2: created a new dir called lib

3: copied \Tess4J\dist\tess4j.jar, \Tess4J\lib\jna.jar and \Tess4J\lib\jai_imageio.jar into lib (2)

4: created a new Java project in Eclipse

5: in project properties (4) I added the .jars from (3) to Java build path as external jars under libraries

6: I copied the dir \tessdata and libtesseract302.dll into the project root dir \workspace\project\

7: I created a new class Main and instantiated a Tesseract1 tesseract = new Tesseract1(); for testing

8: I run the application but an Exception was thrown: Exception in thread "main" java.lang.UnsatisfiedLinkError: Unable to load library 'libtesseract302' Module not found

Edit2:

7.1: I created a new class Main and instantiated a Tesseract tesseract = new Tesseract.getInstance(); for testing (source: here)

8.1: looked okay so far, but no logic implemented, just tried to build it.

Edit3:

9: nope, doesn't work. Still UnsatisfiedLinkError. Could it may be an issue regarding 32-bit vs. 64-bit?

I'am working on Win7 64bit.

解决方案

Follow the steps described in the following link to get Tess4J to run in Eclipse:

I'm not sure the library would run on Android because it seems JNA support on the platform is not there yet.

If you want a .NET wrapper for Tesseract 3.01, take a look at https://github.com/charlesw/tesseract-ocr-dotnet.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值