changed eps in ocl::GaussianBlur test

This commit is contained in:
Ilya Lavrenov 2013-10-30 16:04:48 +04:00
parent 957c85e9c4
commit 8dfde47f89
2 changed files with 10 additions and 10 deletions

View File

@ -1329,6 +1329,15 @@ Ptr<FilterEngine_GPU> cv::ocl::createGaussianFilter_GPU(int type, Size ksize, do
void cv::ocl::GaussianBlur(const oclMat &src, oclMat &dst, Size ksize, double sigma1, double sigma2, int bordertype)
{
if (bordertype != BORDER_CONSTANT)
{
if (src.rows == 1)
ksize.height = 1;
if (src.cols == 1)
ksize.width = 1;
}
if (ksize.width == 1 && ksize.height == 1)
{
src.copyTo(dst);
@ -1351,15 +1360,6 @@ void cv::ocl::GaussianBlur(const oclMat &src, oclMat &dst, Size ksize, double si
dst.create(src.size(), src.type());
if (bordertype != BORDER_CONSTANT)
{
if (src.rows == 1)
ksize.height = 1;
if (src.cols == 1)
ksize.width = 1;
}
Ptr<FilterEngine_GPU> f = createGaussianFilter_GPU(src.type(), ksize, sigma1, sigma2, bordertype);
f->apply(src, dst);
}

View File

@ -272,7 +272,7 @@ OCL_TEST_P(GaussianBlurTest, Mat)
GaussianBlur(src_roi, dst_roi, Size(ksize, ksize), sigma1, sigma2, borderType);
ocl::GaussianBlur(gsrc_roi, gdst_roi, Size(ksize, ksize), sigma1, sigma2, borderType);
Near();
Near(CV_MAT_DEPTH(type) == CV_8U ? 3 : 1e-6, false);
}
}