title: Remove all horizontal and vertical lines from an image
body: <p>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.</p>
  
  <pre><code>            string ImageUrl = @"C:\Users\Jayant\Desktop\test images\rtaImage.tiff";
              Image&lt;Bgr, Byte&gt; image = new Image&lt;Bgr, byte&gt;(ImageUrl);
              Image&lt;Bgr, byte&gt; res = image.Copy();
  
              LineSegment2D[] lines =
                  image
                      .Convert&lt;Gray, byte&gt;()
                      .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);
  </code></pre>
  
  <p>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.</p>
  
  <p>input image :</p>
  
  <p><a href="https://i.stack.imgur.com/Bkkuh.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Bkkuh.png" alt="enter image description here"></a></p>
  
  <p>ouptut image :</p>
  
  <p><a href="https://i.stack.imgur.com/qZqUs.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/qZqUs.png" alt="enter image description here"></a></p>
  
  <p>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</p>