我希望能够从OpenCV SIFT匹配中获取关键点的坐标,但我不知道匹配数据结构的注释。我一直在尝试着这样做:
vector<DMatch> matches;
matcher.match(descriptors1,descriptors2,matches);
for(vector<DMatch>::size_type i=0; i<matches.size(); i++)
{
cout<< key_points1[ matches[i].trainIdx].pt <<"与之匹配特征点坐标"<< key_points2[ matches[i].imgIdx].pt<<endl;
}
但是它不起作用。有人能帮我吗?