nonfree module fixes

pull/836/head
Vladislav Vinogradov 12 years ago
parent 5d7bbdc837
commit 12f16b7a26
  1. 3
      modules/nonfree/CMakeLists.txt
  2. 12
      modules/nonfree/include/opencv2/nonfree/gpu.hpp
  3. 10
      modules/nonfree/perf/perf_gpu.cpp
  4. 5
      modules/nonfree/perf/perf_precomp.hpp
  5. 5
      modules/nonfree/src/cuda/surf.cu
  6. 6
      modules/nonfree/src/cuda/vibe.cu
  7. 8
      modules/nonfree/src/precomp.hpp
  8. 10
      modules/nonfree/src/surf_gpu.cpp
  9. 6
      modules/nonfree/src/vibe_gpu.cpp
  10. 8
      modules/nonfree/test/test_gpu.cpp
  11. 2
      modules/nonfree/test/test_precomp.hpp

@ -3,4 +3,5 @@ if(BUILD_ANDROID_PACKAGE)
endif()
set(the_description "Functionality with possible limitations on the use")
ocv_define_module(nonfree opencv_imgproc opencv_features2d opencv_calib3d OPTIONAL opencv_gpu opencv_ocl)
ocv_warnings_disable(CMAKE_CXX_FLAGS -Wundef)
ocv_define_module(nonfree opencv_imgproc opencv_features2d opencv_calib3d OPTIONAL opencv_gpuarithm opencv_ocl)

@ -43,11 +43,7 @@
#ifndef __OPENCV_NONFREE_GPU_HPP__
#define __OPENCV_NONFREE_GPU_HPP__
#include "opencv2/opencv_modules.hpp"
#if defined(HAVE_OPENCV_GPU)
#include "opencv2/gpu.hpp"
#include "opencv2/core/gpumat.hpp"
namespace cv { namespace gpu {
@ -160,10 +156,6 @@ private:
GpuMat samples_;
};
} // namespace gpu
} // namespace cv
#endif // defined(HAVE_OPENCV_GPU)
}} // namespace cv { namespace gpu {
#endif // __OPENCV_NONFREE_GPU_HPP__

@ -42,7 +42,7 @@
#include "perf_precomp.hpp"
#if defined(HAVE_OPENCV_GPU) && defined(HAVE_CUDA)
#ifdef HAVE_CUDA
#include "opencv2/ts/gpu_perf.hpp"
@ -65,6 +65,8 @@ using namespace perf;
//////////////////////////////////////////////////////////////////////
// SURF
#ifdef HAVE_OPENCV_GPUARITHM
DEF_PARAM_TEST_1(Image, string);
PERF_TEST_P(Image, GPU_SURF,
@ -108,6 +110,8 @@ PERF_TEST_P(Image, GPU_SURF,
}
}
#endif // HAVE_OPENCV_GPUARITHM
//////////////////////////////////////////////////////
// VIBE
@ -177,6 +181,6 @@ PERF_TEST_P(Video_Cn, GPU_VIBE,
}
}
#endif
#endif // BUILD_WITH_VIDEO_INPUT_SUPPORT
#endif
#endif // HAVE_CUDA

@ -19,9 +19,8 @@
# include "opencv2/nonfree/ocl.hpp"
#endif
#ifdef HAVE_OPENCV_GPU
#include "opencv2/nonfree/gpu.hpp"
#include "opencv2/ts/gpu_perf.hpp"
#ifdef HAVE_CUDA
# include "opencv2/nonfree/gpu.hpp"
#endif
#ifdef GTEST_CREATE_SHARED_LIBRARY

@ -42,7 +42,7 @@
#include "opencv2/opencv_modules.hpp"
#ifdef HAVE_OPENCV_GPU
#ifdef HAVE_OPENCV_GPUARITHM
#include "opencv2/core/cuda/common.hpp"
#include "opencv2/core/cuda/limits.hpp"
@ -957,5 +957,4 @@ namespace cv { namespace gpu { namespace cudev
} // namespace surf
}}} // namespace cv { namespace gpu { namespace cudev
#endif /* CUDA_DISABLER */
#endif // HAVE_OPENCV_GPUARITHM

@ -40,10 +40,6 @@
//
//M*/
#include "opencv2/opencv_modules.hpp"
#ifdef HAVE_OPENCV_GPU
#include "opencv2/core/cuda/common.hpp"
namespace cv { namespace gpu { namespace cudev
@ -267,5 +263,3 @@ namespace cv { namespace gpu { namespace cudev
}
}
}}}
#endif

@ -49,11 +49,13 @@
#include "opencv2/core/utility.hpp"
#include "opencv2/core/private.hpp"
#include "opencv2/nonfree/gpu.hpp"
#include "opencv2/core/gpu_private.hpp"
#include "opencv2/opencv_modules.hpp"
#ifdef HAVE_OPENCV_GPU
# include "opencv2/nonfree/gpu.hpp"
# include "opencv2/core/gpu_private.hpp"
#ifdef HAVE_OPENCV_GPUARITHM
# include "opencv2/gpuarithm.hpp"
#endif
#ifdef HAVE_OPENCV_OCL

@ -42,12 +42,10 @@
#include "precomp.hpp"
#if defined(HAVE_OPENCV_GPU)
using namespace cv;
using namespace cv::gpu;
#if !defined (HAVE_CUDA)
#if !defined (HAVE_CUDA) || !defined (HAVE_OPENCV_GPUARITHM)
cv::gpu::SURF_GPU::SURF_GPU() { throw_no_cuda(); }
cv::gpu::SURF_GPU::SURF_GPU(double, int, int, bool, float, bool) { throw_no_cuda(); }
@ -144,13 +142,13 @@ namespace
bindImgTex(img);
integralBuffered(img, surf_.sum, surf_.intBuffer);
gpu::integralBuffered(img, surf_.sum, surf_.intBuffer);
sumOffset = bindSumTex(surf_.sum);
if (use_mask)
{
min(mask, 1.0, surf_.mask1);
integralBuffered(surf_.mask1, surf_.maskSum, surf_.intBuffer);
gpu::integralBuffered(surf_.mask1, surf_.maskSum, surf_.intBuffer);
maskOffset = bindMaskSumTex(surf_.maskSum);
}
}
@ -421,5 +419,3 @@ void cv::gpu::SURF_GPU::releaseMemory()
}
#endif // !defined (HAVE_CUDA)
#endif // defined(HAVE_OPENCV_GPU)

@ -42,9 +42,7 @@
#include "precomp.hpp"
#if defined(HAVE_OPENCV_GPU)
#if !defined HAVE_CUDA || defined(CUDA_DISABLER)
#ifndef HAVE_CUDA
cv::gpu::VIBE_GPU::VIBE_GPU(unsigned long) { throw_no_cuda(); }
void cv::gpu::VIBE_GPU::initialize(const GpuMat&, Stream&) { throw_no_cuda(); }
@ -137,5 +135,3 @@ void cv::gpu::VIBE_GPU::release()
}
#endif
#endif // defined(HAVE_OPENCV_GPU)

@ -42,13 +42,15 @@
#include "test_precomp.hpp"
#if defined(HAVE_OPENCV_GPU) && defined(HAVE_CUDA)
#ifdef HAVE_CUDA
using namespace cvtest;
/////////////////////////////////////////////////////////////////////////////////////////////////
// SURF
#ifdef HAVE_OPENCV_GPUARITHM
namespace
{
IMPLEMENT_PARAM_CLASS(SURF_HessianThreshold, double)
@ -191,6 +193,8 @@ INSTANTIATE_TEST_CASE_P(GPU_Features2D, SURF, testing::Combine(
testing::Values(SURF_Extended(false), SURF_Extended(true)),
testing::Values(SURF_Upright(false), SURF_Upright(true))));
#endif // HAVE_OPENCV_GPUARITHM
//////////////////////////////////////////////////////
// VIBE
@ -229,4 +233,4 @@ INSTANTIATE_TEST_CASE_P(GPU_Video, VIBE, testing::Combine(
testing::Values(MatType(CV_8UC1), MatType(CV_8UC3), MatType(CV_8UC4)),
WHOLE_SUBMAT));
#endif
#endif // HAVE_CUDA

@ -24,7 +24,7 @@
# include "opencv2/nonfree/ocl.hpp"
#endif
#ifdef HAVE_OPENCV_GPU
#ifdef HAVE_CUDA
# include "opencv2/nonfree/gpu.hpp"
#endif

Loading…
Cancel
Save