class mmm { public static String myDir = "c:/temp/"; public static void main(String[] args) { // Set the paths String imagePath = "me.png"; String resourcesFolderPath = "./resources/resources"; OcrEngine ocr = new OcrEngine(); ocr.setResource(new FolderStream(resourcesFolderPath)); ocr.getConfig().setNeedRotationCorrection(false); ocr.setImage(ImageStream.fromFile(imagePath)); ILanguage language = Language.load("english"); ocr.getLanguages().addLanguage(language); try { if (ocr.process()) { System.out.println("\ranswer -> " + ocr.getText()); } } catch (Exception e) { e.printStackTrace(); } } }
"java.lang.NullPointerException at com.aspose.internal.ocr.bj.c.a(Unknown Source) at com.aspose.ocr.OcrEngine.a(Unknown Source) at com.aspose.ocr.OcrEngine.process(Unknown Source) at testing1.mmm.main(mmm.java:36)"
NULL
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)