Ask Your Question
0

How to get lines' score from HoughLines function?

asked 2018-02-28 09:16:18 -0600

Crapsy gravatar image

How can we get access to the score of every line detected by the HoughLines function. I assume that every line has a different score. But is it possible to access this value, to sort for instance the 2 best lines? Thank you in advance

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
2

answered 2018-03-02 03:50:04 -0600

saideepthik gravatar image

yes, you can.... try with this code : lines = cv2.HoughLinesP(canny_edges, 2, np.pi/180, 30,50, 200) cnt=1 for line in lines: cnt+=1 print cnt

printed count value is the total score of lines in your input image.

edit flag offensive delete link more

Comments

so you are saying that the lines are returned in decreasing order of their score ? your code, however, only gives the order, but not the actual vote count

Ciprian Tomoiaga gravatar imageCiprian Tomoiaga ( 2018-08-29 08:48:40 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2018-02-28 09:16:18 -0600

Seen: 899 times

Last updated: Mar 02 '18