KeyPoint&DMatch类型简介
2017-07-04 17:04
337 查看
class KeyPoint
{ Point2f pt; //坐标
float size; //特征点邻域直径
float angle; //特征点的方向,值为[零,三百六十),负值表示不使用
float response;
int octave; //特征点所在的图像金字塔的组
int class_id; //用于聚类的id
}
3.
图片中特征点欧式距离的计算公式:
0ρ = √( (x1-x2)2+(y1-y2)2 ) |x| = √( x2 + y2 )
{ Point2f pt; //坐标
float size; //特征点邻域直径
float angle; //特征点的方向,值为[零,三百六十),负值表示不使用
float response;
int octave; //特征点所在的图像金字塔的组
int class_id; //用于聚类的id
}
struct DMatch { //三个构造函数 DMatch(): queryIdx(-1),trainIdx(-1),imgIdx(-1),distance(std::numeric_limits<float>::max()) {} DMatch(int _queryIdx, int _trainIdx, float _distance ) : queryIdx( _queryIdx),trainIdx( _trainIdx), imgIdx(-1),distance( _distance) {} DMatch(int _queryIdx, int _trainIdx, int _imgIdx, float _distance ) : queryIdx(_queryIdx), trainIdx( _trainIdx), imgIdx( _imgIdx),distance( _distance) {} int queryIdx; //此匹配对应的查询图像的特征描述子索引 int trainIdx; //此匹配对应的训练(模板)图像的特征描述子索引 int imgIdx; //训练图像的索引(若有多个) float distance; //两个特征向量之间的欧氏距离,越小表明匹配度越高。 bool operator < (const DMatch &m) const; };
3.
图片中特征点欧式距离的计算公式:
0ρ = √( (x1-x2)2+(y1-y2)2 ) |x| = √( x2 + y2 )
相关文章推荐
- opencv特征匹配相关结构(keypoint&DMatch类型简介)
- OpenCV特征匹配相关结构(KeyPoint&DMatch类型简介)
- 数据类型1_简介&类型转换
- OpenCV特征匹配相关结构(KeyPoint&DMatch)
- Java中引用类型vs值类型&对引用类型所做的GC操作简介
- keypoint && DMatch
- android:layout_width="match_parent" 里为什么总是提示match_parent的类型不匹配
- XML简介之Schema之XSD 复合类型指示器 VS XSD <any> 元素
- OpenCV特征匹配相关结构(KeyPoint&DMatch)
- Rust之语法<3>数据类型
- 11级_Java_曹建波4.20 封装类&日期相关类型&数学相关类型
- OpenCV目录简介&各模块的介绍
- .NET MVC页面中强类型控件简介,比如LabelFor,TextBoxFor
- AT & T汇编简介
- MATCH_PARENT是什么类型的布局
- mysql的数据类型 (转)
- 关于OpenCV中利用函数cvConvert实现图像数据类型转换(8U->16S)
- hibernate:Document root element "hibernate-mapping", must match DOCTYPE root "hibernate-configurati
- (视频) 《快速创建网站》1. 网站管理平台WordPress & 微软Azure 云计算简介