title: OpenCV Drawing a Line from a set of points
body: <p>I am trying to draw a line that will link up center points of a bounding box, The points are stored in a vector as the center moves from frame to frame.</p>
  
  <p>Now I am trying to use a CvLine to linke these points together with a line. I am following <a href="http://opencv.willowgarage.com/documentation/python/drawing_functions.html#line" rel="nofollow">This Opencv Documentation</a> . But CvLine function isynt happy with the parameters I give it.</p>
  
  <p>Here is the code:</p>
  
  <pre><code>vector&lt;Point&gt; Rightarm(20);
  
  
  vector&lt;Point&gt; Leftarm(20);
  
      vector&lt;Point&gt;::const_iterator RightIter;
      vector&lt;Point&gt;::const_iterator LeftIter;
  
  
  
     Point center = Point(oko[0].x + (oko[0].width/2), oko[0].y + (oko[0].height/2));
      cout&lt;&lt;"Center Point of Box: 0 is: " &lt;&lt;center&lt;&lt;endl;
  
      double area = (oko[0].width * oko[0].height);
      cout&lt;&lt;"The Area of Box: 0 is: " &lt;&lt;area&lt;&lt;endl;
  
      Point center1 = Point(oko[1].x + (oko[1].width/2), oko[1].y + (oko[1].height/2));
      cout&lt;&lt;"Center Point of Box: 1 is: " &lt;&lt;center1&lt;&lt;endl;
  
      double area1 = (oko[1].width * oko[1].height);
      cout&lt;&lt;"The Area of Box: 1 is: " &lt;&lt;area1&lt;&lt;endl;
  
  
  
  Rightarm.push_back(center);
      Leftarm.push_back(center1); 
  
      if(oko[0].x &gt; oko[1].x)
      {
  
      }
          else
          {
  
          }
  
  
      for(RightIter = Rightarm.begin(); RightIter != Rightarm.end(); ++RightIter)
      {
          circle(drawing, *RightIter, 3, Scalar(0,0,255), CV_FILLED); 
      }
  
      if(Rightarm.size() == 20)
          {
              Rightarm.clear();
  
          }
  
      for(LeftIter = Leftarm.begin(); LeftIter != Leftarm.end(); ++LeftIter)
      {
          circle(drawing, *LeftIter, 3, Scalar(0,255,0), CV_FILLED);
      }
  
          if(Rightarm.size() == 20)
          {
              Leftarm.clear();
  
          }
  
      cvLine(drawing, center.x, center.y, Scalar(255,255,255),1 ,8 ,CV_AA);
  
      imshow(window_Input, frame);
      imshow(window_Output, drawing);
  </code></pre>
  
  <p>Can anyone see where I am going wrong with this...?</p>