I am trying to draw a trajectory on an image and saving these trajectory points as std::vector<cv::Point> trajectoryPoint and I would like to access the data inside.
This a short snippet from my code:
cv::line(currentFrame, trajectoryPoint.back(), cv::Point(x, y), Scalar(255, 255, 255), 1, 8);
trajectoryPoint.push_back(Point(x, y));
std::cout << trajectoryPoint.at() << std::endl;
Normally, in Matlab it is easy to see the data inside vectors. However, I don't know how to continuously print out the data while drawing in C++ inside trajectoryPoint. Any suggestions?