From 1a02877ab73b80dcbe20f2faf9e0dc65f54e7380 Mon Sep 17 00:00:00 2001 From: Alexey Spizhevoy Date: Mon, 11 Apr 2011 05:11:23 +0000 Subject: [PATCH] fixed gpu::downsample and gpu::blendLinear compite-time bugs under Ubuntu --- modules/gpu/src/blend.cpp | 11 ++++------- modules/gpu/src/imgproc_gpu.cpp | 4 ++-- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/modules/gpu/src/blend.cpp b/modules/gpu/src/blend.cpp index c5dfd583d..bf56507ed 100644 --- a/modules/gpu/src/blend.cpp +++ b/modules/gpu/src/blend.cpp @@ -83,19 +83,16 @@ void cv::gpu::blendLinear(const GpuMat& img1, const GpuMat& img2, const GpuMat& { case CV_8U: if (cn != 4) - blendLinearCaller(size.height, size.width, cn, (const PtrStep)img1, (const PtrStep)img2, - (const PtrStepf)weights1, (const PtrStepf)weights2, (PtrStep)result); + blendLinearCaller(size.height, size.width, cn, img1, img2, weights1, weights2, result); else - blendLinearCaller8UC4(size.height, size.width, (const PtrStep)img1, (const PtrStep)img2, - (const PtrStepf)weights1, (const PtrStepf)weights2, (PtrStep)result); + blendLinearCaller8UC4(size.height, size.width, img1, img2, weights1, weights2, result); break; case CV_32F: - blendLinearCaller(size.height, size.width, cn, (const PtrStepf)img1, (const PtrStepf)img2, - (const PtrStepf)weights1, (const PtrStepf)weights2, (PtrStepf)result); + blendLinearCaller(size.height, size.width, cn, img1, img2, weights1, weights2, result); break; default: CV_Error(CV_StsUnsupportedFormat, "bad image depth in linear blending function"); } } -#endif \ No newline at end of file +#endif diff --git a/modules/gpu/src/imgproc_gpu.cpp b/modules/gpu/src/imgproc_gpu.cpp index 0db8f5a26..92a0cbf1d 100644 --- a/modules/gpu/src/imgproc_gpu.cpp +++ b/modules/gpu/src/imgproc_gpu.cpp @@ -1374,10 +1374,10 @@ void cv::gpu::downsample(const GpuMat& src, GpuMat& dst, int k) switch (src.depth()) { case CV_8U: - imgproc::downsampleCaller((const PtrStep)src, dst.rows, dst.cols, k, (PtrStep)dst); + imgproc::downsampleCaller(src, dst.rows, dst.cols, k, dst); break; case CV_32F: - imgproc::downsampleCaller((const PtrStepf)src, dst.rows, dst.cols, k, (PtrStepf)dst); + imgproc::downsampleCaller(src, dst.rows, dst.cols, k, dst); break; default: CV_Error(CV_StsUnsupportedFormat, "bad image depth in downsample function");