1.SIFT.create()
static Ptr< SIFT > create (int nfeatures=0, int nOctaveLayers=3, double contrastThreshold=0.04, double edgeThreshold=10, double sigma=1.6)
nfeatures:特征点数目(算法对检测出的特征点排名,返回最好的nfeatures个特征点)。
nOctaveLayers:金字塔中每组的层数(算法中会自己计算这个值)。
contrastThreshold:过滤掉较差的特征点的对阈值。contrastThreshold越大,返回的特征点越少。
edgeThreshold:过滤掉边缘效应的阈值。edgeThreshold越大,特征点越多。
sigma:金字塔第0层图像高斯滤波系数
2.KeyPoint
KeyPoint (Point2f _pt, float _size, float _angle=-1, float _response=0, int _octave=0, int _class_id=-1)
pt 特征子在图像参考系中的位置
size 特征子邻域的直径
angle 特征子方向,范围为0-360
response 响应强度,值越大,代表特征子越好
octave 代表特征子位于金字塔哪一层
class_id 当要对图片进行分类时,用class_id对每个关键点进行区分,默认为-1