From da44a2fac1c0be45d2a987c165298a9629757723 Mon Sep 17 00:00:00 2001 From: Vladislav Vinogradov Date: Wed, 5 Feb 2014 15:59:13 +0400 Subject: [PATCH 1/4] Revert "disable gpu Subtract_Array test:" This reverts commit e91bf95d5832e87aa70240c50f0bf7fcc587e8c8. --- modules/gpu/test/test_core.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/gpu/test/test_core.cpp b/modules/gpu/test/test_core.cpp index 2f1bbd7b2..1edc69b97 100644 --- a/modules/gpu/test/test_core.cpp +++ b/modules/gpu/test/test_core.cpp @@ -422,7 +422,7 @@ PARAM_TEST_CASE(Subtract_Array, cv::gpu::DeviceInfo, cv::Size, std::pair Date: Thu, 6 Feb 2014 10:12:20 +0400 Subject: [PATCH 2/4] Revert "disable gpu CvtColor.*2HSV tests:" This reverts commit 952027a8536215a5e4308c79a59308c6b3426354. --- modules/gpu/test/test_color.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/gpu/test/test_color.cpp b/modules/gpu/test/test_color.cpp index 16f5fc84e..3b4b326e4 100644 --- a/modules/gpu/test/test_color.cpp +++ b/modules/gpu/test/test_color.cpp @@ -840,7 +840,7 @@ GPU_TEST_P(CvtColor, YCrCb42RGBA) EXPECT_MAT_NEAR(dst_gold, dst, 1e-5); } -GPU_TEST_P(CvtColor, DISABLED_BGR2HSV) +GPU_TEST_P(CvtColor, BGR2HSV) { if (depth == CV_16U) return; @@ -856,7 +856,7 @@ GPU_TEST_P(CvtColor, DISABLED_BGR2HSV) EXPECT_MAT_NEAR(dst_gold, dst, depth == CV_32F ? 1e-2 : 1); } -GPU_TEST_P(CvtColor, DISABLED_RGB2HSV) +GPU_TEST_P(CvtColor, RGB2HSV) { if (depth == CV_16U) return; @@ -872,7 +872,7 @@ GPU_TEST_P(CvtColor, DISABLED_RGB2HSV) EXPECT_MAT_NEAR(dst_gold, dst, depth == CV_32F ? 1e-2 : 1); } -GPU_TEST_P(CvtColor, DISABLED_RGB2HSV4) +GPU_TEST_P(CvtColor, RGB2HSV4) { if (depth == CV_16U) return; @@ -896,7 +896,7 @@ GPU_TEST_P(CvtColor, DISABLED_RGB2HSV4) EXPECT_MAT_NEAR(dst_gold, h_dst, depth == CV_32F ? 1e-2 : 1); } -GPU_TEST_P(CvtColor, DISABLED_RGBA2HSV4) +GPU_TEST_P(CvtColor, RGBA2HSV4) { if (depth == CV_16U) return; From 3e4bb371c8a364315dec18df14674d9164b7523d Mon Sep 17 00:00:00 2001 From: Vladislav Vinogradov Date: Thu, 6 Feb 2014 12:41:19 +0400 Subject: [PATCH 3/4] fix epsilons for several gpu tests --- modules/gpu/test/test_color.cpp | 8 ++++---- modules/gpu/test/test_core.cpp | 4 ++-- modules/gpu/test/test_gpumat.cpp | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/modules/gpu/test/test_color.cpp b/modules/gpu/test/test_color.cpp index 3b4b326e4..321785ffe 100644 --- a/modules/gpu/test/test_color.cpp +++ b/modules/gpu/test/test_color.cpp @@ -715,7 +715,7 @@ GPU_TEST_P(CvtColor, BGR2YCrCb) cv::Mat dst_gold; cv::cvtColor(src, dst_gold, cv::COLOR_BGR2YCrCb); - EXPECT_MAT_NEAR(dst_gold, dst, 1.0); + EXPECT_MAT_NEAR(dst_gold, dst, depth == CV_32F ? 1e-2 : 1); } GPU_TEST_P(CvtColor, RGB2YCrCb) @@ -728,7 +728,7 @@ GPU_TEST_P(CvtColor, RGB2YCrCb) cv::Mat dst_gold; cv::cvtColor(src, dst_gold, cv::COLOR_RGB2YCrCb); - EXPECT_MAT_NEAR(dst_gold, dst, 1.0); + EXPECT_MAT_NEAR(dst_gold, dst, depth == CV_32F ? 1e-2 : 1); } GPU_TEST_P(CvtColor, BGR2YCrCb4) @@ -749,7 +749,7 @@ GPU_TEST_P(CvtColor, BGR2YCrCb4) cv::split(h_dst, channels); cv::merge(channels, 3, h_dst); - EXPECT_MAT_NEAR(dst_gold, h_dst, 1.0); + EXPECT_MAT_NEAR(dst_gold, h_dst, depth == CV_32F ? 1e-2 : 1); } GPU_TEST_P(CvtColor, RGBA2YCrCb4) @@ -771,7 +771,7 @@ GPU_TEST_P(CvtColor, RGBA2YCrCb4) cv::split(h_dst, channels); cv::merge(channels, 3, h_dst); - EXPECT_MAT_NEAR(dst_gold, h_dst, 1.0); + EXPECT_MAT_NEAR(dst_gold, h_dst, depth == CV_32F ? 1e-2 : 1); } GPU_TEST_P(CvtColor, YCrCb2BGR) diff --git a/modules/gpu/test/test_core.cpp b/modules/gpu/test/test_core.cpp index 1edc69b97..7ceeaedf0 100644 --- a/modules/gpu/test/test_core.cpp +++ b/modules/gpu/test/test_core.cpp @@ -3582,7 +3582,7 @@ GPU_TEST_P(Normalize, WithOutMask) cv::Mat dst_gold; cv::normalize(src, dst_gold, alpha, beta, norm_type, type); - EXPECT_MAT_NEAR(dst_gold, dst, 1.0); + EXPECT_MAT_NEAR(dst_gold, dst, type < CV_32F ? 1.0 : 1e-4); } GPU_TEST_P(Normalize, WithMask) @@ -3598,7 +3598,7 @@ GPU_TEST_P(Normalize, WithMask) dst_gold.setTo(cv::Scalar::all(0)); cv::normalize(src, dst_gold, alpha, beta, norm_type, type, mask); - EXPECT_MAT_NEAR(dst_gold, dst, 1.0); + EXPECT_MAT_NEAR(dst_gold, dst, type < CV_32F ? 1.0 : 1e-4); } INSTANTIATE_TEST_CASE_P(GPU_Core, Normalize, testing::Combine( diff --git a/modules/gpu/test/test_gpumat.cpp b/modules/gpu/test/test_gpumat.cpp index 210b6a441..fee264341 100644 --- a/modules/gpu/test/test_gpumat.cpp +++ b/modules/gpu/test/test_gpumat.cpp @@ -281,7 +281,7 @@ GPU_TEST_P(ConvertTo, WithOutScaling) cv::Mat dst_gold; src.convertTo(dst_gold, depth2); - EXPECT_MAT_NEAR(dst_gold, dst, 1.0); + EXPECT_MAT_NEAR(dst_gold, dst, depth2 < CV_32F ? 1.0 : 1e-4); } } From 5d099df57864d083881f026ffe32637afac6ba2e Mon Sep 17 00:00:00 2001 From: Vladislav Vinogradov Date: Thu, 6 Feb 2014 16:58:40 +0400 Subject: [PATCH 4/4] Revert "disable CUDA generalized Hough Transform" This reverts commit 33d42b740c6fe938b63a0b25c9ad51741aba48c3. --- modules/gpu/src/cuda/generalized_hough.cu | 2 -- modules/gpu/src/generalized_hough.cpp | 2 -- modules/gpu/test/test_hough.cpp | 2 +- 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/modules/gpu/src/cuda/generalized_hough.cu b/modules/gpu/src/cuda/generalized_hough.cu index 35451e7e2..5e2041eae 100644 --- a/modules/gpu/src/cuda/generalized_hough.cu +++ b/modules/gpu/src/cuda/generalized_hough.cu @@ -40,8 +40,6 @@ // //M*/ -#define CUDA_DISABLER - #if !defined CUDA_DISABLER #include diff --git a/modules/gpu/src/generalized_hough.cpp b/modules/gpu/src/generalized_hough.cpp index 867ba7ee7..a92c37d1a 100644 --- a/modules/gpu/src/generalized_hough.cpp +++ b/modules/gpu/src/generalized_hough.cpp @@ -40,8 +40,6 @@ // //M*/ -#define CUDA_DISABLER - #include "precomp.hpp" using namespace std; diff --git a/modules/gpu/test/test_hough.cpp b/modules/gpu/test/test_hough.cpp index 6441fc69a..f876a7a2b 100644 --- a/modules/gpu/test/test_hough.cpp +++ b/modules/gpu/test/test_hough.cpp @@ -189,7 +189,7 @@ PARAM_TEST_CASE(GeneralizedHough, cv::gpu::DeviceInfo, UseRoi) { }; -GPU_TEST_P(GeneralizedHough, DISABLED_POSITION) +GPU_TEST_P(GeneralizedHough, POSITION) { const cv::gpu::DeviceInfo devInfo = GET_PARAM(0); cv::gpu::setDevice(devInfo.deviceID());