c++ - cv::flann::index::knnsearch values of indices and dists -


ok given following code

index.knnsearch(mat,indices,dists,3); (int = 0; < indices.rows; i++ ) {    indices.at<int>(i,0) // index of match    indices.at<int>(i,1) // ????? this?    indices.at<int>(i,2) // , this? } 

also dists, do 3 values in each row? how make useful ratio or percentage match? in indices need know how many descriptors out of 500 matched, i'm sure data shows somehow, don't understand it. please help

suppose call:-

knnsearch(mat,indices,dists,n); 

note - n value passed caller.

on return,

"indices" refer array having "n" closest neighbours found algorithm.

"dists" refers distance of same indices.

so, in case mentioned in question, n=3, , 3 closest neighbours returned along distances. how use it upto use-case.


Comments

Popular posts from this blog

Delphi XE2 Indy10 udp client-server interchange using SendBuffer-ReceiveBuffer -

Qt ActiveX WMI QAxBase::dynamicCallHelper: ItemIndex(int): No such property in -

Enable autocomplete or intellisense in Atom editor for PHP -