plot some points as a trajectory of tracking from video / c++ [closed]

asked 2013-12-04 03:31:35 -0500

ati gravatar image

updated 2013-12-04 03:38:36 -0500

berak gravatar image

I have a vector of pair-value which contains the coordinates of some points.

Coordinates.push_back(std::make_pair(row,col));

I want to plot them with different colors in real-time.

this "cvPoint function"value in Opencv does not accept any vector as an input for plotting.

should I find another library to plot them?

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by sturkmen
close date 2020-12-03 03:10:51.811853

Comments

1
berak gravatar imageberak ( 2013-12-04 03:37:41 -0500 )edit

I am newbie, the Coordinates vector contains pair-value. how do i give this vector as an input to the cvPoint..

ati gravatar imageati ( 2013-12-04 03:41:31 -0500 )edit
1

why not use cv::Point instead of your pairs there in the 1st place ?

berak gravatar imageberak ( 2013-12-04 04:07:38 -0500 )edit
1

int x=Coordinates[i].second;

int y=Coordinates[i].first;

circle( img, Point p(x,y), 3, Scalar(255,0,0));

berak gravatar imageberak ( 2013-12-04 04:10:30 -0500 )edit

Thanks a lot that you are trying to help me. the point is that I do not want to draw any circle or line or.... I just want to have a small dot(with a certain color) on each point. is there any other function which I can use instead of circle?

ati gravatar imageati ( 2013-12-04 04:26:56 -0500 )edit
2

-1 for thickness will make a filled circle (a dot)

berak gravatar imageberak ( 2013-12-04 04:41:12 -0500 )edit