首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >FlannBasedMatcher使用哪个距离函数以及如何更改它?

FlannBasedMatcher使用哪个距离函数以及如何更改它?
EN

Stack Overflow用户
提问于 2012-06-05 20:39:33
回答 1查看 1.5K关注 0票数 4

openCVs使用哪个距离函数,是否可以更改默认值?在Muja和Lowe的原始flann的用户手册中,有一些不同的距离类型(flann_distance_t),我在opencv中看不到改变它们的方法:-/

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2012-07-12 05:08:34

这在openCV的代码中记录得非常少,但是flannBasedMatcher的默认设置在这两个函数中找到

flann::SearchParams();//32检查,0,sorted=true flann::KDTreeIndexParams();//使用4棵随机KD树

默认情况下,距离函数为FLANN_DIST_L2。

我想这段代码解释了为什么你还不能修改它,printf("[WARNING] You are using cv::flann::Index (or cv::flann::GenericIndex) and have also changed the distance using cvflann::set_distance_type. This is no longer working as expected cv::flann::Index always uses L2). You should create the index templated on the distance, for example for L1 distance use: GenericIndex< L1<float> > \n"); \

票数 3
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/10897475

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档