为什么筛选特征检测器无法检测某些图像的关键点?

时间:2016-06-20 10:15:24

标签: c++ opencv feature-detection sift keypoint

我正在从一组中读取图像并提取它们的功能。但是,对于某些图像(非常少,每个mille大约4个),SiftFeatureDetector::detect( image, keypoints)无法检测关键点并返回一组空的关键点。当我尝试使用SurfFeatureDetector::detect( image, keypoints)时,它会检测到关键点。

以下是代码:

    query = imread( it->path().string());

    /* Here, I resize the image in proportion so that its longest side will be 400*/

    cvtColor( query, query_gray, CV_RGB2GRAY);

    SiftFeatureDetector feature_detector;
    vector<KeyPoint> query_kp;
    feature_detector.detect( query_gray, query_kp);

    // check whether KeyPoints are detected
    if( !query_kp.size())
    {
        cerr << "KeyPoints couldn't be detected. Image " << it->path() << " is skipped." << endl;
        ++cantDetecteds;
        waitKey(0);
        continue;
    }

这背后的原因是什么?有人可以解释一下吗?

感谢。

编辑:冲浪也无法检测到一些关键点,大约每千米2个。

0 个答案:

没有答案