Use Euclidean distance in SURF

℡╲_俬逩灬. 提交于 2019-12-02 03:03:29

Yes, you need. Nearest neigbour distance ratio means that you: 1)Calculate distances from the descriptor in one image to the the 1st and 2nd nearest neighbours in the second image. d1 = d(desc1_img1, descA_img2); d2 = d(desc1_img1, descB_img2). 2)Calculate distance ratio R = d1/d2. If R < 0.6, then match is probably good. It is done because you will always got "nearest" descriptor in the second image, no matter how bad it is - you check it with ratio.

So if you have no distances, from what will you calculate ratio?

Type of distance depends on value you passed when constructed KNN-matcher in normType parameter.

 BFMatcher::BFMatcher(int normType=NORM_L2, bool crossCheck=false )  
  • NORM_L2 means Eucledian d(p1,p2) = sqrt((x1 - x2)^2+(y1 - y2)^2 + ...);
  • NORM_Ll means Manhattan d(p1,p2) = abs(x1 - x2)+abs(y1 - y2) + ..;
  • NORM_HAMMING means Hamming, etc.
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!