Hi Maheswari,
Thank you for sharing sample with us.
We have evaluated the sample image. It was found that the sample image has some sort of background color. We are able to read the text using code snippet given below. However the output text has some letters missing in it. This issue has been logged into our system with ID OCRNET-3265 for further investigation.
Furthermore English is the default language. There is no need to perform extra settings for this. To perform OCR on language other than English, you have to download the resource file from link Resources and use the code snippet shared in my previous reply.
CODE:
indent preformatted text by 4 spaces
//Initialize an instance of OcrEngine
OcrEngine ocrEngine = new OcrEngine();
//Clear notifier list
ocrEngine.ClearNotifies();
//Clear recognition blocks
ocrEngine.Config.ClearRecognitionBlocks();
ocrEngine.Config.AddRecognitionBlock(RecognitionBlock.CreateTextBlock(63, 1077, 1781, 161));
//Ignore everything else on the image other than the user defined recognition blocks
ocrEngine.Config.DetectTextRegions = false;
ocrEngine.Config.ProcessColoredBackground = true;
//Set Image property by loading an image from file path
ocrEngine.Image = ImageStream.FromFile(@"ocr_test_passport.jpg");
//Run recognition process
if (ocrEngine.Process())
{
Console.WriteLine("Text recognized: " + ocrEngine.Text);
}
OUTPUT:
P<UTO A DERAS<<LILIA <<<<<<<<<<<<<<<<<<<<<<<
1234567 4UTO 1 14F25 1 17<<<<<<<<<<<<<< 6