error1: no matching function for call to ‘cv::ORB::create()’
Ptr< Feature2D > detector = ORB::create();
^
// Ptr< Feature2D > detector = ORB::create();此为原代码
Ptr<Feature2D> detector = Feature2D::create ( "ORB" );
参考:https://blog.youkuaiyun.com/LittleEmperor/article/details/79698579
备注:Feature2D包含特征检测、描述、匹配等2D特征框架
error2: ‘class cv::Feature2D’ has no member named ‘detectAndCompute’ detector->detectAndComp
// detector->detectAndCompute( image, Mat(), keypoints, descriptor );此为原代码
detector->detect( image, keypoints );
detector->compute( image, keypoints, descriptor );

在尝试跑SLAM14-ch12时遇到两个错误:cv::ORB::create()函数未找到匹配项和Feature2D类中detectAndCompute成员缺失。通过查阅资料和Stack Overflow,发现可能是OpenCV版本问题。将detectAndCompute拆分成单独的detect和compute步骤,成功解决了编译问题。
最低0.47元/天 解锁文章
5741

被折叠的 条评论
为什么被折叠?



