http://www.magicandlove.com/blog/2015/11/26/processing-with-ocr/
The version I’m using: tess4j-3.4.8.jar
import net.sourceforge.tess4j.*;
import java.awt.image.BufferedImage;
Tesseract ocr;
BufferedImage img;
PImage pimg;
String res, show;
int idx;
void setup() {
size(400, 600);
background(0);
ocr = new Tesseract();
ocr.setDatapath(dataPath(""));
ocr.setLanguage("ssd");
pimg = loadImage("a4.jpg");
img = (BufferedImage) pimg.getNative();
show = "";
idx = 0;
try {
res = ocr.doOCR(img);
println(res);
}
catch (TesseractException e) {
println(e.getMessage());
}
frameRate(25);
}
I want to operate using the ‘ssd.traineddata’ used in the site above, but an error occurs.
Failed loading language 'ssd'
Tesseract couldn't load any languages!
By any chance, does anyone know the cause?