fixed nDiffs for CalcBackProject
authorElena Gvozdeva <elena.gvozdeva@itseez.com>
Wed, 6 Aug 2014 13:31:19 +0000 (17:31 +0400)
committerElena Gvozdeva <elena.gvozdeva@itseez.com>
Thu, 7 Aug 2014 11:36:00 +0000 (15:36 +0400)
modules/imgproc/test/ocl/test_histogram.cpp
modules/imgproc/test/ocl/test_match_template.cpp

index 9d73614..6a16efa 100644 (file)
@@ -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);
     }
 }
index a2c7f57..1d1352a 100644 (file)
@@ -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);
     }
 }