title: Opencv HoughLines Lines Theta?
body: <p>I have a question about opencv libary of HoughLines. The format is below from the official website:</p>
  
  <p>C++: void HoughLines(InputArray image, OutputArray lines, double rho, double theta, int threshold, double srn=0, double stn=0 )</p>
  
  <p>And the explanation of output array parameter of lines, it says:</p>
  
  <p>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).</p>
  
  <p>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?
  <a href="https://i.stack.imgur.com/iVDli.png" rel="noreferrer"><img src="https://i.stack.imgur.com/iVDli.png" alt="enter image description here"></a>.</p>
  
  <p>Can anyone tell me what's regularity of theta that output from lines?</p>
  
  <p>Thanks a lot !</p>