How can I pass highlights image area to Microsoft Office Document Imaging (OCR) and get text output as a result?
Or there is any alternative method to recognize the characters and numbers in image?
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Janat AlJamalPosted Nov 3, 2019, 10:38 PM
{
engine.Startup(null, null, null, null);
string tifInput = @"INPUT FILE PATH";
string pdfOutput = @"OUTPUT FILE PATH";
using(IOcrDocument document = engine.DocumentManager.CreateDocument())
{
IOcrPage ocrPage = document.Pages.AddPage(tifInput, null);
orcPage.Recognize(null);
document.Save(pdfOutput, DocumentFormat.Pdf, null);
}
ocrEngine.Shutdown();
}
buyi wenPosted Sep 21, 2015, 9:30 PM
Susanna MoorePosted Feb 20, 2014, 9:31 PM
Hjalmar LarssonPosted Nov 28, 2013, 9:13 AM
There's a good article about using C# with MS Office OCR here:
http://www.codeproject.com/Articles/41709/How-To-Use-Office-2007-OCR-Using-C
However, if you need more control on selecting part of the image and getting only specific text out of it, you might need to use a commercial OCR toolkit, such as the one described here:
http://www.codeproject.com/Articles/317163/OCR-with-LEADTOOLS-The-Better-Choice
Cheers,
Hjalmar