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);
}
}