# Drawing a Line from set of points [closed]

Hey Everybody....!

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.

Now I am trying to use a CvLine to linke these points together with a line. I am following THIS Opencv Documentation. But CvLine function isynt happy with the parameters I give it.

Here is the code:

```
vector<Point> Rightarm(20);
vector<Point> Leftarm(20);
vector<Point>::const_iterator RightIter;
vector<Point>::const_iterator LeftIter;
Point center = Point(oko[0].x + (oko[0].width/2), oko[0].y + (oko[0].height/2));
cout<<"Center Point of Box: 0 is: " <<center<<endl;
double area = (oko[0].width * oko[0].height);
cout<<"The Area of Box: 0 is: " <<area<<endl;
Point center1 = Point(oko[1].x + (oko[1].width/2), oko[1].y + (oko[1].height/2));
cout<<"Center Point of Box: 1 is: " <<center1<<endl;
double area1 = (oko[1].width * oko[1].height);
cout<<"The Area of Box: 1 is: " <<area1<<endl;
Rightarm.push_back(center);
Leftarm.push_back(center1);
if(oko[0].x > 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);
```

Can anyone see where I am going wrong with this...?