编译14讲中的提取orb特征和匹配的程序
- 会遇到如下的错误
OpenCV Error: Assertion failed (!outImage.empty()) in drawKeypoints, file /tmp/binarydeb/ros-kinetic-opencv3-3.3.1/modules/features2d/src/draw.cpp, line 115
terminate called after throwing an instance of 'cv::Exception'
what(): /tmp/binarydeb/ros-kinetic-opencv3-3.3.1/modules/features2d/src/draw.cpp:115: error: (-215) !outImage.empty() in function drawKeypoints
解决方法:
查看orb_self.cpp
文件,原来程序中读取图片的路径是相对路径:
string first_file = "./1.png";
string second_file = "./2.png";
改成绝对路径:
string first_file = "/home/djq/learn-slam14/ch7/1.png";
string second_file = "/home/djq/learn-slam14/ch7/2.png";
编译通过,运行结果:
FAST角点检测基本原理。通过比较中心像素值与圆上像素的大小,如果连续一定数目(13)比中心大或者小则为角点。
参考