0

Downloading and using tessData-best for tesseract-ocr github repository improved my accuracy for english on Tess4j 3.8.4 significantly. But to use that trainedData for other languages i had to upgrade to Tess4J 4.0.0. But When I did that its giving me following error on this line

TessBaseAPI api = TessAPI1.TessBaseAPICreate();


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.Native.open(Native.java:1759)
    at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:260)
    at com.sun.jna.NativeLibrary.getInstance(NativeLibrary.java:398)
    at com.sun.jna.Native.register(Native.java:1396)
    at com.sun.jna.Native.register(Native.java:1156)
    at net.sourceforge.tess4j.TessAPI1.<clinit>(TessAPI1.java:41)
    at OCR.confidenceWord(OCR.java:106)
    at OCR.processImg(OCR.java:381)
    at test.main(test.java:10)

I have 64-bit windows 8.1 running on my machine with 64-bit JVM. I have VC++ 2015 redistributable installed. I checked in dependency walker and no dll seems to be missing.By setting system property "jna.debug.load" to "true", I can see it properly looks for and gets "libtesseract400" at temp folder. Has anyone been able to solve this error?

  • this error may occur because you are trying to load a 32bit dll into a 64bit JVM . Try use a 32bit JVM installation and the error will disappear. I have also suffered from this issue too before – Joseph Peter Jun 26 '18 at 08:25
  • @JosephPeter As seen in dependency walker; "libtesseract400" is 64-bit dll. Also it is extracted to "win32-x86-64" folder. So , i guess that might not be the issue. Any other suggestions? – Kiran Sonar Jun 26 '18 at 08:35

0 Answers0