BUG(跑SLAM14-ch12)

error1: no matching function for call to ‘cv::ORB::create()’
Ptr< Feature2D > detector = ORB::create();

^

// Ptr< Feature2D > detector = ORB::create();此为原代码
     Ptr detector = Feature2D::create ( "ORB" );

参考:https://blog.csdn.net/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 );

参考:
cv::Feature2D Class Reference
https://stackoverflow.com/questions/33332055/opencv-how-to-create-a-descriptorextractor-object
https://stackoverflow.com/questions/52725621/how-to-align-2-images-with-opencv-with-orb-fail-to-compile
感觉像是版本问题,没有找到这个函数,故把这个函数拆开来运行,成功!

你可能感兴趣的:(视觉SLAM十四讲,slam14,DBoW3)