From 86e12b607416644ec037ca8b34e4eebc6a585165 Mon Sep 17 00:00:00 2001 From: Vladislav Vinogradov Date: Fri, 15 Aug 2014 13:42:06 +0400 Subject: [PATCH] increase epsilon for ResizeSameAsHost test --- modules/gpu/test/test_resize.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/gpu/test/test_resize.cpp b/modules/gpu/test/test_resize.cpp index 460e50c..25f0f0e 100644 --- a/modules/gpu/test/test_resize.cpp +++ b/modules/gpu/test/test_resize.cpp @@ -217,7 +217,8 @@ GPU_TEST_P(ResizeSameAsHost, Accuracy) cv::Mat dst_gold; cv::resize(src, dst_gold, cv::Size(), coeff, coeff, interpolation); - EXPECT_MAT_NEAR(dst_gold, dst, src.depth() == CV_32F ? 1e-2 : 1.0); + // CPU test for cv::resize uses 16 as error threshold for CV_8U, we uses 4 as error threshold for CV_8U + EXPECT_MAT_NEAR(dst_gold, dst, src.depth() == CV_32F ? 1e-2 : src.depth() == CV_8U ? 4.0 : 1.0); } INSTANTIATE_TEST_CASE_P(GPU_ImgProc, ResizeSameAsHost, testing::Combine( -- 2.7.4