feature2d.cpp:174: error: (-213:The function/feature is not implemented) in function 'detectAndComp

文章目录

1 问题

libc++abi.dylib: terminating with uncaught exception of type cv::Exception: OpenCV(4.0.1) /tmp/opencv-20190105-31032-o160to/opencv-4.0.1/modules/features2d/src/feature2d.cpp:174: error: (-213:The function/feature is not implemented) in function ‘detectAndCompute’

2 结局办法

解决办法:

    vector<KeyPoint> keyPoint1,keyPoint2;
    Ptr<xfeatures2d::SiftFeatureDetector> featureDetector =
            xfeatures2d::SiftFeatureDetector::create();
    featureDetector->detect(image1, keyPoint1);
    featureDetector->detect(image2, keyPoint2);

//被替换
//    SiftFeatureDetector siftDetector;  // 海塞矩阵阈值
//    vector<KeyPoint> keyPoint1,keyPoint2;
//    siftDetector.detect(image1,keyPoint1);
//    siftDetector.detect(image2,keyPoint2);

//被替换
    //特征点描述,为下边的特征点匹配做准备
    Mat imageDesc1,imageDesc2;

    Ptr<xfeatures2d::SiftDescriptorExtractor>
            siftDescriptor = xfeatures2d::SiftDescriptorExtractor::create();
    siftDescriptor->compute(image1, keyPoint1, imageDesc1);
    siftDescriptor->compute(image2, keyPoint1, imageDesc2);


//    SiftDescriptorExtractor siftDescriptor;
//    Mat imageDesc1,imageDesc2;
//    siftDescriptor.compute(image1,keyPoint1,imageDesc1);
//    siftDescriptor.compute(image2,keyPoint2,imageDesc2);
已标记关键词 清除标记
相关推荐
©️2020 CSDN 皮肤主题: 岁月 设计师:pinMode 返回首页