confused in opencv tutorial 'Hough Line Transform'

asked 2014-05-13 21:50:47 -0500

ANARKIA gravatar image

updated 2014-05-14 00:43:29 -0500

berak gravatar image

The tutorial url link is as follow:

i'm new as a learner of opencv line detection. When i'm reading the 'Theory' part of the tutorial, i find some of the easy formulas cannot be proven (because i took the meaning of the formulas wrong).

Then i 'wiki'ed 'Hough Transform', get the main idea of the theory. Then i realized that the 'Theory' part may be lack of some information about parameter descriptions, like what is '(m, b)' and '(r, theta)'.

I'm thinking if a update of this tutorial is needed. Or maybe it's just my wrong understanding of something already known well for all, like 'Polar System', that made me confused.


edit retag flag offensive close merge delete


OK, but what's the question?

I think that the docs should explain how to use OpenCV, not the whole underlying theory. If it would begin to explain the fundamental bases of the analytical geometry, algebra and everything, this tutorial would be at least 500 pages long.

So please read the f** high-school math manuals first!

BTW, the Wikipedia article on analytical geometry explains the (m,b) and (r,theta) parameters, polar vs. carthesian coordinates, etc. But, as I said, you'd rather check a manual to understand it better.

Seriously, without understanding these basic concepts, you'll never get the Hough transform.

kbarni gravatar imagekbarni ( 2014-05-14 07:01:07 -0500 )edit

I think Hough transform didn't change a line from Cartesian coordinate system to Polar Coordinate System. It just changed the form of patameters, It's still in Cartesian coordinate system. That's where i think there's something wrong, not just 'not detailed enough'. Thanks.

ANARKIA gravatar imageANARKIA ( 2014-05-19 02:19:08 -0500 )edit

Basically the Hough transform detects lines.

If you run the HoughTransform function, it will give you the detected lines in polar coordinates (rho, theta). The HoughTransformP function (probabilistic Hough transform) will give you the endpoints of the lines (Carthesian system).

I read again the document and it seems well written. The most important thing to understand is that a point in the carthesian system is a sinusoidal line in the polar representation, and a point in the polar system represents a line in the carthesian system.

kbarni gravatar imagekbarni ( 2014-05-19 04:30:49 -0500 )edit