increase epsilons for tests due to different optimizations (IPP vs CUDA, float vs double)

This commit is contained in:
Vladislav Vinogradov 2014-12-18 11:37:26 +03:00
parent 25f33a7e30
commit ec33c4ae36
2 changed files with 4 additions and 4 deletions

View File

@ -69,7 +69,7 @@ public:
Mat dst_gold; Mat dst_gold;
cv::sqrt(src, dst_gold); cv::sqrt(src, dst_gold);
EXPECT_MAT_NEAR(dst_gold, dst, 0.0); EXPECT_MAT_NEAR(dst_gold, dst, 1e-4);
} }
void test_expr() void test_expr()
@ -88,7 +88,7 @@ public:
cv::multiply(src1, src2, dst_gold); cv::multiply(src1, src2, dst_gold);
cv::sqrt(dst_gold, dst_gold); cv::sqrt(dst_gold, dst_gold);
EXPECT_MAT_NEAR(dst_gold, dst, 0.0); EXPECT_MAT_NEAR(dst_gold, dst, 1e-4);
} }
}; };

View File

@ -69,7 +69,7 @@ enum {
GpuMat_<SelectIf<dst_cn == 1, uchar, uchar ## dst_cn>::type> dstb = src_space ## _to_ ## dst_space ## _(d_srcb); \ GpuMat_<SelectIf<dst_cn == 1, uchar, uchar ## dst_cn>::type> dstb = src_space ## _to_ ## dst_space ## _(d_srcb); \
Mat dstb_gold; \ Mat dstb_gold; \
cv::cvtColor(srcb, dstb_gold, COLOR_ ## src_space ## 2 ## dst_space); \ cv::cvtColor(srcb, dstb_gold, COLOR_ ## src_space ## 2 ## dst_space); \
EXPECT_MAT_NEAR(dstb_gold, dstb, 1.0); \ EXPECT_MAT_NEAR(dstb_gold, dstb, 2.0); \
Mat bgrf = randomMat(size, CV_32FC3, 0, 1); \ Mat bgrf = randomMat(size, CV_32FC3, 0, 1); \
Mat srcf; \ Mat srcf; \
cv::cvtColor(bgrf, srcf, COLOR_BGR ## 2 ## src_space, src_cn); \ cv::cvtColor(bgrf, srcf, COLOR_BGR ## 2 ## src_space, src_cn); \
@ -77,7 +77,7 @@ enum {
GpuMat_<SelectIf<dst_cn == 1, float, float ## dst_cn>::type> dstf = src_space ## _to_ ## dst_space ## _(d_srcf); \ GpuMat_<SelectIf<dst_cn == 1, float, float ## dst_cn>::type> dstf = src_space ## _to_ ## dst_space ## _(d_srcf); \
Mat dstf_gold; \ Mat dstf_gold; \
cv::cvtColor(srcf, dstf_gold, COLOR_ ## src_space ## 2 ## dst_space); \ cv::cvtColor(srcf, dstf_gold, COLOR_ ## src_space ## 2 ## dst_space); \
EXPECT_MAT_NEAR(dstf_gold, dstf, 1.0); \ EXPECT_MAT_NEAR(dstf_gold, dstf, 2.0); \
} }
// RGB <-> BGR // RGB <-> BGR