We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Not getting any meaningful OCR data

hi.

I’ve just downloaded a trial version of the OCR product. When I run it on the attached image I get “* * $” instead of the expected “J92916”. Any pointers on what I could be doing wrong?

thanks,
Jon.

Hi Jon,

Thank you for considering Aspose products.

I am afraid, I am unable to get the correct text from your provided sample image, although I have tried with different CorrectionFilters. I have logged a ticket in our bug tracking system to further investigate the problem cause and to rectify it at earliest. The ticket Id for future reference is OCR-33566. We will keep you posted with updates on this.

Below provided is my sample source code for your reference,

C#


// Image document on which OCR is to be performed
string imageFile = (MyDir + “sample.jpg”);

// Initialize OcrEngine
OcrEngine ocr = new OcrEngine();

// Configure to use Default Dictionaries
ocr.Config.UseDefaultDictionaries = true;

// Load image
ocr.Image = ImageStream.FromFile(imageFile);

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

// Correction filters
// Median filter
MedianFilter filter = new MedianFilter();
filter.Size = 5;
ocr.Config.CorrectionFilters.Add(filter);
// Noise Removal filter
ocr.Config.CorrectionFilters.Add(new RemoveNoiseFilter());

// OutPut file to store results
TextWriter outPut = new StreamWriter(MyDir+“output1.txt”);

// Load the resource file
using (ocr.Resource = new FileStream(resourceFileName, FileMode.Open))
{
try
{
// Process the whole image
if (ocr.Process())
{
outPut.WriteLine(ocr.Text);
}
}
catch (Exception ex)
{
Console.WriteLine("Exception: " + ex.Message);
}
outPut.Close();
}

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