From 958604a68e4ac7c1db36c331b519336737544b00 Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Sun, 29 Sep 2013 06:35:12 +0400 Subject: [PATCH] perf test: update error message about relative error --- modules/ts/src/ts_perf.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/ts/src/ts_perf.cpp b/modules/ts/src/ts_perf.cpp index dc7f45320..b4fa00b42 100644 --- a/modules/ts/src/ts_perf.cpp +++ b/modules/ts/src/ts_perf.cpp @@ -476,6 +476,9 @@ void Regression::verify(cv::FileNode node, cv::InputArray array, double eps, ERR int violations = countViolations(expected, actual, diff, eps, &maxv, &maxa); if (violations > 0) { + if(expected.total() * expected.channels() < 12) + std::cout << " Expected: " << std::endl << expected << std::endl << " Actual:" << std::endl << actual << std::endl; + FAIL() << " Relative difference (" << maxv << " of " << maxa << " allowed) between argument \"" << node.name() << "[" << idx << "]\" and expected value is greater than " << eps << " in " << violations << " points"; } @@ -530,6 +533,9 @@ void Regression::verify(cv::FileNode node, cv::InputArray array, double eps, ERR int violations = countViolations(expected, actual, diff, eps, &maxv, &maxa); if (violations > 0) { + if(expected.total() * expected.channels() < 12) + std::cout << " Expected: " << std::endl << expected << std::endl << " Actual:" << std::endl << actual << std::endl; + FAIL() << " Relative difference (" << maxv << " of " << maxa << " allowed) between argument \"" << node.name() << "\" and expected value is greater than " << eps << " in " << violations << " points"; }