opencv中ORB和ORBSLAM中ORB的区别(未完待续)
SLAM十四讲用一天看完了,顺便花一天看了下ORB,brief,ORB-SLAM2原文,现在开始学习里面具体代码。今天主要看ORB特征提取,放vs中的代码:
#include
#include
#include
#include
#include
#include
#include
using namespace cv;
using namespace std;int main() {Mat src = imread("E:\\xxb\\3.jpg");//VideoCapture cap(0);imshow("原图", src);Mat gray_src, outimage;cvtColor(src, gray_src, CV_BGR2GRAY);std::vector<KeyPoint> keypoints_1;Mat descriptors_1;Ptr<FeatureDetector> detector = ORB::create();Ptr<DescriptorExtractor> descriptor = ORB::create();detector->detect(gray_src, keypoints_1);descriptor->compute(gray_src, keypoints_1, descriptors_1);drawKeypoints(src, keypoints_1, outimage, Scalar::all(-1), DrawMatchesFlags::DEFAULT);imshow("opencv提取ORB特征点", outimage);while (1){if (waitKey(10) == 27)break;//按Esc退出
}return 0;}
当中用debug x64 运行出现报错,原因是工程中debug依赖项添加了opencv_world310.lib

提取结果如图,分布不均匀;这是opencv的结果。

ORB-slam2中首先分块进行
本文来自互联网用户投稿,文章观点仅代表作者本人,不代表本站立场,不承担相关法律责任。如若转载,请注明出处。 如若内容造成侵权/违法违规/事实不符,请点击【内容举报】进行投诉反馈!
