OCR means Object Character Recognition . It is a technique by which we select a portion of the image as per user need.
This process requires getting the dimension of selected screen and converting in an image for use.
These are the pre-processing steps often performed in OCR :
Binarization
- Usually presented with a image, conversion is then simply a matter of choosing a maximum value.
Morphological Operators
- Remove empty things in characters, can use the majority operator.
Segmentation
- Check connectivity of shapes, label.
Third Party Tool for Performing OCR
private static void ReadTextFromImage(String ImagePath)
{
try
{
// Grab Text From Image
MODI.Document ModiObj = new MODI.Document();
ModiObj.Create(ImagePath);
ModiObj.OCR(MODI.MiLANGUAGES;ENGLISH, true, true);
//Retrieve the text gathered from the image
MODI.Image ModiImageObj = (MODI.Image)ModiObj.Images[0];
System.Console.WriteLine(ModiImageObj.Layout.Text);
ModiObj.Close();
}
catch (Exception ex)
{
throw new Exception(ex.Message);
}
}
0 Comment(s)