tess4j error

965 views
Skip to first unread message

Meir Julian

unread,
Apr 3, 2016, 11:23:18 AM4/3/16
to tesseract-ocr
I'm trying to add tess4j to my java project in netbeans.
I tried the 2 following guides: 

I'm getting an error: 

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.TessAPI.<clinit>(TessAPI.java:45)
at net.sourceforge.tess4j.Tesseract.init(Tesseract.java:283)
at net.sourceforge.tess4j.Tesseract.doOCR(Tesseract.java:219)
at net.sourceforge.tess4j.Tesseract.doOCR(Tesseract.java:168)
at net.sourceforge.tess4j.Tesseract.doOCR(Tesseract.java:152)
at testocr.TestOcr.main(TestOcr.java:45)
Java Result: 1

I tried looking for a solution but without any success. 

Does anyone have an idea?
By the way, if you have any other idea for OCR beside tess4j that compatible to java in windows, I'm open to suggestions (as long as there is a guide for that),

Thank you! 

Quan Nguyen

unread,
Apr 3, 2016, 2:43:19 PM4/3/16
to tesseract-ocr
What version of tess4j? Do you have VC++ 2013 installed?
Message has been deleted

Meir Julian

unread,
Apr 4, 2016, 8:20:15 AM4/4/16
to tesseract-ocr
hi,
i have 3.1 version and installed the VC++

Hussein Al-Omari

unread,
Apr 4, 2016, 12:12:48 PM4/4/16
to tesser...@googlegroups.com
Hello,

I have an excellent preprocessor and line segmentation engine and looking for good recognition engines or single clean line images with one line of text and no graphics and no skew.  If you know of any please let me know.

Hussein

Quan Nguyen

unread,
Apr 4, 2016, 4:59:58 PM4/4/16
to tesseract-ocr
Verify that the DLLs are extracted to C:\Users\YourUserName\AppData\Local\Temp\tess4j folder to make sure that your system allows DLLs to be copied to system Temp directory.

Meir Julian

unread,
Apr 4, 2016, 5:44:17 PM4/4/16
to tesseract-ocr
the two DLL files are there: libtesseract304.dll, gsdll64.dll.

maybe something else?

thanks



בתאריך יום שני, 4 באפריל 2016 בשעה 23:59:58 UTC+3, מאת Quan Nguyen:

Quan Nguyen

unread,
Apr 5, 2016, 5:34:09 PM4/5/16
to tesseract-ocr
Yes, there should also be liblept172.dll, extracted from lept4j-1.1.2.jar.

Meir Julian

unread,
Apr 6, 2016, 12:28:25 AM4/6/16
to tesseract-ocr
Hi,
I put this dll file too in source and Temp\tess4 folders
Is there anything else?

Thanks.



בתאריך יום רביעי, 6 באפריל 2016 בשעה 00:34:09 UTC+3, מאת Quan Nguyen:

Quan Nguyen

unread,
Apr 6, 2016, 8:33:09 AM4/6/16
to tesseract-ocr
The DLLs are to be extracted automatically to Temp folder during runtime -- you don't need to manually copy them.

You may want to put breakpoints in the source and trace through your program execution.

Mostafa Sayed

unread,
Apr 6, 2016, 1:14:37 PM4/6/16
to tesseract-ocr
Put the "tessdata" folder in the project directory that contains " .traineddata" files, also put the images that u want to scan them in the project directory too.

Meir Julian

unread,
Apr 6, 2016, 5:00:59 PM4/6/16
to tesseract-ocr
Thank you for all!!  it's working!!



בתאריך יום רביעי, 6 באפריל 2016 בשעה 20:14:37 UTC+3, מאת Mostafa Sayed:

Mostafa Sayed

unread,
Apr 6, 2016, 6:55:05 PM4/6/16
to tesseract-ocr
Good (Y).

How you solved it, or where was the error ? 

Meir Julian

unread,
Apr 6, 2016, 7:04:44 PM4/6/16
to tesseract-ocr



בתאריך יום חמישי, 7 באפריל 2016 בשעה 01:55:05 UTC+3, מאת Mostafa Sayed:
Reply all
Reply to author
Forward
0 new messages