我開始Asprise Java技術。 我想使用將圖像轉換爲文本(OCR)的方法。配置OCR JAVA Asprise
import com.asprise.util.ocr.OCR;
public class Test {
public static void main(String[] args) throws IOException {
BufferedImage image = ImageIO.read(new File("D:\\HEAD2.png"));
String s = new OCR().recognizeEverything(image);
// prints the results.
System.out.println("RESULTS: \n"+ s);
}
}
,但我覺得這些錯誤
Exception in thread "main" java.lang.UnsatisfiedLinkError: C:\WINDOWS\system32\AspriseOCR.dll: Can't find dependent libraries
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(Unknown Source)
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.loadLibrary0(Unknown Source)
at java.lang.System.loadLibrary(Unknown Source)
at com.asprise.util.ocr.OCR.loadLibrary(OCR.java:247)
at com.asprise.util.ocr.OCR.<init>(OCR.java:56)
我下載的文件Asprise OCR-Java的4.0 Windows_XP_32bit
我在Eclipse項目librairy添加aspriseOCR.jar文件
我還將AspriseOCR.dll文件添加爲C :. \ WINDOWS \ SYSTEM32但沒有任何反應..謝謝你幫我
[如何修復一個UnsatisfiedLinkError(找不到依賴庫)在一個JNI項目](http://stackoverflow.com/questions/6092200/how-to-fix-an-unsatisfiedlinkerror-cant-找到相關的庫-IN-A-JNI-PRO) – user93353
我有添加這些對DLL到C:\ Windiows \ SYSTEM32 \ 複製 - AspriseOCR.dll - DevIL.dll - ILU.dll 和它工作正常現在 –
http://stackoverflow.com/questions/3042854/what-is-the-abbreviation-of-java-language –