BRISK算法是2011年ICCV上《BRISK:Binary Robust Invariant Scalable Keypoints》文章中,提出来的一种特征提取算法,也是一种二进制的特征描述算子。
它具有较好的旋转不变性、尺度不变性,较好的鲁棒性等。在图像配准应用中,速度比较:SIFT<SURF<BRISK<FREAK<ORB,在对有较大模糊的图像配准时,BRISK算法在其中表现最为出色。
下面的截图来自参考链接
//32 Brisk
void StartOp2::ImageProcess2_32()
{
Mat img1 = imread("../../Images/22.jpg", IMREAD_GRAYSCALE);
Mat img2 = imread("../../Images/23.jpg", IMREAD_GRAYSCALE);
if (!img1.data || !img2.data) {
}
imshow("image1", img1);
imshow("image2", img2);
//brisk features extraction
Ptr<Feature2D> detector = BRISK::create();
vector<KeyPoint> keypoints_obj;
vector<KeyPoint> keypoints_scene;
Mat descriptor_obj, descriptor_scene;
detector->detectAndCompute(img1, Mat(), keypoints_obj, descriptor_obj);
detector->detectAndCompute(img2, Mat(), keypoints_scene, descriptor_scene);
// matching
BFMatcher matcher(NORM_L2);
vector<DMatch> matches;
matcher.match(descriptor_obj, descriptor_scene, matches);
// draw matches
Mat matchesImg;
drawMatches(img1, keypoints_obj, img2, keypoints_scene, matches, matchesImg);
imshow("BRISK MATCH RESULT", matchesImg);
// draw key points
// Mat resultImg;
// drawKeypoints(src, keypoints, resultImg, Scalar::all(-1), DrawMatchesFlags::DEFAULT);
// imshow("Brisk Key Points", resultImg);
}
参考:
https://blog.youkuaiyun.com/hujingshuang/article/details/47045497