#2245 Fix BFMatcher::radiusMatchImpl witch Hamming distance (thanks to Jukka Holappa)

This commit is contained in:
Andrey Kamaev 2012-08-15 15:02:20 +04:00
parent 456890e9e4
commit 36fe62d7a5

View File

@ -426,10 +426,10 @@ void BFMatcher::radiusMatchImpl( const Mat& queryDescriptors, vector<vector<DMat
for( int qIdx = 0; qIdx < queryDescriptors.rows; qIdx++ )
{
const float* distptr = dist.ptr<float>(qIdx);
const float* distptr = distf.ptr<float>(qIdx);
vector<DMatch>& mq = matches[qIdx];
for( int k = 0; k < dist.cols; k++ )
for( int k = 0; k < distf.cols; k++ )
{
if( distptr[k] <= maxDistance )
mq.push_back( DMatch(qIdx, k, iIdx, distptr[k]) );