Click here to Skip to main content
15,794,275 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I am trying to make algorithm to process image for better accuracy of tesseract OCR.

I am using the EmguCV for C#.

First i am applying a binarization of the image
the using the emguCV edge detection

then how to make hole filling using the emgucv
that is a bit unclear to me

Here are some results:


edge detection

What I have tried:

Here is the code that I am using for the egde detection.
For the binarization I iterate the pixels and make the pixels whiter and darker.

            bmp = ImageLibrary.FilterImage(bmp, 95);

Image<gray, byte=""> input = new Image<gray, byte="">(bmp);

Image<gray, byte=""> output = input.ThresholdAdaptive(new Gray(255), Emgu.CV.CvEnum.AdaptiveThresholdType.MeanC, Emgu.CV.CvEnum.ThresholdType.Binary, 3, new Gray(0.03));

input.ThresholdAdaptive(new Gray(255), AdaptiveThresholdType.GaussianC, ThresholdType.Binary, 11, new Gray(2));
Updated 6-Dec-16 18:27pm

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