I’m trying to iterate over the points i get from cv::goodFeaturesToTrack.
I retrieve my points using this code:
std::vector<std::vector<cv::Point2f> > corners;
cv::goodFeaturesToTrack(image,corners, 500, 0.01, 10);
My idea, which doesn’t work:
for (size_t idx = 0; idx < corners.size(); idx++) {
cv::circle(image,corners.at(idx),radius,color,thickness);
}
Any ideas?
The detector goodFeaturesToTrack (indeed all feature detectors) populate a vector of features, while you are trying to pass it a vector of a vector of features. The remainder of your code looks fine but you should change the line
to
and hopefully all will be well.