opencv的DMatch

1、DMatch是描述图像匹配信息的类

/** @brief Class for matching keypoint descriptors
query descriptor index, train descriptor index, train image index, and distance between
descriptors.
*/
class CV_EXPORTS_W_SIMPLE DMatch
{
public:
    CV_WRAP DMatch();//默认构造函数

    CV_WRAP DMatch(int _queryIdx, int _trainIdx, float _distance);//构造函数
    CV_WRAP DMatch(int _queryIdx, int _trainIdx, int _imgIdx, float _distance);
 
    CV_PROP_RW int queryIdx; //query描述子下标,即match函数中位于前面的描述子
    CV_PROP_RW int trainIdx; // train描述子下标,match函数中位于后面的描述子
 
   // 匹配图像下标,对于一副图像img1的描述子,在其他图像中找到与其最相似的,imgIdx就是找到的图像下标
    CV_PROP_RW int imgIdx;  
 
    //两个描述子的距离,一般是欧式距离
    CV_PROP_RW float distance;
    // less is better
    bool operator<(const DMatch &m) const;
};
posted @ 2019-02-25 22:19  小新新的蜡笔  阅读(1362)  评论(0编辑  收藏  举报