title: How to remove horizontal and vertical lines
body: <p>I need to remove horizontal and vertical lines in a binary image. Is there any method for filtering these lines? <code>bwareaopen()</code> is not good method to remove these lines and also Dilation and Erosion are not good for these cases.
  Does any one know a solution?</p>
  
  <p>Example image:</p>
  
  <p><img src="https://i.stack.imgur.com/L1hUa.jpg" alt="example"></p>
  
  <p>EDIT:(added more example images:</p>
  
  <p><a href="http://s1.upload7.ir/downloads/pPqTDnmsmjHUGTEpbwnksf3uUkzncDwr/example%202.png" rel="nofollow noreferrer">http://s1.upload7.ir/downloads/pPqTDnmsmjHUGTEpbwnksf3uUkzncDwr/example%202.png</a></p>
  
  <p>source file of images:</p>
  
  <p><a href="https://www.dropbox.com/sh/tamcdqk244ktoyp/AAAuxkmYgBkB8erNS9SajkGVa?dl=0" rel="nofollow noreferrer">https://www.dropbox.com/sh/tamcdqk244ktoyp/AAAuxkmYgBkB8erNS9SajkGVa?dl=0</a></p>
  
  <p>www.directexe.com/9cg/pics.rar</p>