Click here to Skip to main content
15,889,808 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:

binarization

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.

C#
            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));
Posted
Updated 6-Dec-16 17:27pm
v2

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