【问题标题】:OpenCV evaluateFeatureDetector for Python?Python的OpenCV评估特征检测器?
【发布时间】:2016-05-19 06:57:52
【问题描述】:

我正在使用 Python 和 OpenCV 3.0,我正在尝试评估两个图像的 SIFT 描述符。更具体地说,我对重复率感兴趣。在 C++ 中有一个用于执行评估的函数:

 cv::evaluateFeatureDetector(img_1c, img_2c, h12, &key_points_1, &key_points_2, repeatability, corrCounter); 

但是,我没有在 Python 中找到任何实现,而且我真的不明白如何(以及是否)可以使用这个函数。有没有其他方法可以计算python中的重复率?

【问题讨论】:

    标签: python opencv feature-detection sift


    【解决方案1】:

    这是语法:

     void cv::evaluateFeatureDetector   (   const Mat &     img1,
    const Mat &     img2,
    const Mat &     H1to2,
    std::vector< KeyPoint > *   keypoints1,
    std::vector< KeyPoint > *   keypoints2,
    float &     repeatability,
    int &   correspCount,
    const Ptr< FeatureDetector > &  fdetector = Ptr< FeatureDetector >() 
    )   
    

    img1 和 img2 是要匹配的两个图像,H1to2 是单应矩阵,可以这样计算:

     H1to2 = cv::findHomography( std::vector<cv::Point2f> srcPoints , std::vector<cv::Point2f> refPoints, CV_RANSAC, 1 );
    

    进行特征匹配后得到srcPoints和refPoints。

    repeatability 和 correspCount 是函数的输出。

    【讨论】:

    • 我确实了解重复率标准的工作原理,我只是想知道 Python 中是否存在等效函数。到目前为止,我一直在尝试编写自己的代码,但我仍然必须对其进行测试以查看它是否产生与 C++ 中的“cv::evaluateFeatureDetector”相同的结果
    • 你没有回答@GStav 的问题。
    猜你喜欢
    • 1970-01-01
    • 2014-04-04
    • 2012-02-26
    • 2013-03-05
    • 1970-01-01
    • 2023-03-21
    • 2013-07-02
    • 1970-01-01
    • 2011-07-11
    相关资源
    最近更新 更多