Boa Noite, estou tentando extrair texto de um imagem usando o Tess4j, mas o seguinte erro tem acontecido:
Error opening data file ./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 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:495)
at net.sourceforge.tess4j.Tesseract.doOCR(Tesseract.java:358)
at net.sourceforge.tess4j.Tesseract.doOCR(Tesseract.java:227)
at net.sourceforge.tess4j.Tesseract.doOCR(Tesseract.java:194)
at Main.ExtractMain.extractOCR(ExtractMain.java:35)
at Main.ExtractMain.main(ExtractMain.java:114)
vdd, criei essa pasta a adcionei os dados nela…rodou certinho agora…hehe