Pixel inaccuracies causing problems for HoughLinesP

asked 2014-04-02 11:40:56 -0500

Yan gravatar image

updated 2014-04-02 11:43:41 -0500

How can I use HoughLinesP (or some equivalent) to detect the very obvious long, almost-horizontal, broken line running from the far right to the far left of the edge-detected image below?

image description

If I try something like

cv2.HoughLinesP(edge, rho = 1, theta = np.pi/2, threshold = 400, minLineLength = 600, maxLineGap = 100)

then I get nothing. If I make the minLineLength shorter, then I get 2 parallel lines to the left and right.

edit retag flag offensive close merge delete