gpt4 book ai didi

opencv - FlannBasedMatcher 使用哪个距离函数,如何更改?

转载 作者:太空宇宙 更新时间:2023-11-03 20:59:07 24 4
gpt4 key购买 nike

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

最佳答案

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

弗兰::搜索参数();//32 检查,0,sorted=trueflann::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"); \

关于opencv - FlannBasedMatcher 使用哪个距离函数,如何更改?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10897475/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com