From 7dd7dd97cd40a996192b02b246dfae16f9f73f40 Mon Sep 17 00:00:00 2001 From: Elena Gvozdeva Date: Wed, 6 Aug 2014 17:31:19 +0400 Subject: [PATCH] fixed nDiffs for CalcBackProject --- modules/imgproc/test/ocl/test_histogram.cpp | 4 ++-- modules/imgproc/test/ocl/test_match_template.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/imgproc/test/ocl/test_histogram.cpp b/modules/imgproc/test/ocl/test_histogram.cpp index 9d73614..6a16efa 100644 --- a/modules/imgproc/test/ocl/test_histogram.cpp +++ b/modules/imgproc/test/ocl/test_histogram.cpp @@ -206,9 +206,9 @@ OCL_TEST_P(CalcBackProject, Mat) OCL_ON(cv::calcBackProject(uimages_roi, channels, uhist_roi, udst_roi, ranges, scale)); Size dstSize = dst_roi.size(); - int nDiffs = (int)(0.06f*dstSize.area()+1); + int nDiffs = std::max((int)(0.07f*dstSize.area()), 1); - //check if the dst mats are the same except 6% difference + //check if the dst mats are the same except 7% difference EXPECT_MAT_N_DIFF(dst_roi, udst_roi, nDiffs); } } diff --git a/modules/imgproc/test/ocl/test_match_template.cpp b/modules/imgproc/test/ocl/test_match_template.cpp index a2c7f57..1d1352a 100644 --- a/modules/imgproc/test/ocl/test_match_template.cpp +++ b/modules/imgproc/test/ocl/test_match_template.cpp @@ -116,9 +116,9 @@ OCL_TEST_P(MatchTemplate, Mat) method == TM_CCORR_NORMED || method == TM_SQDIFF_NORMED || method == TM_CCOEFF_NORMED; - + double eps = isNormed ? 3e-2 : 255.0 * 255.0 * templ.total() * 2e-5; - + Near(eps); } } -- 2.7.4