openCVs使用哪个距离函数,是否可以更改默认值?在Muja和Lowe的原始flann的用户手册中,有一些不同的距离类型(flann_distance_t),我在opencv中看不到改变它们的方法:-/
发布于 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"); \
https://stackoverflow.com/questions/10897475
复制相似问题