在opencv中,特征检测、描述、匹配都有集成的函数。vector bestMatches;用来存储得到的匹配点对。那么如何提取出其中的坐标呢?
int index1, index2;
for (int i = 0; i < bestMatches.size(); i++)//将匹配的特征点坐标赋给point
{
index1 = bestMatches.at(i).queryIdx;
index2 = bestMatches.at(i).trainIdx;
cout << keyImg1.at(index1).pt.x << " "
<< keyImg1
2022-03-04 20:00:55
39KB
c
nc
op
1