← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #698268]: OCR from file

 

Question #698268 on SikuliX changed:
https://answers.launchpad.net/sikuli/+question/698268

Máté Bálint posted a new comment:
Thank you, but I need some help again.
I wrote a simple app (just print the textRead string), but an exception come up.

Error opening data file C:\Users\Bálint István\AppData\Roaming\Sikulix\SikulixTesseract\tessdata/eng.traineddata
Please make sure the TESSDATA_PREFIX environment variable is set to your "tessdata" directory.
Failed loading language 'eng'
Tesseract couldn't load any languages!
Exception in thread "main" java.lang.Error: Invalid memory access
        at net.sourceforge.tess4j.TessAPI1.TessBaseAPIGetUTF8Text(Native Method)
        at net.sourceforge.tess4j.Tesseract1.getOCRText(Tesseract1.java:497)
        at net.sourceforge.tess4j.Tesseract1.doOCR(Tesseract1.java:303)
        at net.sourceforge.tess4j.Tesseract1.doOCR(Tesseract1.java:276)
        at net.sourceforge.tess4j.Tesseract1.doOCR(Tesseract1.java:257)
        at net.sourceforge.tess4j.Tesseract1.doOCR(Tesseract1.java:241)
        at org.sikuli.script.TextRecognizer.doRead(TextRecognizer.java:376)
        at org.sikuli.script.TextRecognizer.readText(TextRecognizer.java:335)
        at org.sikuli.script.OCR.readText(OCR.java:710)
        at org.sikuli.script.OCR.readText(OCR.java:695)
        at org.sikuli.script.Image.text(Image.java:1381)
        at hu.webnode.zodey.App.main(App.java:8)

How can i set the " TESSDATA_PREFIX environment variable" to the
"tessdata" directory?

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