renmaed gpu module -> cuda

This commit is contained in:
Vladislav Vinogradov 2013-07-24 11:41:44 +04:00
parent 29386f1449
commit ae94256edc
58 changed files with 45 additions and 131 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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