← Back to team overview

sikuli-driver team mailing list archive

[Question #676733]: Error looking up function 'TessPDFRendererCreateTextonly'

 

New question #676733 on Sikuli:
https://answers.launchpad.net/sikuli/+question/676733

Hi, I need to capture text (using Tesseract OCR) from a region of the terminal window of my  Oracle VM Vbox.

 I'm using Eclipse in Ubuntu 18.04 and have:
	-  installed opencv (with cmake -D BUILD_SHARED_LIBS=ON .. & make -j4)  and tesseract (with sudo apt-get install tesseract),
	- linked libtesseract.so to /usr/lib.
	- set LD_LIBRARY_PATH environment variable to the path where libtesseract.so is.
	- Included the latest sikulixapi.jar in my Eclipse Project (and every sikulix command is working except the OCR part)

To solve the error I've tried (as recommended in https://stackoverflow.com/questions/46030022/issue-met-when-using-tess4j ): "uninstalled tesseract version 4 and installed the version 3.04 from the Ubuntu repositories. I changed the tess4j version in my pom.xml to 3.0.0",
 but still get the same error.


Here is the line of my script that produces the error (second line):
region = new Region(273, 129, 73, 250);
String sikuliText = region.text();

Error: 
Exception in thread "main" java.lang.UnsatisfiedLinkError: Error looking up function 'TessPDFRendererCreateTextonly': /usr/lib/libtesseract.so: undefined symbol: TessPDFRendererCreateTextonly
	at com.sun.jna.Function.<init>(Function.java:245)
	at com.sun.jna.NativeLibrary.getFunction(NativeLibrary.java:566)
	at com.sun.jna.NativeLibrary.getFunction(NativeLibrary.java:542)
	at com.sun.jna.NativeLibrary.getFunction(NativeLibrary.java:528)
	at com.sun.jna.Native.register(Native.java:1777)
	at com.sun.jna.Native.register(Native.java:1648)
	at com.sun.jna.Native.register(Native.java:1360)
	at net.sourceforge.tess4j.TessAPI1.<clinit>(TessAPI1.java:41)
	at org.sikuli.script.TextRecognizer.start(TextRecognizer.java:56)
	at org.sikuli.script.TextRecognizer.doOCR(TextRecognizer.java:195)
	at org.sikuli.script.TextRecognizer.doOCR(TextRecognizer.java:190)
	at org.sikuli.script.Region.text(Region.java:4840)
	at TMSconOCR.getTextByOCR(TMSconOCR.java:380)
	at TMSconOCR.main(TMSconOCR.java:237)


Am I missing something?

Thanks a lot,

Pedro.


-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.