c++mathopencvhough-transform

OpenCV function HoughLines(), where should I consider the origin of the image?


I would like to detect some lines via the standard Hough transform and filter the result according to a theta value so that the 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 origin's coordinates? 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. If anybody could clear this out, it would be really appreciated.


Solution

  • The origin seen in this picture from opencv docs:

    enter image description here

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