To convert the image files to editable format

Hi,

Our requirement is to convert the image files to editable format and load in to a software. We tried with aspose libraries and not able to get the complete accuracy. So i just want to see the result with the actual lib. So that we can decide on purchasing the tool.

Attached with the 2 samples of image which we
are using.Please find the attached document where I have highlighted
the error text. .Kindly revert back soon.

thx.Irfan.

Hi Irfan,


Thank you for considering Aspose APIs.

I am afraid, we require more information to properly evaluate your presented scenario, and to move forward towards the correction of any possible problem in Aspose APIs. Please provide the following information.

  • Platform (.NET/Java/Cloud)
  • API version
  • Source Code to perform OCR operation

Looking forward to your kind response.

We tried with Java. We have attached the program which we tried to see the results. And the lib used is aspose-ocr-2.0-jdk16.jar

This is the source code we have used.

import com.aspose.ocr.IRecognitionBlock;

import com.aspose.ocr.ImageStream;

import com.aspose.ocr.Language;

import com.aspose.ocr.OcrEngine;

import com.aspose.ocr.RecognitionBlock;



public class ExampleOcr
{


    /**

    * @param args

*/

    public static void main(String[] args)
    {

        // TODO Auto-generated method stub

        OcrEngine ocr = new OcrEngine();

        ocr.setImage(ImageStream.fromFile("D:/AJ osptal/SpringProjects/examples/image.jpg"));

        ocr.getLanguages().addLanguage(Language.load("english"));

        IRecognitionBlock pictureBlock = RecognitionBlock.createPictureBlock(0, 0, 100, 200);

        ocr.getConfig().addRecognitionBlock(pictureBlock);

        IRecognitionBlock textBlock = RecognitionBlock.createTextBlock(110, 210, 100, 100);

        ocr.getConfig().addRecognitionBlock(textBlock);

        if (ocr.process())
        {

            System.out.println(textBlock.getRecognitionData().getText());

        }

    }


}

Hi Irfan,


Thank you for providing further details. First of all, your provided code snippet isn’t correct because you are not setting the key property OcrEngine.Resource in this snippet. Anyway, we have noticed that the current implementation of Aspose.OCR for Java isn’t able to correctly recognize all the text from the given images. The most probable reason for the inaccuracy of the results could be the resolution of your provided images. Both of your provided sample images have resolution set to 96 DPI whereas the recommended resolution for OCR operation is 300 DPI. I will look further to tweak the OcrEngine configurations in order to get accurate results out of these samples, however, it is best that you should try the same scenario with high resolution images.

Please find the below attachment of image which is been converted from 96 to 300 DPI resolution. So now can we get 100% Accuracy using this image?

thanks, irfan

Hi Irfan,


Thank you for writing back.

I am afraid, I am unable find any attachments to your recent post. Could you please re-confirm this on your end?

During my testing, I have changed the resolution of your previously provided samples images, and was unable to get the 100% accurate results so I was about to log this problem in our database for the product team’s investigation. I will wait for your samples now to re-evaluate the case before moving forward.

Hi Irfan,

I have noticed that you have attached the new sample to your original (first) post. Unfortunately, increasing the resolution of the sample image didn’t ensure the 100% accuracy of the OCR results so I have logged the problem in our bug tracking system under the ticket OCR-33898 for further investigation & correction purposes. Please spare us little time to properly analyze the problem cause, and to provide the fix for it. In the meanwhile, we will keep you posted with updates in this regard.

Note: I have attached the results to this post in a notepad file.

Java

OcrEngine ocr = new OcrEngine();
ocr.setImage(ImageStream.fromFile(dir + “convimage.jpg”));
ocr.getLanguages().addLanguage(Language.load(“english”));
ocr.setResource(new FileInputStream(resourcesFolderPath));
if (ocr.process()) {
    System.out.println(ocr.getText());
}

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