0

在多页 tiff 文档上调用 tesseract doOcr 时会引发无效内存访问错误。数据路径设置为存在 tessdata 且 dll 存在于类文件夹中的文件夹

Exception in thread "main" java.lang.Error: Invalid memory access
    at com.sun.jna.Native.invokePointer(Native Method)
    at com.sun.jna.Function.invokePointer(Function.java:470)
    at com.sun.jna.Function.invoke(Function.java:404)
    at com.sun.jna.Function.invoke(Function.java:315)
    at com.sun.jna.Library$Handler.invoke(Library.java:212)
    at com.sun.proxy.$Proxy0.TessBaseAPIGetUTF8Text(Unknown Source)
    at net.sourceforge.tess4j.Tesseract.getOCRText(Tesseract.java:429)
    at net.sourceforge.tess4j.Tesseract.doOCR(Tesseract.java:284)
    at net.sourceforge.tess4j.Tesseract.doOCR(Tesseract.java:205)
    at net.sourceforge.tess4j.Tesseract.doOCR(Tesseract.java:189)
    at Test.main(Test.java:23)
4

0 回答 0