Opencv HoughLines Lines Theta?

Viewed 3841

I have a question about opencv libary of HoughLines. The format is below from the official website:

C++: void HoughLines(InputArray image, OutputArray lines, double rho, double theta, int threshold, double srn=0, double stn=0 )

And the explanation of output array parameter of lines, it says:

lines – Output vector of lines. Each line is represented by a two-element vector: rho and theta. and theta is 0 for vertical lines and pi/2 for horizontal lines(in radiance).

I'm wondering what's the principle of theta? It seems that theta is in the range of 0~1.57 (since pi/2 is 1.57), but I run the code and find out that theta can exceed 1.57 and become some strange value, like the figure below, red line is the detected line by HoughLines, and sita is the value in parameter lines? enter image description here.

Can anyone tell me what's regularity of theta that output from lines?

Thanks a lot !

3 Answers
Related