From b668d3f69307cf398a7fb4a41e35cb2c40b1e587 Mon Sep 17 00:00:00 2001 From: Philippe FOUBERT Date: Sat, 22 Aug 2015 13:39:34 +0200 Subject: [PATCH] Modification of the related tests in core/tests/ocl --- modules/core/test/ocl/test_matrix_operation.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/modules/core/test/ocl/test_matrix_operation.cpp b/modules/core/test/ocl/test_matrix_operation.cpp index b19b74f543..c32aa5a3fa 100644 --- a/modules/core/test/ocl/test_matrix_operation.cpp +++ b/modules/core/test/ocl/test_matrix_operation.cpp @@ -85,7 +85,7 @@ PARAM_TEST_CASE(ConvertTo, MatDepth, MatDepth, Channels, bool) } }; -OCL_TEST_P(ConvertTo, Accuracy) +OCL_TEST_P(ConvertTo, WithScale_Accuracy) { for (int j = 0; j < test_loop_times; j++) { @@ -101,6 +101,20 @@ OCL_TEST_P(ConvertTo, Accuracy) } } +OCL_TEST_P(ConvertTo, NoScale_Accuracy) +{ + for (int j = 0; j < test_loop_times; j++) + { + generateTestData(); + + OCL_OFF(src_roi.convertTo(dst_roi, dstType, 1, 0)); + OCL_ON(usrc_roi.convertTo(udst_roi, dstType, 1, 0)); + + double eps = CV_MAT_DEPTH(dstType) >= CV_32F ? 2e-4 : 1; + OCL_EXPECT_MATS_NEAR(dst, eps); + } +} + //////////////////////////////// CopyTo ///////////////////////////////////////////////// PARAM_TEST_CASE(CopyTo, MatDepth, Channels, bool, bool)