From 0f01ae43bea6e98e309db459ed7b2a4e82b3ad8f Mon Sep 17 00:00:00 2001 From: Alexander Shishkov Date: Fri, 19 Nov 2010 14:29:37 +0000 Subject: [PATCH] moved failed tests to blacklists filter-generic - ticket 690 mhi-global - ticket 457 fixed issue 689 --- tests/cv/src/detectors_test.cpp | 16 +++++++++++----- tests/cv/src/tsysa.cpp | 8 ++------ 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/tests/cv/src/detectors_test.cpp b/tests/cv/src/detectors_test.cpp index 15d7777..e714fc8 100644 --- a/tests/cv/src/detectors_test.cpp +++ b/tests/cv/src/detectors_test.cpp @@ -60,7 +60,7 @@ public: ~CV_DetectorsTest(); protected: void run(int); - template bool testDedector(const Mat& img, const T& detector, vector& expected); + template bool testDetector(const Mat& img, const T& detector, vector& expected); void LoadExpected(const string& file, vector& out); }; @@ -153,7 +153,7 @@ struct WrapPoint struct sortByR { bool operator()(const KeyPoint& kp1, const KeyPoint& kp2) { return norm(kp1.pt) < norm(kp2.pt); } }; -template bool CV_DetectorsTest::testDedector(const Mat& img, const T& detector, vector& exp) +template bool CV_DetectorsTest::testDetector(const Mat& img, const T& detector, vector& exp) { vector orig_kpts; detector(img, orig_kpts); @@ -205,7 +205,13 @@ template bool CV_DetectorsTest::testDedector(const Mat& img, const T& } sort(result.begin(), result.end(), sortByR()); - sort(exp.begin(), exp.end(), sortByR()); + sort(exp.begin(), exp.end(), sortByR()); + + if (result.size() != exp.size()) + { + ts->set_failed_test_info(CvTS::FAIL_INVALID_TEST_DATA); + return false; + } int foundCounter1 = 0; for(size_t i = 0; i < exp.size(); ++i) @@ -292,14 +298,14 @@ void CV_DetectorsTest::run( int /*start_from*/ ) if (exp.empty()) return; - if (!testDedector(to_test, SurfNoMaskWrap(SURF(1536+512+512, 2)), exp)) + if (!testDetector(to_test, SurfNoMaskWrap(SURF(1536+512+512, 2)), exp)) return; LoadExpected(string(ts->get_data_path()) + "detectors/star.xml", exp); if (exp.empty()) return; - if (!testDedector(to_test, StarDetector(45, 30, 10, 8, 5), exp)) + if (!testDetector(to_test, StarDetector(45, 30, 10, 8, 5), exp)) return; ts->set_failed_test_info( CvTS::OK); diff --git a/tests/cv/src/tsysa.cpp b/tests/cv/src/tsysa.cpp index fdc4de7..b6e1c6a 100644 --- a/tests/cv/src/tsysa.cpp +++ b/tests/cv/src/tsysa.cpp @@ -47,13 +47,9 @@ const char* blacklist[] = { "calibrate-camera-artificial", //ticket 472 "inpaint", //ticket 570 - //"optflow-estimate-rigid", //ticket 433 - //"subdiv", //ticket 454 "warp-resize", //ticket 429 - //"warp-affine", //ticket 572 - //"warp-perspective", //ticket 575 - //"_3d-fundam", //ticket 434 - //"posit", //ticket 430 + "filter-generic", //ticket 690 + "mhi-global", //ticket 457 0 }; -- 2.7.4