Question

What I would like to do is, detect some lines via standard Hough transform and filter the result according to the theta value so that remaining lines would be the ones that have some specific orientation.

What I'm curious about is, in the function HoughLines where is the origin that this function calculates each theta value from? For example, if I have an image of size width x height, what is the coordinate of this origin? is it (0,height)? or (0,0)

I assume it's somewhere between the 4 corners of the image but I'm not so sure. Anybody could clear this out, it would be really appreciated.

Was it helpful?

Solution

The origin seen in this picture from opencv docs:

enter image description here

Is (0, heigh) in the image, the bottom left corner

OTHER TIPS

lines – Output vector of lines. Each line is represented by a two-element vector (rho, theta)

  • rho is the distance from the coordinate origin (0,0) (top-left corner of the image).

  • theta is the line rotation angle in radians ( 0 = {vertical line}, pi/2 = {horizontal line} ).

from http://docs.opencv.org/modules/imgproc/doc/feature_detection.html?highlight=houghlines

It's the top-left corner of the image.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top