How to get values of accumulator from standard Hough transform?

asked 2018-10-20 07:31:03 -0500

The manual tells that it is possible (although without details).

"lines: Output vector of lines. Each line is represented by a 2 or 3 element vector (rho,theta) or (rho,theta,votes) . rho is the distance from the coordinate origin (0,0) (top-left corner of the image). theta is the line rotation angle in radians. votes is the value of accumulator. "

I tried:

vector Vec3f lines

but the program throws an exception.

edit retag flag offensive close merge delete

Comments

opencv version ? (it's a quite recent feature, you might not have it, simply)

berak gravatar imageberak ( 2018-10-21 04:16:05 -0500 )edit

In what version does it definitely work?

ya_ocv_user gravatar imageya_ocv_user ( 2018-10-22 05:47:26 -0500 )edit
1

3.4.2 or above (look at the docs again, there is a version box at the top)

berak gravatar imageberak ( 2018-10-22 05:59:13 -0500 )edit

OK. Thanks

ya_ocv_user gravatar imageya_ocv_user ( 2018-10-22 08:45:15 -0500 )edit