Merge pull request #2294 from jet47:fix-gpu-issues

This commit is contained in:
Roman Donchenko 2014-02-07 16:54:49 +04:00 committed by OpenCV Buildbot
commit 48f95d92ae
6 changed files with 13 additions and 17 deletions

View File

@ -40,8 +40,6 @@
//
//M*/
#define CUDA_DISABLER
#if !defined CUDA_DISABLER
#include <thrust/device_ptr.h>

View File

@ -40,8 +40,6 @@
//
//M*/
#define CUDA_DISABLER
#include "precomp.hpp"
using namespace std;

View File

@ -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)
@ -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;

View File

@ -422,7 +422,7 @@ PARAM_TEST_CASE(Subtract_Array, cv::gpu::DeviceInfo, cv::Size, std::pair<MatDept
}
};
GPU_TEST_P(Subtract_Array, DISABLED_Accuracy)
GPU_TEST_P(Subtract_Array, Accuracy)
{
cv::Mat mat1 = randomMat(size, stype);
cv::Mat mat2 = randomMat(size, stype);
@ -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(

View File

@ -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);
}
}

View File

@ -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());