Hi all,
I wanted to try the trial version of Aspose.ocr and include the latest version via nuget console. I tried a simple ocr process:
static void Main(string[] args)
{
var engine = new OcrEngine();
string path = System.IO.Directory.GetCurrentDirectory() + "\\Sampleocr.bmp";
engine.Image = ImageStream.FromFile(path);
try
{
if (engine.Process())
{
Console.WriteLine(engine.Text);
}
}
catch (Exception e)
{
Console.WriteLine(e);
throw;
}
}
and got an error says
Aspose.OCR.OcrException: Error occurred during recognition. —> System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
at . ?( )
at ? .(? , ? , ? , OCRConfig, ? )
at ? . ?(? , OCRConfig )
at Aspose.OCR.OcrEngine.()
— End of inner exception stack trace —
at Aspose.OCR.OcrEngine.()
at Aspose.OCR.OcrEngine.Process()
at ConsoleApp1.Program.Main(String[] args) in C:\AsposeOCR\ConsoleApp1\ConsoleApp1\Program.cs:line 22
As I said earlier, I am just using it for evaluation purposes and I do not know where I am doing wrong.