Unable to read the text correctly

I tried to extract the texts from an image using Aspose OCR library. The image was an Identification Card, however Aspose was not able to read it correctly.


Here’s my code:

String imagePath = “id.jpg”;
String etalonFile = “englishStandarts.xml”;
String fontFile = “arialAndTimesAndCourierRegular.xml”;
String resourcePath = “resources.zip”;
OcrEngine ocr = new OcrEngine(resourcePath, new int[] {4, 5, 6, 7 }, etalonFile, fontFile);
ocr.getConfig().setNeedRotationCorrection(true);
File image = new File(imagePath);
ocr.setImage(image);
ILanguage language = Language.load(“english”);
ocr.getLanguages().addLanguage(language);
try{
if(ocr.process()){
System.out.println("HEY: "+ocr.getText());
}
}catch(Exception e){
System.err.println(e);
}

Instead of returning texts, it returns something like this:
HEY: 2hs!\l!+iIi!}!!i\ii1i!*!!i=!!\i~\!!-\!i+(!!\1!!

Here’s the link of the image: https://farm8.staticflickr.com/7098/7221631472_dd133f1a1d_m.jpg

Hi DM,

Thank you for using Aspose APIs.

We have carried out investigation on the said issue. Several tests have been performed on the sample image provided by you. We have used the latest version of Aspose.OCR for Java 2.4.0. It has been observed that the image supplied is of low quality (100 DPI). We are able to replicate the issue. Please, note that the issue has been logged in our issue tracking system with ID OCR-34051.

We will update you accordingly. We truly appreciate your support and understanding.


The issues you have found earlier (filed as ) have been fixed in this Aspose.Words for JasperReports 18.3 update.