I am looking for a sample code or API name from OCR (Optical Character Recognition) in Java, using which I can extract all the text from an image file. Not comparing it to any image I am making using the code below.
public class OCRTest { static String STR = ""; public static void main(String[] args) { OCR l = new OCR(0.70f); l.loadFontsDirectory(OCRTest.class, new File("fonts")); l.loadFont(OCRTest.class, new File("fonts", "font_1")); ImageBinaryGrey i = new ImageBinaryGrey(Capture.load(OCRTest.class, "full.png")); STR = l.recognize(i, 1285, 654, 1343, 677, "font_1"); System.out.println(STR); } }
java ocr
user3404566
source share