mirror of
https://github.com/opencv/opencv.git
synced 2025-01-18 06:03:15 +08:00
fixed fail of descriptor-sift test (ticket 567)
This commit is contained in:
parent
761f76c853
commit
3e910e145b
@ -166,13 +166,13 @@ protected:
|
|||||||
Ptr<FeatureDetector> fdetector;
|
Ptr<FeatureDetector> fdetector;
|
||||||
};
|
};
|
||||||
|
|
||||||
CV_FeatureDetectorTest fastTest( "detector_fast", createFeatureDetector("FAST") );
|
CV_FeatureDetectorTest fastTest( "detector-fast", createFeatureDetector("FAST") );
|
||||||
CV_FeatureDetectorTest gfttTest( "detector_gftt", createFeatureDetector("GFTT") );
|
CV_FeatureDetectorTest gfttTest( "detector-gftt", createFeatureDetector("GFTT") );
|
||||||
CV_FeatureDetectorTest harrisTest( "detector_harris", createFeatureDetector("HARRIS") );
|
CV_FeatureDetectorTest harrisTest( "detector-harris", createFeatureDetector("HARRIS") );
|
||||||
CV_FeatureDetectorTest mserTest( "detector_mser", createFeatureDetector("MSER") );
|
CV_FeatureDetectorTest mserTest( "detector-mser", createFeatureDetector("MSER") );
|
||||||
CV_FeatureDetectorTest siftTest( "detector_sift", createFeatureDetector("SIFT") );
|
CV_FeatureDetectorTest siftTest( "detector-sift", createFeatureDetector("SIFT") );
|
||||||
CV_FeatureDetectorTest starTest( "detector_star", createFeatureDetector("STAR") );
|
CV_FeatureDetectorTest starTest( "detector-star", createFeatureDetector("STAR") );
|
||||||
CV_FeatureDetectorTest surfTest( "detector_surf", createFeatureDetector("SURF") );
|
CV_FeatureDetectorTest surfTest( "detector-surf", createFeatureDetector("SURF") );
|
||||||
|
|
||||||
/****************************************************************************************\
|
/****************************************************************************************\
|
||||||
* Regression tests for descriptor extractors. *
|
* Regression tests for descriptor extractors. *
|
||||||
@ -215,8 +215,8 @@ static Mat readMatFromBin( const string& filename )
|
|||||||
class CV_DescriptorExtractorTest : public CvTest
|
class CV_DescriptorExtractorTest : public CvTest
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CV_DescriptorExtractorTest( const char* testName, float _normDif, const Ptr<DescriptorExtractor>& _dextractor, float _prevTime ) :
|
CV_DescriptorExtractorTest( const char* testName, float _maxNormDif, const Ptr<DescriptorExtractor>& _dextractor, float _prevTime ) :
|
||||||
CvTest( testName, "cv::DescriptorExtractor::compute" ), normDif(_normDif), prevTime(_prevTime), dextractor(_dextractor) {}
|
CvTest( testName, "cv::DescriptorExtractor::compute" ), maxNormDif(_maxNormDif), prevTime(_prevTime), dextractor(_dextractor) {}
|
||||||
protected:
|
protected:
|
||||||
virtual void createDescriptorExtractor() {}
|
virtual void createDescriptorExtractor() {}
|
||||||
|
|
||||||
@ -272,9 +272,9 @@ protected:
|
|||||||
Mat validDescriptors = readDescriptors();
|
Mat validDescriptors = readDescriptors();
|
||||||
if( !validDescriptors.empty() )
|
if( !validDescriptors.empty() )
|
||||||
{
|
{
|
||||||
double normVal = norm( calcDescriptors, validDescriptors, NORM_INF );
|
double normValue = norm( calcDescriptors, validDescriptors, NORM_INF );
|
||||||
ts->printf( CvTS::LOG, "nofm (inf) BTW valid and calculated float descriptors = %f\n", normVal );
|
ts->printf( CvTS::LOG, "nofm (inf) BTW valid and calculated float descriptors = %f\n", normValue );
|
||||||
if( normVal > normDif )
|
if( normValue > maxNormDif )
|
||||||
ts->set_failed_test_info( CvTS::FAIL_BAD_ACCURACY );
|
ts->set_failed_test_info( CvTS::FAIL_BAD_ACCURACY );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -300,7 +300,7 @@ protected:
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
const float normDif;
|
const float maxNormDif;
|
||||||
const float prevTime;
|
const float prevTime;
|
||||||
|
|
||||||
Ptr<DescriptorExtractor> dextractor;
|
Ptr<DescriptorExtractor> dextractor;
|
||||||
@ -320,20 +320,20 @@ public:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
CV_DescriptorExtractorTest siftDescriptorTest( "descriptor_sift", 0.001f,
|
CV_DescriptorExtractorTest siftDescriptorTest( "descriptor-sift", 0.008f,
|
||||||
createDescriptorExtractor("SIFT"), 8.06652f );
|
createDescriptorExtractor("SIFT"), 8.06652f );
|
||||||
CV_DescriptorExtractorTest surfDescriptorTest( "descriptor_surf", 0.004f,
|
CV_DescriptorExtractorTest surfDescriptorTest( "descriptor-surf", 0.004f,
|
||||||
createDescriptorExtractor("SURF"), 0.147372f );
|
createDescriptorExtractor("SURF"), 0.147372f );
|
||||||
//CV_DescriptorExtractorTest siftDescriptorTest( "descriptor_opponent_sift", 0.001f,
|
//CV_DescriptorExtractorTest siftDescriptorTest( "descriptor-opponent_sift", 0.001f,
|
||||||
// createDescriptorExtractor("OpponentSIFT"), 8.06652f );
|
// createDescriptorExtractor("OpponentSIFT"), 8.06652f );
|
||||||
//CV_DescriptorExtractorTest surfDescriptorTest( "descriptor_opponent_surf", 0.004f,
|
//CV_DescriptorExtractorTest surfDescriptorTest( "descriptor-opponent_surf", 0.004f,
|
||||||
// createDescriptorExtractor("OpponentSURF"), 0.147372f );
|
// createDescriptorExtractor("OpponentSURF"), 0.147372f );
|
||||||
|
|
||||||
#if CV_SSE2
|
#if CV_SSE2
|
||||||
CV_CalonderDescriptorExtractorTest<uchar> ucharCalonderTest( "descriptor_calonder_uchar",
|
CV_CalonderDescriptorExtractorTest<uchar> ucharCalonderTest( "descriptor-calonder-uchar",
|
||||||
std::numeric_limits<float>::epsilon() + 1,
|
std::numeric_limits<float>::epsilon() + 1,
|
||||||
0.0132175f );
|
0.0132175f );
|
||||||
CV_CalonderDescriptorExtractorTest<float> floatCalonderTest( "descriptor_calonder_float",
|
CV_CalonderDescriptorExtractorTest<float> floatCalonderTest( "descriptor-calonder-float",
|
||||||
std::numeric_limits<float>::epsilon(),
|
std::numeric_limits<float>::epsilon(),
|
||||||
0.0221308f );
|
0.0221308f );
|
||||||
#endif // CV_SSE2
|
#endif // CV_SSE2
|
||||||
|
@ -55,9 +55,9 @@ const char* blacklist[] =
|
|||||||
"chessboard-subpixel", //ticket 473
|
"chessboard-subpixel", //ticket 473
|
||||||
//"color-luv", //ticket 502
|
//"color-luv", //ticket 502
|
||||||
|
|
||||||
"descriptor_sift", //ticket 567
|
//"descriptor-sift", //ticket 567
|
||||||
"descriptor_surf", //ticket 568
|
"descriptor-surf", //ticket 568
|
||||||
"detector_surf", //ticket 578
|
"detector-surf", //ticket 578
|
||||||
|
|
||||||
"filter-generic",
|
"filter-generic",
|
||||||
"flann_saved", //ticket 618
|
"flann_saved", //ticket 618
|
||||||
|
Loading…
Reference in New Issue
Block a user