fixed compilation under Ubuntu without CUDA

This commit is contained in:
Anatoly Baksheev 2012-10-08 22:20:53 +04:00
parent a310e2f027
commit 91a1a71de2
4 changed files with 17 additions and 12 deletions

View File

@ -61,10 +61,6 @@ namespace cv { namespace gpu
BORDER_WRAP_GPU BORDER_WRAP_GPU
}; };
// Converts CPU border extrapolation mode into GPU internal analogue.
// Returns true if the GPU analogue exists, false otherwise.
bool tryConvertToGpuBorderType(int cpuBorderType, int& gpuBorderType);
class NppStreamHandler class NppStreamHandler
{ {
public: public:

View File

@ -49,10 +49,9 @@ using namespace cv::gpu;
void cv::gpu::bilateralFilter(const GpuMat&, GpuMat&, int, float, float, int, Stream&) { throw_nogpu(); } void cv::gpu::bilateralFilter(const GpuMat&, GpuMat&, int, float, float, int, Stream&) { throw_nogpu(); }
void cv::gpu::nonLocalMeans(const GpuMat&, GpuMat&, float, int, int, int, Stream&) { throw_nogpu(); } void cv::gpu::nonLocalMeans(const GpuMat&, GpuMat&, float, int, int, int, Stream&) { throw_nogpu(); }
void cv::gpu::fastNlMeansDenoising( const GpuMat&, GpuMat&, float, int, int, Stream&) { throw_nogpu(); }
void cv::gpu::FastNonLocalMeansDenoising::simpleMethod(const GpuMat&, GpuMat&, float, int, int, Stream&) { throw_nogpu(); } void cv::gpu::FastNonLocalMeansDenoising::simpleMethod(const GpuMat&, GpuMat&, float, int, int, Stream&) { throw_nogpu(); }
void cv::gpu::FastNonLocalMeansDenoising::labMethod( const GpuMat&, GpuMat, float, float, int, int, Stream&) { throw_nogpu(); } void cv::gpu::FastNonLocalMeansDenoising::labMethod( const GpuMat&, GpuMat&, float, float, int, int, Stream&) { throw_nogpu(); }
#else #else

View File

@ -41,10 +41,12 @@
#include "precomp.hpp" #include "precomp.hpp"
bool cv::gpu::tryConvertToGpuBorderType(int cpuBorderType, int& gpuBorderType) bool cv::gpu::tryConvertToGpuBorderType(int cpuBorderType, int& gpuBorderType)
{ {
#if !defined (HAVE_CUDA)
(void)cpuBorderType;
(void)gpuBorderType;
#else
switch (cpuBorderType) switch (cpuBorderType)
{ {
case cv::BORDER_REFLECT101: case cv::BORDER_REFLECT101:
@ -65,10 +67,9 @@ bool cv::gpu::tryConvertToGpuBorderType(int cpuBorderType, int& gpuBorderType)
default: default:
return false; return false;
}; };
#endif
return false; return false;
} }
/* End of file. */ /* End of file. */

View File

@ -128,4 +128,13 @@
#endif /* defined(HAVE_CUDA) */ #endif /* defined(HAVE_CUDA) */
namespace cv { namespace gpu
{
// Converts CPU border extrapolation mode into GPU internal analogue.
// Returns true if the GPU analogue exists, false otherwise.
bool tryConvertToGpuBorderType(int cpuBorderType, int& gpuBorderType);
}}
#endif /* __OPENCV_PRECOMP_H__ */ #endif /* __OPENCV_PRECOMP_H__ */