我正在使用 Java 中的 OCR 进行一个项目,并且遇到了 Tess4j。我在 Mac 上使用 netbeans,似乎没有任何可用的初学者信息。我真的需要安装 Tesseract 才能使用 Tess4j 吗?如果是这样,当我分发我的软件时,我的用户是否必须先安装 Tesseract?我已按照此处的说明进行操作:http: //tess4j.sourceforge.net/tutorial/但我收到以下错误消息:
Exception in thread "main" java.lang.UnsatisfiedLinkError: Unable to load library 'tesseract': Native library (darwin/libtesseract.dylib) not found in resource path ([file:/Users/unknown1/Desktop/Tess4J/lib/jai_imageio.jar, file:/Users/unknown1/Desktop/Tess4J/lib/jna.jar, file:/Users/unknown1/Desktop/Tess4J/lib/commons-io-2.4.jar, file:/Users/unknown1/Desktop/Tess4J/build/classes/, file:/Users/unknown1/NetBeansProjects/TesseractExample/build/classes/])
at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:271)
at com.sun.jna.NativeLibrary.getInstance(NativeLibrary.java:398)
at com.sun.jna.Library$Handler.<init>(Library.java:147)
at com.sun.jna.Native.loadLibrary(Native.java:412)
at com.sun.jna.Native.loadLibrary(Native.java:391)
at net.sourceforge.tess4j.util.LoadLibs.getTessAPIInstance(LoadLibs.java:78)
at net.sourceforge.tess4j.TessAPI.<clinit>(TessAPI.java:40)
at net.sourceforge.tess4j.Tesseract.init(Tesseract.java:360)
at net.sourceforge.tess4j.Tesseract.doOCR(Tesseract.java:273)
at net.sourceforge.tess4j.Tesseract.doOCR(Tesseract.java:205)
at net.sourceforge.tess4j.Tesseract.doOCR(Tesseract.java:189)
at tesseractexample.TesseractExample.main(TesseractExample.java:16)
/Users/unknown1/Library/Caches/NetBeans/8.1/executor-snippets/run.xml:53: Java returned: 1
BUILD FAILED (total time: 9 seconds)
有什么想法我需要做什么吗?