HoughLinesP gives 5 points

asked 2013-04-16 12:51:44 -0600

steve55 gravatar image

hi

I am new to using openCV and i have just started with the tutorials. I am using the Canny with HoughLinesP on a straight lines just for testing, when i run the tutorial code on a diagonal line i always get 5 4-element vector coordinates. I though i would only get 2 for a straight lines, all the coordinates pass through the line so its correct, i was just wondering why there were more that 2.

image description

Thanks

Steve

edit retag flag offensive close merge delete

Comments

1

Did you try the non probabilistic version to see it the issue is coming from the Hough transform parameters you're using or from the probabilistic method?

Mathieu Barnachon gravatar imageMathieu Barnachon ( 2013-04-16 12:57:16 -0600 )edit

regarding HoughLinesP the parameter lines equates as follows...

lines – Output vector of lines. Each line is represented by a 4-element vector (x_1, y_1, x_2, y_2) , where (x_1,y_1) and (x_2, y_2) are the ending points of each detected line segment.

david4810 gravatar imagedavid4810 ( 2014-11-02 19:55:25 -0600 )edit