在OPenCV中实现ORB算法,使用的是:
1.实例化ORB
orb = cv.xfeatures2d.orb_create(nfeatures)
参数:
·nfeatures: 特征点的最大数量
2.利用orb.detectAndCompute()检测关键点并计算
kp,des = orb.detectAndCompute(gray,None)
参数:
·gray: 进行关键点检测的图像,注意是灰度图像
返回:
·kp: 关键点信息,包括位置,尺度,方向信息
·des: 关键点描述符,每个关键点BRIEF特征向量,二进制字符串,
3.将关键点检测结果绘制在图像上
cv.drawKeypoints(image, keypoints, outputimage, color, flags