Hello friends-
can anyone tell me how can i read the text from image. i have small idea about that. and that is we can do this using OCR. i have checked the following Code using Microsoft Office Document Imaging 12.0 library
private void ReadTextFromImage()
{
MODI.Document objModi = new MODI.Document();
objModi.Create(@"c:\AGENCYR.tiff");
objModi.OCR(MODI.MiLANGUAGES.miLANG_ENGLISH, true, true);
objModi.Close(false);
MODI.Image image = (MODI.Image)objModi.Images[0];
MODI.Layout layout = image.Layout;
MODI.Word word = (MODI.Word)layout.Words[5];
//for (int j = 0; j < layout.Words.Count; j++)
//{
// // Get this word and deal with it.
// MODI.Word word = (MODI.Word)layout.Words[j];
//}
}
But the above code gave me error at objModi.Create(@"c:\AGENCYR.tiff"); IO.error
Thanks & Regards
Lakhan Pal Garg
Free Code Snippets
http://lakhangarg.blogspot.com/