I'm trying to use Tess4J with the following:
public static String parseImageCharacters(BufferedImage image) throws Exception {
Tesseract instance = Tesseract.getInstance();
return instance.doOCR(image);
}
but I'm getting the exeption:
java.lang.NoClassDefFoundError: com/sun/media/imageio/plugins/tiff/TIFFImageWriteParam
at net.sourceforge.tess4j.Tesseract.doOCR(Tesseract.java:237)
at net.sourceforge.tess4j.Tesseract.doOCR(Tesseract.java:221)
...
Which refers to the following line in the Tesseract class:
return doOCR(ImageIOHelper.getIIOImageList(bi), rect);
I'm using Gradle as my build tool with the dependency:
compile 'net.sourceforge.tess4j:tess4j:2.0.0'
(Any Maven solutions are fine!)
What am I missing? I've seen a few posts about including various .dll files, I thought Tess4J included all these?