I want to remove all horizontal and vertical lines but some small vertical lines are not getting removed. Adding the input and output images and the code below.
string ImageUrl = @"C:\Users\Jayant\Desktop\test images\rtaImage.tiff";
Image<Bgr, Byte> image = new Image<Bgr, byte>(ImageUrl);
Image<Bgr, byte> res = image.Copy();
LineSegment2D[] lines =
image
.Convert<Gray, byte>()
.Canny(16, 16)
.HoughLinesBinary(1, Math.PI / 16, 10, 50, 1)[0];
foreach (LineSegment2D line in lines)
{
res.Draw(line, new Bgr(System.Drawing.Color.White), 2);
}
res.Save(ImageUrl);
I want to remove all horizontal and vertical lines but some small vertical lines are not getting removed. Adding the input and output of above code.
input image :
ouptut image :
If you notice some vertical lines did not get removed. I an using emgu.cv library in Visual Studio and the code is C# . Any solution without using emgu will also be appreciated