diff --git a/tests/cv/src/adetectordescriptor_evaluation.cpp b/tests/cv/src/adetectordescriptor_evaluation.cpp index 9d38081b63..f0dede8089 100644 --- a/tests/cv/src/adetectordescriptor_evaluation.cpp +++ b/tests/cv/src/adetectordescriptor_evaluation.cpp @@ -447,7 +447,7 @@ struct DMatchForEvaluation : public DMatch void evaluateDescriptors( const vector& keypoints1, const vector& keypoints2, - vector& matches1to2, + const vector >& matches1to2, vector &allMatches, const Mat& img1, const Mat& img2, const Mat& H1to2, int &correctMatchCount, int &falseMatchCount, int& correspondenceCount ) { @@ -468,18 +468,23 @@ void evaluateDescriptors( const vector& keypoints1, const vect for( size_t i = 0; i < matches1to2.size(); i++ ) { + for( size_t j = 0;j < matches1to2[i].size(); j++ ) + { //if( matches1to2[i].match.indexTrain > 0 ) //{ - matches1to2[i].isCorrect = thresholdedOverlapMask( matches1to2[i].indexQuery, matches1to2[i].indexTrain); - if( matches1to2[i].isCorrect ) + DMatchForEvaluation match = matches1to2[i][j]; + match.isCorrect = thresholdedOverlapMask( match.indexQuery, match.indexTrain); + if( match.isCorrect ) correctMatchCount++; else falseMatchCount++; + allMatches.push_back( match ); //} //else //{ // matches1to2[i].isCorrect = -1; //} + } } } @@ -1448,20 +1453,14 @@ void DescriptorQualityTest::runDatasetTest (const vector &imgs, const vecto vector > matches1to2; //TODO: use more sophisticated strategy to choose threshold descMatch->match( imgs[0], keypoints1, matches1to2, std::numeric_limits::max() ); - vector matches; - for( size_t i=0;iclear (); }