I read points frome a file, I use the library Lemon (because i want to use graph later) therefore each point is represented by the type : dim2 :: Point . so I used the library lemon/dim2.h
My problem is that each point there have a number of the frame of the video, so i used this code to put variables from file in a vectors:
std::ifstream file("file1.txt");
std::vector<dim2::Point<int>> pointTable;
std::vector<int> frame;
int temp, temp2,temp3;
while (file >> temp >> temp2 >> temp3)
{
pointTable.push_back(dim2::Point<int>(temp, temp2));
frame.push_back(temp3);
}
//int tailleFmax = frame.max_size;
for (int i = 0; i < (36) ;i++)
//cout << frame[i] <<endl;
// cout << trajectoire[i].x << endl;
cout << trajectoire[i].y << endl;
My question : i dont know how to represent in c++ the connection betwen each point and his frame number and name this variable Trajectory.
Example of file :
155 // that is x
168 // that is y
0 // that is the frame number
364
245
20
546
156