From 91dd44e7fa1d3e8dfa963cfd8d380d78d9de936d Mon Sep 17 00:00:00 2001 From: Vladislav Vinogradov Date: Tue, 23 Jul 2013 13:19:54 +0400 Subject: [PATCH] removed compatibility headers --- modules/gpu/include/opencv2/gpu.hpp | 40 ---------------- modules/gpu/include/opencv2/gpu/gpu.hpp | 48 -------------------- samples/gpu/alpha_comp.cpp | 2 +- samples/gpu/bgfg_segm.cpp | 9 +--- samples/gpu/brox_optical_flow.cpp | 6 ++- samples/gpu/cascadeclassifier.cpp | 4 +- samples/gpu/cascadeclassifier_nvidia_api.cpp | 12 ++--- samples/gpu/driver_api_multi.cpp | 2 +- samples/gpu/driver_api_stereo_multi.cpp | 2 +- samples/gpu/farneback_optical_flow.cpp | 2 +- samples/gpu/hog.cpp | 1 + samples/gpu/houghlines.cpp | 2 +- samples/gpu/multi.cpp | 2 +- samples/gpu/optical_flow.cpp | 2 +- samples/gpu/opticalflow_nvidia_api.cpp | 7 +-- samples/gpu/performance/tests.cpp | 8 ++++ samples/gpu/pyrlk_optical_flow.cpp | 3 +- samples/gpu/stereo_match.cpp | 3 +- samples/gpu/stereo_multi.cpp | 6 +-- samples/gpu/surf_keypoint_matcher.cpp | 2 +- 20 files changed, 40 insertions(+), 123 deletions(-) delete mode 100644 modules/gpu/include/opencv2/gpu/gpu.hpp diff --git a/modules/gpu/include/opencv2/gpu.hpp b/modules/gpu/include/opencv2/gpu.hpp index ec59f57602..0b58825dca 100644 --- a/modules/gpu/include/opencv2/gpu.hpp +++ b/modules/gpu/include/opencv2/gpu.hpp @@ -49,46 +49,6 @@ #include "opencv2/core/gpu.hpp" -#if !defined(__OPENCV_BUILD) && !defined(OPENCV_GPU_SKIP_INCLUDE) - #include "opencv2/opencv_modules.hpp" - - #ifdef HAVE_OPENCV_GPUARITHM - #include "opencv2/gpuarithm.hpp" - #endif - - #ifdef HAVE_OPENCV_GPUWARPING - #include "opencv2/gpuwarping.hpp" - #endif - - #ifdef HAVE_OPENCV_GPUFILTERS - #include "opencv2/gpufilters.hpp" - #endif - - #ifdef HAVE_OPENCV_GPUIMGPROC - #include "opencv2/gpuimgproc.hpp" - #endif - - #ifdef HAVE_OPENCV_GPUFEATURES2D - #include "opencv2/gpufeatures2d.hpp" - #endif - - #ifdef HAVE_OPENCV_GPUOPTFLOW - #include "opencv2/gpuoptflow.hpp" - #endif - - #ifdef HAVE_OPENCV_GPUBGSEGM - #include "opencv2/gpubgsegm.hpp" - #endif - - #ifdef HAVE_OPENCV_GPUSTEREO - #include "opencv2/gpustereo.hpp" - #endif - - #ifdef HAVE_OPENCV_GPUCODEC - #include "opencv2/gpucodec.hpp" - #endif -#endif - namespace cv { namespace cuda { //////////////// HOG (Histogram-of-Oriented-Gradients) Descriptor and Object Detector ////////////// diff --git a/modules/gpu/include/opencv2/gpu/gpu.hpp b/modules/gpu/include/opencv2/gpu/gpu.hpp deleted file mode 100644 index e044ad1e8a..0000000000 --- a/modules/gpu/include/opencv2/gpu/gpu.hpp +++ /dev/null @@ -1,48 +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. -// Copyright (C) 2013, OpenCV Foundation, 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*/ - -#ifdef __OPENCV_BUILD -#error this is a compatibility header which should not be used inside the OpenCV library -#endif - -#include "opencv2/gpu.hpp" diff --git a/samples/gpu/alpha_comp.cpp b/samples/gpu/alpha_comp.cpp index 1193b11900..a59f559951 100644 --- a/samples/gpu/alpha_comp.cpp +++ b/samples/gpu/alpha_comp.cpp @@ -2,7 +2,7 @@ #include "opencv2/core/opengl.hpp" #include "opencv2/highgui/highgui.hpp" -#include "opencv2/gpu/gpu.hpp" +#include "opencv2/gpuimgproc.hpp" using namespace std; using namespace cv; diff --git a/samples/gpu/bgfg_segm.cpp b/samples/gpu/bgfg_segm.cpp index 28d190042d..0e06b7f8fb 100644 --- a/samples/gpu/bgfg_segm.cpp +++ b/samples/gpu/bgfg_segm.cpp @@ -3,15 +3,10 @@ #include "opencv2/core.hpp" #include "opencv2/core/utility.hpp" -#include "opencv2/gpu.hpp" +#include "opencv2/gpubgsegm.hpp" +#include "opencv2/video.hpp" #include "opencv2/highgui.hpp" -#include "opencv2/opencv_modules.hpp" - -#ifdef HAVE_OPENCV_NONFREE -# include "opencv2/nonfree/gpu.hpp" -#endif - using namespace std; using namespace cv; using namespace cv::cuda; diff --git a/samples/gpu/brox_optical_flow.cpp b/samples/gpu/brox_optical_flow.cpp index b5522d5cd9..7bcc509380 100644 --- a/samples/gpu/brox_optical_flow.cpp +++ b/samples/gpu/brox_optical_flow.cpp @@ -6,7 +6,9 @@ #include "opencv2/core.hpp" #include "opencv2/core/utility.hpp" #include "opencv2/highgui.hpp" -#include "opencv2/gpu.hpp" +#include "opencv2/imgproc.hpp" +#include "opencv2/gpuoptflow.hpp" +#include "opencv2/gpuarithm.hpp" using namespace std; using namespace cv; @@ -161,7 +163,7 @@ int main(int argc, const char* argv[]) interpolateFrames(d_r, d_rt, d_fu, d_fv, d_bu, d_bv, timePos, d_rNew, d_buf); GpuMat channels3[] = {d_bNew, d_gNew, d_rNew}; - merge(channels3, 3, d_newFrame); + cuda::merge(channels3, 3, d_newFrame); frames.push_back(Mat(d_newFrame)); diff --git a/samples/gpu/cascadeclassifier.cpp b/samples/gpu/cascadeclassifier.cpp index 56b70a2eaa..be42de84de 100644 --- a/samples/gpu/cascadeclassifier.cpp +++ b/samples/gpu/cascadeclassifier.cpp @@ -10,7 +10,9 @@ #include "opencv2/objdetect/objdetect.hpp" #include "opencv2/highgui/highgui.hpp" #include "opencv2/imgproc/imgproc.hpp" -#include "opencv2/gpu/gpu.hpp" +#include "opencv2/gpu.hpp" +#include "opencv2/gpuimgproc.hpp" +#include "opencv2/gpuwarping.hpp" using namespace std; using namespace cv; diff --git a/samples/gpu/cascadeclassifier_nvidia_api.cpp b/samples/gpu/cascadeclassifier_nvidia_api.cpp index bd65271f93..6db03769df 100644 --- a/samples/gpu/cascadeclassifier_nvidia_api.cpp +++ b/samples/gpu/cascadeclassifier_nvidia_api.cpp @@ -6,14 +6,12 @@ #include #include #include -#include "opencv2/gpu/gpu.hpp" -#include "opencv2/highgui/highgui.hpp" -#include "opencv2/objdetect/objdetect.hpp" -#include "opencv2/objdetect/objdetect_c.h" - -#ifdef HAVE_CUDA +#include "opencv2/core/gpu.hpp" #include "opencv2/gpulegacy.hpp" -#endif +#include "opencv2/highgui.hpp" +#include "opencv2/imgproc.hpp" +#include "opencv2/objdetect.hpp" +#include "opencv2/objdetect/objdetect_c.h" using namespace std; using namespace cv; diff --git a/samples/gpu/driver_api_multi.cpp b/samples/gpu/driver_api_multi.cpp index ee6de7765e..6508dadddd 100644 --- a/samples/gpu/driver_api_multi.cpp +++ b/samples/gpu/driver_api_multi.cpp @@ -9,7 +9,7 @@ #include #include "cvconfig.h" #include "opencv2/core/core.hpp" -#include "opencv2/gpu/gpu.hpp" +#include "opencv2/gpuarithm.hpp" #ifdef HAVE_TBB # include "tbb/tbb_stddef.h" diff --git a/samples/gpu/driver_api_stereo_multi.cpp b/samples/gpu/driver_api_stereo_multi.cpp index 0e5fe8a992..546ac18dd9 100644 --- a/samples/gpu/driver_api_stereo_multi.cpp +++ b/samples/gpu/driver_api_stereo_multi.cpp @@ -11,7 +11,7 @@ #include "cvconfig.h" #include "opencv2/core/core.hpp" #include "opencv2/highgui/highgui.hpp" -#include "opencv2/gpu/gpu.hpp" +#include "opencv2/gpustereo.hpp" #ifdef HAVE_TBB # include "tbb/tbb_stddef.h" diff --git a/samples/gpu/farneback_optical_flow.cpp b/samples/gpu/farneback_optical_flow.cpp index c47d7a2866..d90acd75f8 100644 --- a/samples/gpu/farneback_optical_flow.cpp +++ b/samples/gpu/farneback_optical_flow.cpp @@ -6,7 +6,7 @@ #include "opencv2/core/utility.hpp" #include "opencv2/highgui.hpp" #include "opencv2/video.hpp" -#include "opencv2/gpu.hpp" +#include "opencv2/gpuoptflow.hpp" using namespace std; using namespace cv; diff --git a/samples/gpu/hog.cpp b/samples/gpu/hog.cpp index 52afd64592..3288c67464 100644 --- a/samples/gpu/hog.cpp +++ b/samples/gpu/hog.cpp @@ -8,6 +8,7 @@ #include "opencv2/gpu.hpp" #include "opencv2/highgui.hpp" #include "opencv2/objdetect.hpp" +#include "opencv2/imgproc.hpp" using namespace std; using namespace cv; diff --git a/samples/gpu/houghlines.cpp b/samples/gpu/houghlines.cpp index f7c7e210ec..a789fd19c5 100644 --- a/samples/gpu/houghlines.cpp +++ b/samples/gpu/houghlines.cpp @@ -5,7 +5,7 @@ #include #include "opencv2/highgui.hpp" #include "opencv2/imgproc.hpp" -#include "opencv2/gpu.hpp" +#include "opencv2/gpuimgproc.hpp" using namespace std; using namespace cv; diff --git a/samples/gpu/multi.cpp b/samples/gpu/multi.cpp index f6c9e01560..c6744c5cb9 100644 --- a/samples/gpu/multi.cpp +++ b/samples/gpu/multi.cpp @@ -9,7 +9,7 @@ #include #include "cvconfig.h" #include "opencv2/core/core.hpp" -#include "opencv2/gpu/gpu.hpp" +#include "opencv2/gpuarithm.hpp" #ifdef HAVE_TBB # include "tbb/tbb_stddef.h" diff --git a/samples/gpu/optical_flow.cpp b/samples/gpu/optical_flow.cpp index d0b736a124..63b93fe729 100644 --- a/samples/gpu/optical_flow.cpp +++ b/samples/gpu/optical_flow.cpp @@ -4,7 +4,7 @@ #include "opencv2/core.hpp" #include #include "opencv2/highgui.hpp" -#include "opencv2/gpu.hpp" +#include "opencv2/gpuoptflow.hpp" using namespace std; using namespace cv; diff --git a/samples/gpu/opticalflow_nvidia_api.cpp b/samples/gpu/opticalflow_nvidia_api.cpp index 91939fd22a..39033f7bb3 100644 --- a/samples/gpu/opticalflow_nvidia_api.cpp +++ b/samples/gpu/opticalflow_nvidia_api.cpp @@ -11,14 +11,11 @@ #include "cvconfig.h" #include #include -#include "opencv2/gpu/gpu.hpp" +#include "opencv2/core/gpu.hpp" +#include "opencv2/gpulegacy.hpp" #include "opencv2/highgui/highgui.hpp" #include "opencv2/highgui/highgui_c.h" -#ifdef HAVE_CUDA -#include "opencv2/gpulegacy.hpp" -#endif - #if !defined(HAVE_CUDA) int main( int, const char** ) { diff --git a/samples/gpu/performance/tests.cpp b/samples/gpu/performance/tests.cpp index 47569a2098..7747128333 100644 --- a/samples/gpu/performance/tests.cpp +++ b/samples/gpu/performance/tests.cpp @@ -4,11 +4,19 @@ #include "opencv2/calib3d.hpp" #include "opencv2/video.hpp" #include "opencv2/gpu.hpp" +#include "opencv2/gpuimgproc.hpp" +#include "opencv2/gpuarithm.hpp" +#include "opencv2/gpuwarping.hpp" +#include "opencv2/gpufeatures2d.hpp" +#include "opencv2/gpufilters.hpp" +#include "opencv2/gpuoptflow.hpp" +#include "opencv2/gpubgsegm.hpp" #include "opencv2/legacy.hpp" #include "performance.h" #include "opencv2/opencv_modules.hpp" + #ifdef HAVE_OPENCV_NONFREE #include "opencv2/nonfree/gpu.hpp" #include "opencv2/nonfree/nonfree.hpp" diff --git a/samples/gpu/pyrlk_optical_flow.cpp b/samples/gpu/pyrlk_optical_flow.cpp index 7fc44f042f..a7ac1945c2 100644 --- a/samples/gpu/pyrlk_optical_flow.cpp +++ b/samples/gpu/pyrlk_optical_flow.cpp @@ -6,7 +6,8 @@ #include "opencv2/imgproc.hpp" #include "opencv2/highgui.hpp" #include "opencv2/video.hpp" -#include "opencv2/gpu.hpp" +#include "opencv2/gpuoptflow.hpp" +#include "opencv2/gpuimgproc.hpp" using namespace std; using namespace cv; diff --git a/samples/gpu/stereo_match.cpp b/samples/gpu/stereo_match.cpp index 1721ffbf60..fc7d092aa6 100644 --- a/samples/gpu/stereo_match.cpp +++ b/samples/gpu/stereo_match.cpp @@ -4,8 +4,9 @@ #include #include #include -#include "opencv2/gpu.hpp" +#include "opencv2/gpustereo.hpp" #include "opencv2/highgui.hpp" +#include "opencv2/imgproc.hpp" using namespace cv; using namespace std; diff --git a/samples/gpu/stereo_multi.cpp b/samples/gpu/stereo_multi.cpp index 75f2215415..2d410d3a83 100644 --- a/samples/gpu/stereo_multi.cpp +++ b/samples/gpu/stereo_multi.cpp @@ -9,9 +9,9 @@ #include #include "cvconfig.h" -#include "opencv2/core/core.hpp" -#include "opencv2/highgui/highgui.hpp" -#include "opencv2/gpu/gpu.hpp" +#include "opencv2/core.hpp" +#include "opencv2/highgui.hpp" +#include "opencv2/gpustereo.hpp" #ifdef HAVE_TBB # include "tbb/tbb_stddef.h" diff --git a/samples/gpu/surf_keypoint_matcher.cpp b/samples/gpu/surf_keypoint_matcher.cpp index a442c44db7..a05bfe4b51 100644 --- a/samples/gpu/surf_keypoint_matcher.cpp +++ b/samples/gpu/surf_keypoint_matcher.cpp @@ -7,7 +7,7 @@ #include "opencv2/core/core.hpp" #include "opencv2/features2d/features2d.hpp" #include "opencv2/highgui/highgui.hpp" -#include "opencv2/gpu/gpu.hpp" +#include "opencv2/gpufeatures2d.hpp" #include "opencv2/nonfree/gpu.hpp" using namespace std;