title: extract lines from canny edge detection
body: <p>In openCV after applying canny edge detection I'd like to further process the result (show only horizontal lines, remove short lines, etc..). But the result of canny is just another image. I'd like to get an array of lines describing the detected edges</p>
  
  <p>I'm aware of the famous <a href="http://docs.opencv.org/doc/tutorials/imgproc/imgtrans/hough_lines/hough_lines.html" rel="nofollow noreferrer">Hough Line Transform</a>, but the result is not always good, that's why I'd like to manually process canny result.
  input:</p>
  
  <p><img src="https://i.stack.imgur.com/3IIZs.jpg" alt="enter image description here"></p>
  
  <p>output canny only:</p>
  
  <p><img src="https://i.stack.imgur.com/dTsCY.jpg" alt="enter image description here"></p>
  
  <p>output canny then Hough line transform</p>
  
  <p><img src="https://i.stack.imgur.com/oEyOM.jpg" alt="enter image description here"></p>
  
  <p>This is Hough line transform result(red lines) for detecting edges of stairs. 4th line from below is not detected correctly, although canny edge detected an edge.</p>
  
  <p>Any idea how to extract edges from canny image?</p>