venkata narayana

venkata narayana

  • NA
  • 3
  • 16.6k

How can I set the font to read from OCR?

Feb 7 2013 3:54 AM

Hi Experts,

I am trying to read text from image file. If my image contains plain English words, it gives me nice output.
But when my image file has different font, it is giving me wrong output.

How can I set the font to read from OCR? 

  MODI.Document ModiObj = new MODI.Document();
                ModiObj.Create(ImagePath);
                ModiObj.OCR(MODI.MiLANGUAGES.miLANG_ENGLISH, true, true);

                //Retrieve the text gathered from the image
                MODI.Image ModiImageObj = (MODI.Image)ModiObj.Images[0];
                

                // Store Image Content in Text File
                FileStream CreateFileObj = new FileStream(StoreTextFilePath, FileMode.Create);
                //save the image text in the text file 
                StreamWriter WriteFileObj = new StreamWriter(CreateFileObj);
                WriteFileObj.Write(ModiImageObj.Layout.Text);
                WriteFileObj.Close();

                ModiObj.Close(false);

 


Answers (1)