From 39a25115e006c3143877b5661b7c379f77a0d1e0 Mon Sep 17 00:00:00 2001 From: Vladislav Vinogradov Date: Mon, 24 Jun 2013 16:19:37 +0400 Subject: [PATCH] fixed compilation --- modules/gpuimgproc/src/cuda/generalized_hough.cu | 5 +++-- samples/gpu/cascadeclassifier.cpp | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/modules/gpuimgproc/src/cuda/generalized_hough.cu b/modules/gpuimgproc/src/cuda/generalized_hough.cu index 9ae5a59..14c8600 100644 --- a/modules/gpuimgproc/src/cuda/generalized_hough.cu +++ b/modules/gpuimgproc/src/cuda/generalized_hough.cu @@ -48,6 +48,7 @@ #include "opencv2/core/cuda/common.hpp" #include "opencv2/core/cuda/emulation.hpp" #include "opencv2/core/cuda/vec_math.hpp" +#include "opencv2/core/cuda/functional.hpp" #include "opencv2/opencv_modules.hpp" @@ -183,7 +184,7 @@ namespace cv { namespace gpu { namespace cudev const int ind = ::atomicAdd(r_sizes + n, 1); if (ind < maxSize) - r_table(n, ind) = p - templCenter; + r_table(n, ind) = saturate_cast(p - templCenter); } void buildRTable_gpu(const unsigned int* coordList, const float* thetaList, int pointsCount, @@ -227,7 +228,7 @@ namespace cv { namespace gpu { namespace cudev for (int j = 0; j < r_row_size; ++j) { - short2 c = p - r_row[j]; + short2 c = saturate_cast(p - r_row[j]); c.x = __float2int_rn(c.x * idp); c.y = __float2int_rn(c.y * idp); diff --git a/samples/gpu/cascadeclassifier.cpp b/samples/gpu/cascadeclassifier.cpp index 929fd30..e27186c2 100644 --- a/samples/gpu/cascadeclassifier.cpp +++ b/samples/gpu/cascadeclassifier.cpp @@ -51,7 +51,7 @@ static void convertAndResize(const GpuMat& src, GpuMat& gray, GpuMat& resized, d { if (src.channels() == 3) { - gpu::cvtColor( src, gray, COLOR_BGR2GRAY ); + cv::gpu::cvtColor( src, gray, COLOR_BGR2GRAY ); } else { @@ -62,7 +62,7 @@ static void convertAndResize(const GpuMat& src, GpuMat& gray, GpuMat& resized, d if (scale != 1) { - gpu::resize(gray, resized, sz); + cv::gpu::resize(gray, resized, sz); } else { -- 2.7.4