OCR Numbers only

Good day,


is the .NET OCR libarary able to recognize the numbers given in my sample image?

It is always a 5 digit number in the first and one digit in the second row.

Using the one Example for Aspose.OCR I was unable to do so. Which language from the Resources is the right one?

Thanks in advance

Hi Regen,


Thank you for contacting Aspose support.

We have evaluated your presented scenario on our end while using the latest version of Aspose.OCR for .NET 1.9.0. Unfortunately, we were unable to extract the correct text/numbers from your provided sample image. We have logged this problem in our bug tracking system for further investigation and correction purposes. The ticket Id for your future reference is OCR-33776. Please spare us little time to properly analyze the problem cause, and to provide a fix. In the meanwhile, we will keep you posted with updates in this regard.

Please note, we have used the English language to recognize the numbers from the shared sample. You may check our test code as below,

C#

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

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

// Load 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())
{
Console.WriteLine(ocr.Text);
//Retrieve an array of recognized text by parts
IRecognizedTextPartInfo[] text = ocr.Text.PartsInfo;
//Iterate over the text parts
foreach (IRecognizedTextPartInfo symbol in text)
{
Console.WriteLine("Text : " + symbol.Text);
Console.WriteLine("quality : " + symbol.CharactersQuality);
Console.WriteLine("isItalic : " + symbol.Italic);
Console.WriteLine("isUnderline : " + symbol.Underline);
Console.WriteLine("isBold() : " + symbol.Bold);
Console.WriteLine("FontSize() : " + symbol.FontSize);
Console.WriteLine("Language() : " + symbol.Language);
}
}
}
catch (Exception ex)
{
Console.WriteLine("Exception: " + ex.Message);
}
}

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