96 DPI Resolution Image Processing

Hi,
I’m trying to process OCR images, which are in 96 DPI resolution, can you please let me know how i can process those images.

As per ASPOSE documentation, image processing works fine for 300 DPI resolution, but most of our images are in 96 DPI.

Please let me know, how i can resolve this issue.

Thanks and Regards,
Suresh Kumar M

@manisuresh84

Would you kindly share your sample image with us. Also please share which platform you are working in e.g. .NET/Java. We will test the scenario in our environment and address it accordingly.

Please find the attached 96 DPI image.
i’m working on Java application, but we do have other application in .NET, which also use Aspose library.20140410220231!Fontsizes-px-96dpi.png (6.7 KB)

@manisuresh84

Would you kindly also share the screenshot of output which API produced at your side along with the sample code snippet. We will further proceed to assist you accordingly.

Please find below the code snippets and screenshot for your reference.

Code Snippets

package com.aspose.ocr.examples.OcrFeatures;

import com.aspose.ocr.ImageStream;
import com.aspose.ocr.OcrEngine;
import com.aspose.ocr.examples.Utils;

public class PerformOCROnImage {

public static void main(String[] args) throws Exception {

	com.aspose.pdf.License pdfLicense = new com.aspose.pdf.License();
	com.aspose.ocr.License ocrLicense = new com.aspose.ocr.License();
	final String ASPOSE_TOTAL_LICENSE_PATH = "C:\\Users\\manis4\\Documents\\Suresh\\POC\\Aspose.OCR-for-Java-master\\Aspose.OCR-for-Java-master\\Examples\\src\\main\\resources\\license\\Aspose.Total.Java.lic";
	try {
		// InputStream asposeTotalIsForPDF =
		// PerformOCROnPDF.class.getClassLoader().getResourceAsStream(ASPOSE_TOTAL_LICENSE_PATH);
		pdfLicense.setLicense(ASPOSE_TOTAL_LICENSE_PATH);
		ocrLicense.setLicense(ASPOSE_TOTAL_LICENSE_PATH);
	} catch (Exception e) {
		System.out.println("Exception occurred while setting license path : " + e.getMessage());
	}

	// ExStart:PerformOCROnImage
	// The path to the documents directory.
	String dataDir = Utils.getSharedDataDir(PerformOCROnImage.class);

	// The image path
	String imagePath = dataDir + "20140410220231!Fontsizes-px-96dpi.png";// "Sampleocr.bmp";

	// Create an instance of OcrEngine
	OcrEngine ocr = new OcrEngine();

	// Set the Image property
	ocr.setImage(ImageStream.fromFile(imagePath));

	// Perform OCR and get extracted text
	try {
		if (ocr.process()) {
			System.out.println(ocr.getText());
		}
	} catch (Exception e) {
		e.printStackTrace();
	}
	// ExEnd:PerformOCROnImage
}

}
OutputScreenshot.PNG (37.2 KB)

@manisuresh84

Thanks for providing necessary details.

An issue with the ticket ID OCRNET-53 has been logged in our issue tracking system for this requirement of yours. We will surely check this issue in details and keep you posted with the status of its rectification. Please be patient and spare us little time.

We are sorry for the inconvenience.