fixed detector evaluation test

This commit is contained in:
Maria Dimashova 2010-10-01 09:02:54 +00:00
parent 65a0470326
commit d511e62021
2 changed files with 11 additions and 9 deletions

View File

@ -371,7 +371,7 @@ void cv::evaluateFeatureDetector( const Mat& img1, const Mat& img2, const Mat& H
if( keypoints1->empty() )
fdetector->detect( img1, *keypoints1 );
if( keypoints2->empty() )
fdetector->detect( img1, *keypoints2 );
fdetector->detect( img2, *keypoints2 );
calculateRepeatability( img1, img2, H1to2, *keypoints1, *keypoints2, repeatability, correspCount );
}

View File

@ -712,9 +712,11 @@ void DetectorQualityTest::runDatasetTest (const vector<Mat> &imgs, const vector<
{
progress = update_progress( progress, di*TEST_CASE_COUNT + ci, progressCount, 0 );
vector<KeyPoint> keypoints2;
float rep;
evaluateFeatureDetector( imgs[0], imgs[ci+1], Hs[ci], &keypoints1, &keypoints2,
calcQuality[di][ci].repeatability, calcQuality[di][ci].correspondenceCount,
rep, calcQuality[di][ci].correspondenceCount,
detector );
calcQuality[di][ci].repeatability = 100.f*rep;
writeKeypoints( keypontsFS, keypoints2, ci+1);
}
}
@ -748,13 +750,13 @@ int DetectorQualityTest::processResults( int datasetIdx, int caseIdx )
return res;
}
//DetectorQualityTest fastDetectorQuality = DetectorQualityTest( "FAST", "quality-detector-fast" );
//DetectorQualityTest gfttDetectorQuality = DetectorQualityTest( "GFTT", "quality-detector-gftt" );
//DetectorQualityTest harrisDetectorQuality = DetectorQualityTest( "HARRIS", "quality-detector-harris" );
//DetectorQualityTest mserDetectorQuality = DetectorQualityTest( "MSER", "quality-detector-mser" );
//DetectorQualityTest starDetectorQuality = DetectorQualityTest( "STAR", "quality-detector-star" );
//DetectorQualityTest siftDetectorQuality = DetectorQualityTest( "SIFT", "quality-detector-sift" );
//DetectorQualityTest surfDetectorQuality = DetectorQualityTest( "SURF", "quality-detector-surf" );
DetectorQualityTest fastDetectorQuality = DetectorQualityTest( "FAST", "quality-detector-fast" );
DetectorQualityTest gfttDetectorQuality = DetectorQualityTest( "GFTT", "quality-detector-gftt" );
DetectorQualityTest harrisDetectorQuality = DetectorQualityTest( "HARRIS", "quality-detector-harris" );
DetectorQualityTest mserDetectorQuality = DetectorQualityTest( "MSER", "quality-detector-mser" );
DetectorQualityTest starDetectorQuality = DetectorQualityTest( "STAR", "quality-detector-star" );
DetectorQualityTest siftDetectorQuality = DetectorQualityTest( "SIFT", "quality-detector-sift" );
DetectorQualityTest surfDetectorQuality = DetectorQualityTest( "SURF", "quality-detector-surf" );
/****************************************************************************************\
* Descriptors evaluation *