From 2637b18b67a9236fd58f3239e11f25d9f0393c19 Mon Sep 17 00:00:00 2001 From: vbystricky Date: Tue, 5 Aug 2014 16:34:23 +0400 Subject: [PATCH] Fix epsilon for OpenCL function ConverTo, for convertation from float to integer types --- modules/core/test/ocl/test_matrix_operation.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/core/test/ocl/test_matrix_operation.cpp b/modules/core/test/ocl/test_matrix_operation.cpp index 1ff3bec6c2..252db01d16 100644 --- a/modules/core/test/ocl/test_matrix_operation.cpp +++ b/modules/core/test/ocl/test_matrix_operation.cpp @@ -96,7 +96,7 @@ OCL_TEST_P(ConvertTo, Accuracy) OCL_OFF(src_roi.convertTo(dst_roi, dstType, alpha, beta)); OCL_ON(usrc_roi.convertTo(udst_roi, dstType, alpha, beta)); - double eps = src_depth >= CV_32F || CV_MAT_DEPTH(dstType) >= CV_32F ? 2e-4 : 1; + double eps = CV_MAT_DEPTH(dstType) >= CV_32F ? 2e-4 : 1; OCL_EXPECT_MATS_NEAR(dst, eps); } }