特征点的匹配正确衡量标准与量化

转载请注明链接:https://www.cnblogs.com/Alliswell-WP/p/MatchingFeaturePointsCorrectlyMeasuresAndQuantifies.html

有问题请及时联系博主:Alliswell_WP

 

问题描述:特征匹配中如何计算正确匹配点或误匹配点?正确匹配率?特征匹配的评价标准是什么?而网上论文和期刊还有大量错误,给出的又未给计算方法。

如:

它的匹配准确率=改进RANSAC匹配个数/BF粗匹配个数,是错误的。

 它的匹配误差=误匹配对/匹配对数,但是不知道怎么计算的误匹配对!!!

粗匹配和精匹配

 给出了正确匹配对和匹配正确率,但是不知道怎么计算的!!!

说明:目前图像匹配中,局部特征匹配占据了绝大部分,常用的局部特征匹配方法有SIFT、SURF、ORB、BRIEF、KAZE等,

  • 1
    点赞
  • 10
    收藏
    觉得还不错? 一键收藏
  • 6
    评论
在PCL中,可以使用`pcl::registration::TransformationEstimationSVD`类中的`estimateRigidTransformation`方法进行匹配,并使用`pcl::registration::CorrespondenceEstimation`类中的`determineReciprocalCorrespondences`方法计算匹配对。根据匹配对,可以使用以下代码计算匹配准确率: ```cpp #include <pcl/registration/transformation_estimation_svd.h> #include <pcl/registration/correspondence_estimation.h> // 假设我们有两个云A和B,需要找到它们之间的对应关系 pcl::PointCloud<pcl::PointXYZ>::Ptr cloudA(new pcl::PointCloud<pcl::PointXYZ>); pcl::PointCloud<pcl::PointXYZ>::Ptr cloudB(new pcl::PointCloud<pcl::PointXYZ>); // ... 从文件或传感器中读取云数据,将数据存储到cloudA和cloudB中 ... // 使用SVD算法进行匹配 pcl::registration::TransformationEstimationSVD<pcl::PointXYZ, pcl::PointXYZ> svd; Eigen::Matrix4f transform; svd.estimateRigidTransformation(*cloudA, *cloudB, transform); // 计算匹配对 pcl::registration::CorrespondenceEstimation<pcl::PointXYZ, pcl::PointXYZ> est; est.setInputSource(cloudA); est.setInputTarget(cloudB); pcl::Correspondences correspondences; est.determineReciprocalCorrespondences(correspondences); // 计算匹配准确率 int TP = 0, FP = 0; for (int i = 0; i < correspondences.size(); ++i) { int idx1 = correspondences[i].indexQuery; int idx2 = correspondences[i].indexMatch; float dist = (cloudA->points[idx1].getVector4fMap() - cloudB->points[idx2].getVector4fMap() * transform).norm(); if (dist < threshold) // 阈值为允许的匹配误差范围 ++TP; else ++FP; } float accuracy = (float)TP / (TP + FP); std::cout << "匹配准确率:" << accuracy << std::endl; ``` 需要注意的是,这里使用的是直接计算之间的距离来判断匹配准确性,因此需要设置一个允许的匹配误差范围`threshold`,只有当匹配距离小于该阈值时才认为是正确匹配对。同时,我们也可以根据具体需求,对匹配准确率的计算方法进行更改。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 6
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值