From ae94256edc0e8693f94df326b87737b432fa47d0 Mon Sep 17 00:00:00 2001 From: Vladislav Vinogradov Date: Wed, 24 Jul 2013 11:41:44 +0400 Subject: [PATCH] renmaed gpu module -> cuda --- cmake/OpenCVModule.cmake | 2 +- modules/cuda/CMakeLists.txt | 9 ++++ modules/{gpu => cuda}/doc/calib3d.rst | 0 .../{gpu/doc/gpu.rst => cuda/doc/cuda.rst} | 0 modules/{gpu => cuda}/doc/data_structures.rst | 0 .../doc/initalization_and_information.rst | 0 modules/{gpu => cuda}/doc/introduction.rst | 0 .../{gpu => cuda}/doc/object_detection.rst | 0 .../gpu.hpp => cuda/include/opencv2/cuda.hpp} | 6 +-- modules/{gpu => cuda}/perf/perf_calib3d.cpp | 0 modules/{gpu => cuda}/perf/perf_labeling.cpp | 0 modules/{gpu => cuda}/perf/perf_main.cpp | 0 modules/{gpu => cuda}/perf/perf_matop.cpp | 0 modules/{gpu => cuda}/perf/perf_objdetect.cpp | 0 modules/{gpu => cuda}/perf/perf_precomp.hpp | 2 +- modules/{gpu => cuda}/src/calib3d.cpp | 0 .../{gpu => cuda}/src/cascadeclassifier.cpp | 0 modules/{gpu => cuda}/src/cuda/calib3d.cu | 0 modules/{gpu => cuda}/src/cuda/ccomponetns.cu | 0 .../{gpu => cuda}/src/cuda/global_motion.cu | 0 modules/{gpu => cuda}/src/cuda/hog.cu | 0 modules/{gpu => cuda}/src/cuda/lbp.cu | 0 modules/{gpu => cuda}/src/cuda/lbp.hpp | 0 modules/{gpu => cuda}/src/global_motion.cpp | 0 modules/{gpu => cuda}/src/graphcuts.cpp | 0 modules/{gpu => cuda}/src/hog.cpp | 0 modules/{gpu => cuda}/src/precomp.cpp | 0 modules/{gpu => cuda}/src/precomp.hpp | 2 +- modules/{gpu => cuda}/test/test_calib3d.cpp | 0 .../{gpu => cuda}/test/test_global_motion.cpp | 0 modules/{gpu => cuda}/test/test_gpumat.cpp | 0 modules/{gpu => cuda}/test/test_labeling.cpp | 0 modules/{gpu => cuda}/test/test_main.cpp | 0 modules/{gpu => cuda}/test/test_objdetect.cpp | 0 modules/{gpu => cuda}/test/test_opengl.cpp | 0 modules/{gpu => cuda}/test/test_precomp.hpp | 2 +- modules/{gpu => cuda}/test/test_stream.cpp | 0 modules/cudaarithm/perf/perf_precomp.cpp | 43 ------------------- modules/cudaarithm/test/test_precomp.cpp | 43 ------------------- modules/gpu/CMakeLists.txt | 9 ---- modules/stitching/CMakeLists.txt | 2 +- .../opencv2/stitching/detail/seam_finders.hpp | 2 +- modules/stitching/src/precomp.hpp | 4 +- modules/stitching/src/seam_finders.cpp | 2 +- modules/stitching/src/stitcher.cpp | 2 +- modules/videostab/CMakeLists.txt | 2 +- .../opencv2/videostab/global_motion.hpp | 4 +- .../opencv2/videostab/wobble_suppression.hpp | 2 +- modules/videostab/src/global_motion.cpp | 8 ++-- modules/videostab/src/wobble_suppression.cpp | 6 +-- samples/cpp/stitching_detailed.cpp | 4 +- samples/cpp/videostab.cpp | 8 ++-- samples/gpu/CMakeLists.txt | 2 +- samples/gpu/cascadeclassifier.cpp | 2 +- samples/gpu/hog.cpp | 2 +- samples/gpu/performance/performance.h | 2 +- samples/gpu/performance/tests.cpp | 2 +- samples/gpu/softcascade.cpp | 2 +- 58 files changed, 45 insertions(+), 131 deletions(-) create mode 100644 modules/cuda/CMakeLists.txt rename modules/{gpu => cuda}/doc/calib3d.rst (100%) rename modules/{gpu/doc/gpu.rst => cuda/doc/cuda.rst} (100%) rename modules/{gpu => cuda}/doc/data_structures.rst (100%) rename modules/{gpu => cuda}/doc/initalization_and_information.rst (100%) rename modules/{gpu => cuda}/doc/introduction.rst (100%) rename modules/{gpu => cuda}/doc/object_detection.rst (100%) rename modules/{gpu/include/opencv2/gpu.hpp => cuda/include/opencv2/cuda.hpp} (99%) rename modules/{gpu => cuda}/perf/perf_calib3d.cpp (100%) rename modules/{gpu => cuda}/perf/perf_labeling.cpp (100%) rename modules/{gpu => cuda}/perf/perf_main.cpp (100%) rename modules/{gpu => cuda}/perf/perf_matop.cpp (100%) rename modules/{gpu => cuda}/perf/perf_objdetect.cpp (100%) rename modules/{gpu => cuda}/perf/perf_precomp.hpp (98%) rename modules/{gpu => cuda}/src/calib3d.cpp (100%) rename modules/{gpu => cuda}/src/cascadeclassifier.cpp (100%) rename modules/{gpu => cuda}/src/cuda/calib3d.cu (100%) rename modules/{gpu => cuda}/src/cuda/ccomponetns.cu (100%) rename modules/{gpu => cuda}/src/cuda/global_motion.cu (100%) rename modules/{gpu => cuda}/src/cuda/hog.cu (100%) rename modules/{gpu => cuda}/src/cuda/lbp.cu (100%) rename modules/{gpu => cuda}/src/cuda/lbp.hpp (100%) rename modules/{gpu => cuda}/src/global_motion.cpp (100%) rename modules/{gpu => cuda}/src/graphcuts.cpp (100%) rename modules/{gpu => cuda}/src/hog.cpp (100%) rename modules/{gpu => cuda}/src/precomp.cpp (100%) rename modules/{gpu => cuda}/src/precomp.hpp (98%) rename modules/{gpu => cuda}/test/test_calib3d.cpp (100%) rename modules/{gpu => cuda}/test/test_global_motion.cpp (100%) rename modules/{gpu => cuda}/test/test_gpumat.cpp (100%) rename modules/{gpu => cuda}/test/test_labeling.cpp (100%) rename modules/{gpu => cuda}/test/test_main.cpp (100%) rename modules/{gpu => cuda}/test/test_objdetect.cpp (100%) rename modules/{gpu => cuda}/test/test_opengl.cpp (100%) rename modules/{gpu => cuda}/test/test_precomp.hpp (98%) rename modules/{gpu => cuda}/test/test_stream.cpp (100%) delete mode 100644 modules/cudaarithm/perf/perf_precomp.cpp delete mode 100644 modules/cudaarithm/test/test_precomp.cpp delete mode 100644 modules/gpu/CMakeLists.txt diff --git a/cmake/OpenCVModule.cmake b/cmake/OpenCVModule.cmake index 5556d52e19..bc46c825fc 100644 --- a/cmake/OpenCVModule.cmake +++ b/cmake/OpenCVModule.cmake @@ -85,7 +85,7 @@ endmacro() # Usage: # ocv_add_module( [INTERNAL|BINDINGS] [REQUIRED] [] [OPTIONAL ]) # Example: -# ocv_add_module(yaom INTERNAL opencv_core opencv_highgui opencv_flann OPTIONAL opencv_gpu) +# ocv_add_module(yaom INTERNAL opencv_core opencv_highgui opencv_flann OPTIONAL opencv_cuda) macro(ocv_add_module _name) string(TOLOWER "${_name}" name) string(REGEX REPLACE "^opencv_" "" ${name} "${name}") diff --git a/modules/cuda/CMakeLists.txt b/modules/cuda/CMakeLists.txt new file mode 100644 index 0000000000..c8047b1b6b --- /dev/null +++ b/modules/cuda/CMakeLists.txt @@ -0,0 +1,9 @@ +if(ANDROID OR IOS) + ocv_module_disable(cuda) +endif() + +set(the_description "CUDA-accelerated Computer Vision") + +ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4127 /wd4100 /wd4324 /wd4512 /wd4515 -Wundef -Wmissing-declarations -Wshadow -Wunused-parameter) + +ocv_define_module(cuda opencv_calib3d opencv_objdetect opencv_cudaarithm opencv_cudawarping OPTIONAL opencv_cudalegacy) diff --git a/modules/gpu/doc/calib3d.rst b/modules/cuda/doc/calib3d.rst similarity index 100% rename from modules/gpu/doc/calib3d.rst rename to modules/cuda/doc/calib3d.rst diff --git a/modules/gpu/doc/gpu.rst b/modules/cuda/doc/cuda.rst similarity index 100% rename from modules/gpu/doc/gpu.rst rename to modules/cuda/doc/cuda.rst diff --git a/modules/gpu/doc/data_structures.rst b/modules/cuda/doc/data_structures.rst similarity index 100% rename from modules/gpu/doc/data_structures.rst rename to modules/cuda/doc/data_structures.rst diff --git a/modules/gpu/doc/initalization_and_information.rst b/modules/cuda/doc/initalization_and_information.rst similarity index 100% rename from modules/gpu/doc/initalization_and_information.rst rename to modules/cuda/doc/initalization_and_information.rst diff --git a/modules/gpu/doc/introduction.rst b/modules/cuda/doc/introduction.rst similarity index 100% rename from modules/gpu/doc/introduction.rst rename to modules/cuda/doc/introduction.rst diff --git a/modules/gpu/doc/object_detection.rst b/modules/cuda/doc/object_detection.rst similarity index 100% rename from modules/gpu/doc/object_detection.rst rename to modules/cuda/doc/object_detection.rst diff --git a/modules/gpu/include/opencv2/gpu.hpp b/modules/cuda/include/opencv2/cuda.hpp similarity index 99% rename from modules/gpu/include/opencv2/gpu.hpp rename to modules/cuda/include/opencv2/cuda.hpp index acbca8a9e2..64617df4f5 100644 --- a/modules/gpu/include/opencv2/gpu.hpp +++ b/modules/cuda/include/opencv2/cuda.hpp @@ -40,8 +40,8 @@ // //M*/ -#ifndef __OPENCV_GPU_HPP__ -#define __OPENCV_GPU_HPP__ +#ifndef __OPENCV_CUDA_HPP__ +#define __OPENCV_CUDA_HPP__ #ifndef __cplusplus # error cuda.hpp header must be compiled as C++ @@ -217,4 +217,4 @@ CV_EXPORTS void calcWobbleSuppressionMaps( }} // namespace cv { namespace cuda { -#endif /* __OPENCV_GPU_HPP__ */ +#endif /* __OPENCV_CUDA_HPP__ */ diff --git a/modules/gpu/perf/perf_calib3d.cpp b/modules/cuda/perf/perf_calib3d.cpp similarity index 100% rename from modules/gpu/perf/perf_calib3d.cpp rename to modules/cuda/perf/perf_calib3d.cpp diff --git a/modules/gpu/perf/perf_labeling.cpp b/modules/cuda/perf/perf_labeling.cpp similarity index 100% rename from modules/gpu/perf/perf_labeling.cpp rename to modules/cuda/perf/perf_labeling.cpp diff --git a/modules/gpu/perf/perf_main.cpp b/modules/cuda/perf/perf_main.cpp similarity index 100% rename from modules/gpu/perf/perf_main.cpp rename to modules/cuda/perf/perf_main.cpp diff --git a/modules/gpu/perf/perf_matop.cpp b/modules/cuda/perf/perf_matop.cpp similarity index 100% rename from modules/gpu/perf/perf_matop.cpp rename to modules/cuda/perf/perf_matop.cpp diff --git a/modules/gpu/perf/perf_objdetect.cpp b/modules/cuda/perf/perf_objdetect.cpp similarity index 100% rename from modules/gpu/perf/perf_objdetect.cpp rename to modules/cuda/perf/perf_objdetect.cpp diff --git a/modules/gpu/perf/perf_precomp.hpp b/modules/cuda/perf/perf_precomp.hpp similarity index 98% rename from modules/gpu/perf/perf_precomp.hpp rename to modules/cuda/perf/perf_precomp.hpp index 5bfb14b52e..37295bb5d6 100644 --- a/modules/gpu/perf/perf_precomp.hpp +++ b/modules/cuda/perf/perf_precomp.hpp @@ -54,7 +54,7 @@ #include "opencv2/ts.hpp" #include "opencv2/ts/gpu_perf.hpp" -#include "opencv2/gpu.hpp" +#include "opencv2/cuda.hpp" #include "opencv2/calib3d.hpp" #include "opencv2/objdetect.hpp" diff --git a/modules/gpu/src/calib3d.cpp b/modules/cuda/src/calib3d.cpp similarity index 100% rename from modules/gpu/src/calib3d.cpp rename to modules/cuda/src/calib3d.cpp diff --git a/modules/gpu/src/cascadeclassifier.cpp b/modules/cuda/src/cascadeclassifier.cpp similarity index 100% rename from modules/gpu/src/cascadeclassifier.cpp rename to modules/cuda/src/cascadeclassifier.cpp diff --git a/modules/gpu/src/cuda/calib3d.cu b/modules/cuda/src/cuda/calib3d.cu similarity index 100% rename from modules/gpu/src/cuda/calib3d.cu rename to modules/cuda/src/cuda/calib3d.cu diff --git a/modules/gpu/src/cuda/ccomponetns.cu b/modules/cuda/src/cuda/ccomponetns.cu similarity index 100% rename from modules/gpu/src/cuda/ccomponetns.cu rename to modules/cuda/src/cuda/ccomponetns.cu diff --git a/modules/gpu/src/cuda/global_motion.cu b/modules/cuda/src/cuda/global_motion.cu similarity index 100% rename from modules/gpu/src/cuda/global_motion.cu rename to modules/cuda/src/cuda/global_motion.cu diff --git a/modules/gpu/src/cuda/hog.cu b/modules/cuda/src/cuda/hog.cu similarity index 100% rename from modules/gpu/src/cuda/hog.cu rename to modules/cuda/src/cuda/hog.cu diff --git a/modules/gpu/src/cuda/lbp.cu b/modules/cuda/src/cuda/lbp.cu similarity index 100% rename from modules/gpu/src/cuda/lbp.cu rename to modules/cuda/src/cuda/lbp.cu diff --git a/modules/gpu/src/cuda/lbp.hpp b/modules/cuda/src/cuda/lbp.hpp similarity index 100% rename from modules/gpu/src/cuda/lbp.hpp rename to modules/cuda/src/cuda/lbp.hpp diff --git a/modules/gpu/src/global_motion.cpp b/modules/cuda/src/global_motion.cpp similarity index 100% rename from modules/gpu/src/global_motion.cpp rename to modules/cuda/src/global_motion.cpp diff --git a/modules/gpu/src/graphcuts.cpp b/modules/cuda/src/graphcuts.cpp similarity index 100% rename from modules/gpu/src/graphcuts.cpp rename to modules/cuda/src/graphcuts.cpp diff --git a/modules/gpu/src/hog.cpp b/modules/cuda/src/hog.cpp similarity index 100% rename from modules/gpu/src/hog.cpp rename to modules/cuda/src/hog.cpp diff --git a/modules/gpu/src/precomp.cpp b/modules/cuda/src/precomp.cpp similarity index 100% rename from modules/gpu/src/precomp.cpp rename to modules/cuda/src/precomp.cpp diff --git a/modules/gpu/src/precomp.hpp b/modules/cuda/src/precomp.hpp similarity index 98% rename from modules/gpu/src/precomp.hpp rename to modules/cuda/src/precomp.hpp index 3ab36102bb..93f987e4c9 100644 --- a/modules/gpu/src/precomp.hpp +++ b/modules/cuda/src/precomp.hpp @@ -43,7 +43,7 @@ #ifndef __OPENCV_PRECOMP_H__ #define __OPENCV_PRECOMP_H__ -#include "opencv2/gpu.hpp" +#include "opencv2/cuda.hpp" #include "opencv2/cudaarithm.hpp" #include "opencv2/cudawarping.hpp" #include "opencv2/calib3d.hpp" diff --git a/modules/gpu/test/test_calib3d.cpp b/modules/cuda/test/test_calib3d.cpp similarity index 100% rename from modules/gpu/test/test_calib3d.cpp rename to modules/cuda/test/test_calib3d.cpp diff --git a/modules/gpu/test/test_global_motion.cpp b/modules/cuda/test/test_global_motion.cpp similarity index 100% rename from modules/gpu/test/test_global_motion.cpp rename to modules/cuda/test/test_global_motion.cpp diff --git a/modules/gpu/test/test_gpumat.cpp b/modules/cuda/test/test_gpumat.cpp similarity index 100% rename from modules/gpu/test/test_gpumat.cpp rename to modules/cuda/test/test_gpumat.cpp diff --git a/modules/gpu/test/test_labeling.cpp b/modules/cuda/test/test_labeling.cpp similarity index 100% rename from modules/gpu/test/test_labeling.cpp rename to modules/cuda/test/test_labeling.cpp diff --git a/modules/gpu/test/test_main.cpp b/modules/cuda/test/test_main.cpp similarity index 100% rename from modules/gpu/test/test_main.cpp rename to modules/cuda/test/test_main.cpp diff --git a/modules/gpu/test/test_objdetect.cpp b/modules/cuda/test/test_objdetect.cpp similarity index 100% rename from modules/gpu/test/test_objdetect.cpp rename to modules/cuda/test/test_objdetect.cpp diff --git a/modules/gpu/test/test_opengl.cpp b/modules/cuda/test/test_opengl.cpp similarity index 100% rename from modules/gpu/test/test_opengl.cpp rename to modules/cuda/test/test_opengl.cpp diff --git a/modules/gpu/test/test_precomp.hpp b/modules/cuda/test/test_precomp.hpp similarity index 98% rename from modules/gpu/test/test_precomp.hpp rename to modules/cuda/test/test_precomp.hpp index 0a9c1df3dc..7808037e8b 100644 --- a/modules/gpu/test/test_precomp.hpp +++ b/modules/cuda/test/test_precomp.hpp @@ -56,7 +56,7 @@ #include "opencv2/ts.hpp" #include "opencv2/ts/gpu_test.hpp" -#include "opencv2/gpu.hpp" +#include "opencv2/cuda.hpp" #include "opencv2/core.hpp" #include "opencv2/core/opengl.hpp" #include "opencv2/calib3d.hpp" diff --git a/modules/gpu/test/test_stream.cpp b/modules/cuda/test/test_stream.cpp similarity index 100% rename from modules/gpu/test/test_stream.cpp rename to modules/cuda/test/test_stream.cpp diff --git a/modules/cudaarithm/perf/perf_precomp.cpp b/modules/cudaarithm/perf/perf_precomp.cpp deleted file mode 100644 index 81f16e8f14..0000000000 --- a/modules/cudaarithm/perf/perf_precomp.cpp +++ /dev/null @@ -1,43 +0,0 @@ -/*M/////////////////////////////////////////////////////////////////////////////////////// -// -// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. -// -// By downloading, copying, installing or using the software you agree to this license. -// If you do not agree to this license, do not download, install, -// copy or use the software. -// -// -// License Agreement -// For Open Source Computer Vision Library -// -// Copyright (C) 2000-2008, Intel Corporation, all rights reserved. -// Copyright (C) 2009, Willow Garage Inc., all rights reserved. -// Third party copyrights are property of their respective owners. -// -// Redistribution and use in source and binary forms, with or without modification, -// are permitted provided that the following conditions are met: -// -// * Redistribution's of source code must retain the above copyright notice, -// this list of conditions and the following disclaimer. -// -// * Redistribution's in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// -// * The name of the copyright holders may not be used to endorse or promote products -// derived from this software without specific prior written permission. -// -// This software is provided by the copyright holders and contributors "as is" and -// any express or implied warranties, including, but not limited to, the implied -// warranties of merchantability and fitness for a particular purpose are disclaimed. -// In no event shall the Intel Corporation or contributors be liable for any direct, -// indirect, incidental, special, exemplary, or consequential damages -// (including, but not limited to, procurement of substitute goods or services; -// loss of use, data, or profits; or business interruption) however caused -// and on any theory of liability, whether in contract, strict liability, -// or tort (including negligence or otherwise) arising in any way out of -// the use of this software, even if advised of the possibility of such damage. -// -//M*/ - -#include "perf_precomp.hpp" diff --git a/modules/cudaarithm/test/test_precomp.cpp b/modules/cudaarithm/test/test_precomp.cpp deleted file mode 100644 index 0fb6521809..0000000000 --- a/modules/cudaarithm/test/test_precomp.cpp +++ /dev/null @@ -1,43 +0,0 @@ -/*M/////////////////////////////////////////////////////////////////////////////////////// -// -// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. -// -// By downloading, copying, installing or using the software you agree to this license. -// If you do not agree to this license, do not download, install, -// copy or use the software. -// -// -// License Agreement -// For Open Source Computer Vision Library -// -// Copyright (C) 2000-2008, Intel Corporation, all rights reserved. -// Copyright (C) 2009, Willow Garage Inc., all rights reserved. -// Third party copyrights are property of their respective owners. -// -// Redistribution and use in source and binary forms, with or without modification, -// are permitted provided that the following conditions are met: -// -// * Redistribution's of source code must retain the above copyright notice, -// this list of conditions and the following disclaimer. -// -// * Redistribution's in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// -// * The name of the copyright holders may not be used to endorse or promote products -// derived from this software without specific prior written permission. -// -// This software is provided by the copyright holders and contributors "as is" and -// any express or implied warranties, including, but not limited to, the implied -// warranties of merchantability and fitness for a particular purpose are disclaimed. -// In no event shall the Intel Corporation or contributors be liable for any direct, -// indirect, incidental, special, exemplary, or consequential damages -// (including, but not limited to, procurement of substitute goods or services; -// loss of use, data, or profits; or business interruption) however caused -// and on any theory of liability, whether in contract, strict liability, -// or tort (including negligence or otherwise) arising in any way out of -// the use of this software, even if advised of the possibility of such damage. -// -//M*/ - -#include "test_precomp.hpp" diff --git a/modules/gpu/CMakeLists.txt b/modules/gpu/CMakeLists.txt deleted file mode 100644 index de547354a4..0000000000 --- a/modules/gpu/CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ -if(ANDROID OR IOS) - ocv_module_disable(gpu) -endif() - -set(the_description "GPU-accelerated Computer Vision") - -ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4127 /wd4100 /wd4324 /wd4512 /wd4515 -Wundef -Wmissing-declarations -Wshadow -Wunused-parameter) - -ocv_define_module(gpu opencv_calib3d opencv_objdetect opencv_cudaarithm opencv_cudawarping OPTIONAL opencv_cudalegacy) diff --git a/modules/stitching/CMakeLists.txt b/modules/stitching/CMakeLists.txt index 87ac5c325d..2aeafb263b 100644 --- a/modules/stitching/CMakeLists.txt +++ b/modules/stitching/CMakeLists.txt @@ -1,3 +1,3 @@ set(the_description "Images stitching") ocv_define_module(stitching opencv_imgproc opencv_features2d opencv_calib3d opencv_objdetect - OPTIONAL opencv_gpu opencv_cudaarithm opencv_cudafilters opencv_cudafeatures2d opencv_nonfree) + OPTIONAL opencv_cuda opencv_cudaarithm opencv_cudafilters opencv_cudafeatures2d opencv_nonfree) diff --git a/modules/stitching/include/opencv2/stitching/detail/seam_finders.hpp b/modules/stitching/include/opencv2/stitching/detail/seam_finders.hpp index 0587d5ac8a..b1eb18b910 100644 --- a/modules/stitching/include/opencv2/stitching/detail/seam_finders.hpp +++ b/modules/stitching/include/opencv2/stitching/detail/seam_finders.hpp @@ -227,7 +227,7 @@ private: }; -#ifdef HAVE_OPENCV_GPU +#ifdef HAVE_OPENCV_CUDA class CV_EXPORTS GraphCutSeamFinderGpu : public GraphCutSeamFinderBase, public PairwiseSeamFinder { public: diff --git a/modules/stitching/src/precomp.hpp b/modules/stitching/src/precomp.hpp index b18bcf4569..0eac72c73b 100644 --- a/modules/stitching/src/precomp.hpp +++ b/modules/stitching/src/precomp.hpp @@ -80,8 +80,8 @@ # include "opencv2/cudafeatures2d.hpp" #endif -#ifdef HAVE_OPENCV_GPU -# include "opencv2/gpu.hpp" +#ifdef HAVE_OPENCV_CUDA +# include "opencv2/cuda.hpp" #endif #ifdef HAVE_OPENCV_NONFREE diff --git a/modules/stitching/src/seam_finders.cpp b/modules/stitching/src/seam_finders.cpp index 2c37421f76..2e5117e5ba 100644 --- a/modules/stitching/src/seam_finders.cpp +++ b/modules/stitching/src/seam_finders.cpp @@ -1316,7 +1316,7 @@ void GraphCutSeamFinder::find(const std::vector &src, const std::vector &src, const std::vector &corners, std::vector &masks) { diff --git a/modules/stitching/src/stitcher.cpp b/modules/stitching/src/stitcher.cpp index f67052c726..8658ddb6f3 100644 --- a/modules/stitching/src/stitcher.cpp +++ b/modules/stitching/src/stitcher.cpp @@ -56,7 +56,7 @@ Stitcher Stitcher::createDefault(bool try_use_gpu) stitcher.setFeaturesMatcher(new detail::BestOf2NearestMatcher(try_use_gpu)); stitcher.setBundleAdjuster(new detail::BundleAdjusterRay()); -#ifdef HAVE_OPENCV_GPU +#ifdef HAVE_OPENCV_CUDA if (try_use_gpu && cuda::getCudaEnabledDeviceCount() > 0) { #ifdef HAVE_OPENCV_NONFREE diff --git a/modules/videostab/CMakeLists.txt b/modules/videostab/CMakeLists.txt index 4f780bc0c9..de82e22239 100644 --- a/modules/videostab/CMakeLists.txt +++ b/modules/videostab/CMakeLists.txt @@ -1,3 +1,3 @@ set(the_description "Video stabilization") ocv_define_module(videostab opencv_imgproc opencv_features2d opencv_video opencv_photo opencv_calib3d - OPTIONAL opencv_gpu opencv_cudawarping opencv_cudaoptflow opencv_highgui) + OPTIONAL opencv_cuda opencv_cudawarping opencv_cudaoptflow opencv_highgui) diff --git a/modules/videostab/include/opencv2/videostab/global_motion.hpp b/modules/videostab/include/opencv2/videostab/global_motion.hpp index b71dd539df..494c2da787 100644 --- a/modules/videostab/include/opencv2/videostab/global_motion.hpp +++ b/modules/videostab/include/opencv2/videostab/global_motion.hpp @@ -199,7 +199,7 @@ private: std::vector pointsPrevGood_, pointsGood_; }; -#if defined(HAVE_OPENCV_CUDAIMGPROC) && defined(HAVE_OPENCV_GPU) && defined(HAVE_OPENCV_CUDAOPTFLOW) +#if defined(HAVE_OPENCV_CUDAIMGPROC) && defined(HAVE_OPENCV_CUDA) && defined(HAVE_OPENCV_CUDAOPTFLOW) class CV_EXPORTS KeypointBasedMotionEstimatorGpu : public ImageMotionEstimatorBase { @@ -230,7 +230,7 @@ private: std::vector rejectionStatus_; }; -#endif // defined(HAVE_OPENCV_CUDAIMGPROC) && defined(HAVE_OPENCV_GPU) && defined(HAVE_OPENCV_CUDAOPTFLOW) +#endif // defined(HAVE_OPENCV_CUDAIMGPROC) && defined(HAVE_OPENCV_CUDA) && defined(HAVE_OPENCV_CUDAOPTFLOW) CV_EXPORTS Mat getMotion(int from, int to, const std::vector &motions); diff --git a/modules/videostab/include/opencv2/videostab/wobble_suppression.hpp b/modules/videostab/include/opencv2/videostab/wobble_suppression.hpp index b461f0cb06..c95b08d0eb 100644 --- a/modules/videostab/include/opencv2/videostab/wobble_suppression.hpp +++ b/modules/videostab/include/opencv2/videostab/wobble_suppression.hpp @@ -116,7 +116,7 @@ private: Mat_ mapx_, mapy_; }; -#ifdef HAVE_OPENCV_GPU +#if defined(HAVE_OPENCV_CUDA) && defined(HAVE_OPENCV_CUDAWARPING) class CV_EXPORTS MoreAccurateMotionWobbleSuppressorGpu : public MoreAccurateMotionWobbleSuppressorBase { public: diff --git a/modules/videostab/src/global_motion.cpp b/modules/videostab/src/global_motion.cpp index c8c01af00a..702d826e94 100644 --- a/modules/videostab/src/global_motion.cpp +++ b/modules/videostab/src/global_motion.cpp @@ -47,8 +47,8 @@ #include "opencv2/opencv_modules.hpp" #include "clp.hpp" -#ifdef HAVE_OPENCV_GPU -# include "opencv2/gpu.hpp" +#ifdef HAVE_OPENCV_CUDA +# include "opencv2/cuda.hpp" #endif namespace cv @@ -737,7 +737,7 @@ Mat KeypointBasedMotionEstimator::estimate(const Mat &frame0, const Mat &frame1, } -#if defined(HAVE_OPENCV_CUDAIMGPROC) && defined(HAVE_OPENCV_GPU) && defined(HAVE_OPENCV_CUDAOPTFLOW) +#if defined(HAVE_OPENCV_CUDAIMGPROC) && defined(HAVE_OPENCV_CUDA) && defined(HAVE_OPENCV_CUDAOPTFLOW) KeypointBasedMotionEstimatorGpu::KeypointBasedMotionEstimatorGpu(Ptr estimator) : ImageMotionEstimatorBase(estimator->motionModel()), motionEstimator_(estimator) @@ -812,7 +812,7 @@ Mat KeypointBasedMotionEstimatorGpu::estimate(const cuda::GpuMat &frame0, const return motionEstimator_->estimate(hostPointsPrev_, hostPoints_, ok); } -#endif // defined(HAVE_OPENCV_CUDAIMGPROC) && defined(HAVE_OPENCV_GPU) && defined(HAVE_OPENCV_CUDAOPTFLOW) +#endif // defined(HAVE_OPENCV_CUDAIMGPROC) && defined(HAVE_OPENCV_CUDA) && defined(HAVE_OPENCV_CUDAOPTFLOW) Mat getMotion(int from, int to, const std::vector &motions) diff --git a/modules/videostab/src/wobble_suppression.cpp b/modules/videostab/src/wobble_suppression.cpp index 99e9db7297..bdddc95350 100644 --- a/modules/videostab/src/wobble_suppression.cpp +++ b/modules/videostab/src/wobble_suppression.cpp @@ -48,8 +48,8 @@ # include "opencv2/cudawarping.hpp" #endif -#ifdef HAVE_OPENCV_GPU -# include "opencv2/gpu.hpp" +#ifdef HAVE_OPENCV_CUDA +# include "opencv2/cuda.hpp" #endif @@ -122,7 +122,7 @@ void MoreAccurateMotionWobbleSuppressor::suppress(int idx, const Mat &frame, Mat } -#ifdef HAVE_OPENCV_CUDAWARPING +#if defined(HAVE_OPENCV_CUDA) && defined(HAVE_OPENCV_CUDAWARPING) void MoreAccurateMotionWobbleSuppressorGpu::suppress(int idx, const cuda::GpuMat &frame, cuda::GpuMat &result) { CV_Assert(motions_ && stabilizationMotions_); diff --git a/samples/cpp/stitching_detailed.cpp b/samples/cpp/stitching_detailed.cpp index 2fa5117c4b..c1172b130d 100644 --- a/samples/cpp/stitching_detailed.cpp +++ b/samples/cpp/stitching_detailed.cpp @@ -617,7 +617,7 @@ int main(int argc, char* argv[]) seam_finder = new detail::VoronoiSeamFinder(); else if (seam_find_type == "gc_color") { -#ifdef HAVE_OPENCV_GPU +#ifdef HAVE_OPENCV_CUDA if (try_gpu && cuda::getCudaEnabledDeviceCount() > 0) seam_finder = new detail::GraphCutSeamFinderGpu(GraphCutSeamFinderBase::COST_COLOR); else @@ -626,7 +626,7 @@ int main(int argc, char* argv[]) } else if (seam_find_type == "gc_colorgrad") { -#ifdef HAVE_OPENCV_GPU +#ifdef HAVE_OPENCV_CUDA if (try_gpu && cuda::getCudaEnabledDeviceCount() > 0) seam_finder = new detail::GraphCutSeamFinderGpu(GraphCutSeamFinderBase::COST_COLOR_GRAD); else diff --git a/samples/cpp/videostab.cpp b/samples/cpp/videostab.cpp index 538dac12e8..3c48e87002 100644 --- a/samples/cpp/videostab.cpp +++ b/samples/cpp/videostab.cpp @@ -216,7 +216,7 @@ public: outlierRejector = tblor; } -#if defined(HAVE_OPENCV_CUDAIMGPROC) && defined(HAVE_OPENCV_GPU) && defined(HAVE_OPENCV_CUDAOPTFLOW) +#if defined(HAVE_OPENCV_CUDAIMGPROC) && defined(HAVE_OPENCV_CUDA) && defined(HAVE_OPENCV_CUDAOPTFLOW) if (gpu) { KeypointBasedMotionEstimatorGpu *kbest = new KeypointBasedMotionEstimatorGpu(est); @@ -257,7 +257,7 @@ public: outlierRejector = tblor; } -#if defined(HAVE_OPENCV_CUDAIMGPROC) && defined(HAVE_OPENCV_GPU) && defined(HAVE_OPENCV_CUDAOPTFLOW) +#if defined(HAVE_OPENCV_CUDAIMGPROC) && defined(HAVE_OPENCV_CUDA) && defined(HAVE_OPENCV_CUDAOPTFLOW) if (gpu) { KeypointBasedMotionEstimatorGpu *kbest = new KeypointBasedMotionEstimatorGpu(est); @@ -342,7 +342,7 @@ int main(int argc, const char **argv) return 0; } -#ifdef HAVE_OPENCV_GPU +#ifdef HAVE_OPENCV_CUDA if (arg("gpu") == "yes") { cout << "initializing GPU..."; cout.flush(); @@ -420,7 +420,7 @@ int main(int argc, const char **argv) { MoreAccurateMotionWobbleSuppressorBase *ws = new MoreAccurateMotionWobbleSuppressor(); if (arg("gpu") == "yes") -#ifdef HAVE_OPENCV_GPU +#ifdef HAVE_OPENCV_CUDA ws = new MoreAccurateMotionWobbleSuppressorGpu(); #else throw runtime_error("OpenCV is built without GPU support"); diff --git a/samples/gpu/CMakeLists.txt b/samples/gpu/CMakeLists.txt index bb8efd7d97..bffede55da 100644 --- a/samples/gpu/CMakeLists.txt +++ b/samples/gpu/CMakeLists.txt @@ -1,6 +1,6 @@ SET(OPENCV_GPU_SAMPLES_REQUIRED_DEPS opencv_core opencv_flann opencv_imgproc opencv_highgui opencv_ml opencv_video opencv_objdetect opencv_features2d - opencv_calib3d opencv_legacy opencv_contrib opencv_gpu + opencv_calib3d opencv_legacy opencv_contrib opencv_cuda opencv_nonfree opencv_softcascade opencv_superres opencv_cudaarithm opencv_cudafilters opencv_cudawarping opencv_cudaimgproc opencv_cudafeatures2d opencv_cudaoptflow opencv_cudabgsegm diff --git a/samples/gpu/cascadeclassifier.cpp b/samples/gpu/cascadeclassifier.cpp index 1419632636..11a895f6f1 100644 --- a/samples/gpu/cascadeclassifier.cpp +++ b/samples/gpu/cascadeclassifier.cpp @@ -10,7 +10,7 @@ #include "opencv2/objdetect/objdetect.hpp" #include "opencv2/highgui/highgui.hpp" #include "opencv2/imgproc/imgproc.hpp" -#include "opencv2/gpu.hpp" +#include "opencv2/cuda.hpp" #include "opencv2/cudaimgproc.hpp" #include "opencv2/cudawarping.hpp" diff --git a/samples/gpu/hog.cpp b/samples/gpu/hog.cpp index 3288c67464..59ea44f31b 100644 --- a/samples/gpu/hog.cpp +++ b/samples/gpu/hog.cpp @@ -5,7 +5,7 @@ #include #include #include -#include "opencv2/gpu.hpp" +#include "opencv2/cuda.hpp" #include "opencv2/highgui.hpp" #include "opencv2/objdetect.hpp" #include "opencv2/imgproc.hpp" diff --git a/samples/gpu/performance/performance.h b/samples/gpu/performance/performance.h index 8ee007f0aa..1f8e3f9b87 100644 --- a/samples/gpu/performance/performance.h +++ b/samples/gpu/performance/performance.h @@ -7,7 +7,7 @@ #include #include #include -#include "opencv2/gpu.hpp" +#include "opencv2/cuda.hpp" #define TAB " " diff --git a/samples/gpu/performance/tests.cpp b/samples/gpu/performance/tests.cpp index 80f6b894a8..2c6d114687 100644 --- a/samples/gpu/performance/tests.cpp +++ b/samples/gpu/performance/tests.cpp @@ -3,7 +3,7 @@ #include "opencv2/highgui.hpp" #include "opencv2/calib3d.hpp" #include "opencv2/video.hpp" -#include "opencv2/gpu.hpp" +#include "opencv2/cuda.hpp" #include "opencv2/cudaimgproc.hpp" #include "opencv2/cudaarithm.hpp" #include "opencv2/cudawarping.hpp" diff --git a/samples/gpu/softcascade.cpp b/samples/gpu/softcascade.cpp index 1eeb2a036e..e5258aaa64 100644 --- a/samples/gpu/softcascade.cpp +++ b/samples/gpu/softcascade.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include #include #include