renmaed gpu module -> cuda

pull/1299/head
Vladislav Vinogradov 12 years ago
parent 29386f1449
commit ae94256edc
  1. 2
      cmake/OpenCVModule.cmake
  2. 9
      modules/cuda/CMakeLists.txt
  3. 0
      modules/cuda/doc/calib3d.rst
  4. 0
      modules/cuda/doc/cuda.rst
  5. 0
      modules/cuda/doc/data_structures.rst
  6. 0
      modules/cuda/doc/initalization_and_information.rst
  7. 0
      modules/cuda/doc/introduction.rst
  8. 0
      modules/cuda/doc/object_detection.rst
  9. 6
      modules/cuda/include/opencv2/cuda.hpp
  10. 0
      modules/cuda/perf/perf_calib3d.cpp
  11. 0
      modules/cuda/perf/perf_labeling.cpp
  12. 0
      modules/cuda/perf/perf_main.cpp
  13. 0
      modules/cuda/perf/perf_matop.cpp
  14. 0
      modules/cuda/perf/perf_objdetect.cpp
  15. 2
      modules/cuda/perf/perf_precomp.hpp
  16. 0
      modules/cuda/src/calib3d.cpp
  17. 0
      modules/cuda/src/cascadeclassifier.cpp
  18. 0
      modules/cuda/src/cuda/calib3d.cu
  19. 0
      modules/cuda/src/cuda/ccomponetns.cu
  20. 0
      modules/cuda/src/cuda/global_motion.cu
  21. 0
      modules/cuda/src/cuda/hog.cu
  22. 0
      modules/cuda/src/cuda/lbp.cu
  23. 0
      modules/cuda/src/cuda/lbp.hpp
  24. 0
      modules/cuda/src/global_motion.cpp
  25. 0
      modules/cuda/src/graphcuts.cpp
  26. 0
      modules/cuda/src/hog.cpp
  27. 0
      modules/cuda/src/precomp.cpp
  28. 2
      modules/cuda/src/precomp.hpp
  29. 0
      modules/cuda/test/test_calib3d.cpp
  30. 0
      modules/cuda/test/test_global_motion.cpp
  31. 0
      modules/cuda/test/test_gpumat.cpp
  32. 0
      modules/cuda/test/test_labeling.cpp
  33. 0
      modules/cuda/test/test_main.cpp
  34. 0
      modules/cuda/test/test_objdetect.cpp
  35. 0
      modules/cuda/test/test_opengl.cpp
  36. 2
      modules/cuda/test/test_precomp.hpp
  37. 0
      modules/cuda/test/test_stream.cpp
  38. 43
      modules/cudaarithm/perf/perf_precomp.cpp
  39. 43
      modules/cudaarithm/test/test_precomp.cpp
  40. 9
      modules/gpu/CMakeLists.txt
  41. 2
      modules/stitching/CMakeLists.txt
  42. 2
      modules/stitching/include/opencv2/stitching/detail/seam_finders.hpp
  43. 4
      modules/stitching/src/precomp.hpp
  44. 2
      modules/stitching/src/seam_finders.cpp
  45. 2
      modules/stitching/src/stitcher.cpp
  46. 2
      modules/videostab/CMakeLists.txt
  47. 4
      modules/videostab/include/opencv2/videostab/global_motion.hpp
  48. 2
      modules/videostab/include/opencv2/videostab/wobble_suppression.hpp
  49. 8
      modules/videostab/src/global_motion.cpp
  50. 6
      modules/videostab/src/wobble_suppression.cpp
  51. 4
      samples/cpp/stitching_detailed.cpp
  52. 8
      samples/cpp/videostab.cpp
  53. 2
      samples/gpu/CMakeLists.txt
  54. 2
      samples/gpu/cascadeclassifier.cpp
  55. 2
      samples/gpu/hog.cpp
  56. 2
      samples/gpu/performance/performance.h
  57. 2
      samples/gpu/performance/tests.cpp
  58. 2
      samples/gpu/softcascade.cpp

@ -85,7 +85,7 @@ endmacro()
# Usage:
# ocv_add_module(<name> [INTERNAL|BINDINGS] [REQUIRED] [<list of dependencies>] [OPTIONAL <list of optional dependencies>])
# 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}")

@ -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)

@ -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__ */

@ -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"

@ -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"

@ -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"

@ -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"

@ -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"

@ -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)

@ -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)

@ -227,7 +227,7 @@ private:
};
#ifdef HAVE_OPENCV_GPU
#ifdef HAVE_OPENCV_CUDA
class CV_EXPORTS GraphCutSeamFinderGpu : public GraphCutSeamFinderBase, public PairwiseSeamFinder
{
public:

@ -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

@ -1316,7 +1316,7 @@ void GraphCutSeamFinder::find(const std::vector<Mat> &src, const std::vector<Poi
}
#ifdef HAVE_OPENCV_GPU
#ifdef HAVE_OPENCV_CUDA
void GraphCutSeamFinderGpu::find(const std::vector<Mat> &src, const std::vector<Point> &corners,
std::vector<Mat> &masks)
{

@ -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

@ -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)

@ -199,7 +199,7 @@ private:
std::vector<Point2f> 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<uchar> 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<Mat> &motions);

@ -116,7 +116,7 @@ private:
Mat_<float> mapx_, mapy_;
};
#ifdef HAVE_OPENCV_GPU
#if defined(HAVE_OPENCV_CUDA) && defined(HAVE_OPENCV_CUDAWARPING)
class CV_EXPORTS MoreAccurateMotionWobbleSuppressorGpu : public MoreAccurateMotionWobbleSuppressorBase
{
public:

@ -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<MotionEstimatorBase> 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<Mat> &motions)

@ -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_);

@ -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

@ -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");

@ -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

@ -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"

@ -5,7 +5,7 @@
#include <iomanip>
#include <stdexcept>
#include <opencv2/core/utility.hpp>
#include "opencv2/gpu.hpp"
#include "opencv2/cuda.hpp"
#include "opencv2/highgui.hpp"
#include "opencv2/objdetect.hpp"
#include "opencv2/imgproc.hpp"

@ -7,7 +7,7 @@
#include <numeric>
#include <string>
#include <opencv2/core/utility.hpp>
#include "opencv2/gpu.hpp"
#include "opencv2/cuda.hpp"
#define TAB " "

@ -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"

@ -1,5 +1,5 @@
#include <opencv2/core/utility.hpp>
#include <opencv2/gpu.hpp>
#include <opencv2/cuda.hpp>
#include <opencv2/softcascade.hpp>
#include <opencv2/highgui.hpp>
#include <iostream>

Loading…
Cancel
Save