opencv中匹配点对的坐标提取
生活随笔
收集整理的這篇文章主要介紹了
opencv中匹配点对的坐标提取
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
在opencv中,特征檢測、描述、匹配都有集成的函數。vector<DMatch> 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.at(index1).pt.y << " "<< keyImg2.at(index2).pt.x << " "<< keyImg2.at(index2).pt.y << endl;}?
總結
以上是生活随笔為你收集整理的opencv中匹配点对的坐标提取的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Harris角点检测+sift描述匹配
- 下一篇: mexw32与mexw64