title: HoughLines transform in opencv
body: <p>I am working on image processing using opencv and Eclipse.</p>
  
  <pre><code>  vector&lt;Vec2f&gt; lines;  
    HoughLines(dst, lines, 1, CV_PI/180, 100, 0, 0 );
  
    for( size_t i = 0; i &lt; lines.size(); i++ )  
    {  
       float rho = lines[i][0], theta = lines[i][1];  
       Point pt1, pt2;  
       double a = cos(theta), b = sin(theta);  
       double x0 = a*rho, y0 = b*rho;  
       pt1.x = cvRound(x0 + 1000*(-b));  
       pt1.y = cvRound(y0 + 1000*(a));  
       pt2.x = cvRound(x0 - 1000*(-b));  
       pt2.y = cvRound(y0 - 1000*(a));  
       line( cdst, pt1, pt2, Scalar(0,0,255), 3, CV_AA);  
    }  
  </code></pre>
  
  <p>Can anyone explain that how the points are being defined by this code. We are using </p>
  
  <pre><code>y=(-cos(theta)/sin(theta))x + r/(sin(theta))
  rho=xo*cos(theta) + yo*sin(theta)
  </code></pre>
  
  <p>I am not able to understand why the multiplication of 1000 is being done in the line</p>
  
  <pre><code>pt1.x = cvRound(x0 + 1000*(-b));  
  </code></pre>
  
  <p>please try to explain this in simple terms.
  Thanks in advance</p>