Click here to Skip to main content
15,888,217 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How to get the region of an image and extract the text in the same using MODI OCR?
I am able to extract the entire text from a scanned image using MODI OCR. But I want to get the region of an image and extract the text in the same.


My code is as follows:
private string ExtractTextFromImage(string filePath)
{
Document modiDocument = new Document();
modiDocument.Create(filePath);
modiDocument.OCR(MiLANGUAGES.miLANG_ENGLISH, false, false);
MODI.Image modiImage = (modiDocument.Images[0] as MODI.Image);
string extractedText = modiImage.Layout.Text;
modiDocument.Close(true);
return extractedText;
}
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900