From: Vadim Pisarevsky Date: Tue, 18 Sep 2012 10:34:50 +0000 (+0400) Subject: improved the condition in the FAST test X-Git-Tag: accepted/2.0/20130307.220821~364^2~202 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2d334401b13ab38dbdea41130c068cdb2af38538;p=profile%2Fivi%2Fopencv.git improved the condition in the FAST test --- diff --git a/modules/features2d/test/test_fast.cpp b/modules/features2d/test/test_fast.cpp index 761abfc..eef395b 100644 --- a/modules/features2d/test/test_fast.cpp +++ b/modules/features2d/test/test_fast.cpp @@ -112,11 +112,12 @@ void CV_FastTest::run( int ) // We only have testing data for 9_16 but it actually works equally well for 7_12 if ((type==1) || (type==2)){ - if ( 0 != norm(exp_kps1, kps1, NORM_L2) || 0 != norm(exp_kps2, kps2, NORM_L2)) - { - ts->set_failed_test_info(cvtest::TS::FAIL_MISMATCH); - return; - } + if ( exp_kps1.size != kps1.size || 0 != norm(exp_kps1, kps1, NORM_L2) || + exp_kps2.size != kps2.size || 0 != norm(exp_kps2, kps2, NORM_L2)) + { + ts->set_failed_test_info(cvtest::TS::FAIL_MISMATCH); + return; + } } /*cv::namedWindow("Img1"); cv::imshow("Img1", image1);