简体   繁体   中英

Tess4j on netbeans

good day,

I am using Tess4j as a wrapper on java to implement Tesseract OCR.

Followed closely to tutorials and guides provided but was returned with the following errors when compiled to scan a sample image:

Exception in thread "main" java.lang.UnsatisfiedLinkError: The specified module could not be found.

    at com.sun.jna.Native.open(Native Method)
    at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:263)
    at com.sun.jna.NativeLibrary.getInstance(NativeLibrary.java:403)
    at com.sun.jna.Library$Handler.<init>(Library.java:147)
    at com.sun.jna.Native.loadLibrary(Native.java:502)
    at com.sun.jna.Native.loadLibrary(Native.java:481)
    at net.sourceforge.tess4j.util.LoadLibs.getTessAPIInstance(LoadLibs.java:77)
    at net.sourceforge.tess4j.TessAPI.<clinit>(TessAPI.java:42)
    at net.sourceforge.tess4j.Tesseract.init(Tesseract.java:367)
    at net.sourceforge.tess4j.Tesseract.doOCR(Tesseract.java:280)
    at net.sourceforge.tess4j.Tesseract.doOCR(Tesseract.java:212)
    at net.sourceforge.tess4j.Tesseract.doOCR(Tesseract.java:196)

I have already add in then necessary library as well as libtesseract304.dll and gsdll64.dll into the project.

Please refer to my structure below: 在此处输入图片说明

Thank you.

There is also a Leptonica dependency, but you don't need to include the source files of Tess4J library as there already is JAR package for it. Check out the example in the Tutorial .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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