From de6a934f669c3d5ba8d5d401b693d0fc12eee395 Mon Sep 17 00:00:00 2001 From: Roman Donchenko Date: Tue, 13 Aug 2013 17:36:38 +0400 Subject: [PATCH] Boring changes - nonfree. --- modules/nonfree/test/test_features2d.cpp | 8 ++++---- modules/nonfree/test/test_keypoints.cpp | 2 +- modules/nonfree/test/test_rotation_and_scale_invariance.cpp | 12 ++++++------ 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/modules/nonfree/test/test_features2d.cpp b/modules/nonfree/test/test_features2d.cpp index bff8a38..7c888e2 100644 --- a/modules/nonfree/test/test_features2d.cpp +++ b/modules/nonfree/test/test_features2d.cpp @@ -231,7 +231,7 @@ void CV_FeatureDetectorTest::regressionTest() void CV_FeatureDetectorTest::run( int /*start_from*/ ) { - if( fdetector.empty() ) + if( !fdetector ) { ts->printf( cvtest::TS::LOG, "Feature detector is empty.\n" ); ts->set_failed_test_info( cvtest::TS::FAIL_INVALID_TEST_DATA ); @@ -464,7 +464,7 @@ protected: void run(int) { createDescriptorExtractor(); - if( dextractor.empty() ) + if( !dextractor ) { ts->printf(cvtest::TS::LOG, "Descriptor extractor is empty.\n"); ts->set_failed_test_info( cvtest::TS::FAIL_INVALID_TEST_DATA ); @@ -1101,7 +1101,7 @@ protected: void run(int) { Ptr f = Algorithm::create("Feature2D." + fname); - if(f.empty()) + if(!f) return; string path = string(ts->get_data_path()) + "detectors_descriptors_evaluation/planar/"; string imgname1 = path + "box.png"; @@ -1156,7 +1156,7 @@ public: FeatureDetectorUsingMaskTest(const Ptr& featureDetector) : featureDetector_(featureDetector) { - CV_Assert(!featureDetector_.empty()); + CV_Assert(featureDetector_); } protected: diff --git a/modules/nonfree/test/test_keypoints.cpp b/modules/nonfree/test/test_keypoints.cpp index 3984f19..b046d75 100644 --- a/modules/nonfree/test/test_keypoints.cpp +++ b/modules/nonfree/test/test_keypoints.cpp @@ -62,7 +62,7 @@ protected: virtual void run(int) { cv::initModule_features2d(); - CV_Assert(!detector.empty()); + CV_Assert(detector); string imgFilename = string(ts->get_data_path()) + FEATURES2D_DIR + "/" + IMAGE_FILENAME; // Read the test image. diff --git a/modules/nonfree/test/test_rotation_and_scale_invariance.cpp b/modules/nonfree/test/test_rotation_and_scale_invariance.cpp index b63b8b7..47efc60 100644 --- a/modules/nonfree/test/test_rotation_and_scale_invariance.cpp +++ b/modules/nonfree/test/test_rotation_and_scale_invariance.cpp @@ -210,7 +210,7 @@ public: minKeyPointMatchesRatio(_minKeyPointMatchesRatio), minAngleInliersRatio(_minAngleInliersRatio) { - CV_Assert(!featureDetector.empty()); + CV_Assert(featureDetector); } protected: @@ -323,8 +323,8 @@ public: normType(_normType), minDescInliersRatio(_minDescInliersRatio) { - CV_Assert(!featureDetector.empty()); - CV_Assert(!descriptorExtractor.empty()); + CV_Assert(featureDetector); + CV_Assert(descriptorExtractor); } protected: @@ -410,7 +410,7 @@ public: minKeyPointMatchesRatio(_minKeyPointMatchesRatio), minScaleInliersRatio(_minScaleInliersRatio) { - CV_Assert(!featureDetector.empty()); + CV_Assert(featureDetector); } protected: @@ -530,8 +530,8 @@ public: normType(_normType), minDescInliersRatio(_minDescInliersRatio) { - CV_Assert(!featureDetector.empty()); - CV_Assert(!descriptorExtractor.empty()); + CV_Assert(featureDetector); + CV_Assert(descriptorExtractor); } protected: -- 2.7.4