Can't OCR an Image Using Sample Code

Using the following code with the attached image, the text it outputs reads:

Text recognized.\n-r>5!c-<** v*****^^-~***

I downloaded the resource file from here http://www.aspose.com/community/files/51/.net-components/aspose.ocr-for-.net/category1404.aspx

What can I do to make it read the text properly?

Ref. Recognition|Documentation

// Resource file

const string resourceFileName = @“C:\Users\cle1394\Desktop\Aspose.OCR.Resouces.zip”;

// Source file: the file on which OCR will be performed

string imageFile = @“C:\Users\cle1394\Desktop\Google-Docs-Revamped-Document-Editor-Gets-Some-Major-New-Features-5.jpg”;

Console.WriteLine("Performing OCR on " + imageFile + “…”);

// Initialize OcrEngine

OcrEngine ocr = new OcrEngine();

// Set the image

ocr.Image = ImageStream.FromFile(imageFile);

// Add language

ocr.Languages.AddLanguage(Language.Load(“english”));

// Load the resource file

using (ocr.Resource = new FileStream(resourceFileName, FileMode.Open))

{

try

{

// Process the whole image

if (ocr.Process())

{

// Get the complete recognized text found from the image

Console.WriteLine(“Text recognized./n” + ocr.Text);

}

}

catch (Exception ex)

{

Console.WriteLine("Exception: " + ex.Message);

}

}

Hi Dominic,


Thanks for your inquiry. I’m afraid currently Aspose.OCR recognition accuracy of big font sizes i.e. 32pts and above is 90% and smaller font sizes have less accuracy. Our development team is already working over the issue of smaller font recognition, OCR-29048. We’ll update you as soon as its resolved.

We are sorry for the inconvenience caused.

Best Regards,

That explains that; but why won’t it work for the image I attached below (which has really big text)?


It just says, j[$[[[

Hi there,


Thanks for your feedback. I’m afraid Aspose.OCR is still an early stage product. Currently it doesn’t support image with color background. However, we’ve already logged a feature request for the requirement in our issue tracking system as OCR-33146. We’ll update you via this forum thread as soon as it is resolved.


We are sorry for the inconvenience.


Best Regards,

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