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

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.


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 close merge delete


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

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

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

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

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