renamed gpuwarping -> cudawarping
This commit is contained in:
parent
dcd600cc47
commit
d4901a99ea
9
modules/cudawarping/CMakeLists.txt
Normal file
9
modules/cudawarping/CMakeLists.txt
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
if(ANDROID OR IOS)
|
||||||
|
ocv_module_disable(cudawarping)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(the_description "CUDA-accelerated Image Warping")
|
||||||
|
|
||||||
|
ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4127 /wd4324 /wd4512 -Wundef -Wmissing-declarations)
|
||||||
|
|
||||||
|
ocv_define_module(cudawarping opencv_imgproc OPTIONAL opencv_cudalegacy)
|
@ -40,11 +40,11 @@
|
|||||||
//
|
//
|
||||||
//M*/
|
//M*/
|
||||||
|
|
||||||
#ifndef __OPENCV_GPUWARPING_HPP__
|
#ifndef __OPENCV_CUDAWARPING_HPP__
|
||||||
#define __OPENCV_GPUWARPING_HPP__
|
#define __OPENCV_CUDAWARPING_HPP__
|
||||||
|
|
||||||
#ifndef __cplusplus
|
#ifndef __cplusplus
|
||||||
# error gpuwarping.hpp header must be compiled as C++
|
# error cudawarping.hpp header must be compiled as C++
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "opencv2/core/cuda.hpp"
|
#include "opencv2/core/cuda.hpp"
|
||||||
@ -110,4 +110,4 @@ CV_EXPORTS Ptr<ImagePyramid> createImagePyramid(InputArray img, int nLayers = -1
|
|||||||
|
|
||||||
}} // namespace cv { namespace cuda {
|
}} // namespace cv { namespace cuda {
|
||||||
|
|
||||||
#endif /* __OPENCV_GPUWARPING_HPP__ */
|
#endif /* __OPENCV_CUDAWARPING_HPP__ */
|
@ -44,4 +44,4 @@
|
|||||||
|
|
||||||
using namespace perf;
|
using namespace perf;
|
||||||
|
|
||||||
CV_PERF_TEST_CUDA_MAIN(gpuwarping)
|
CV_PERF_TEST_CUDA_MAIN(cudawarping)
|
@ -54,7 +54,7 @@
|
|||||||
#include "opencv2/ts.hpp"
|
#include "opencv2/ts.hpp"
|
||||||
#include "opencv2/ts/gpu_perf.hpp"
|
#include "opencv2/ts/gpu_perf.hpp"
|
||||||
|
|
||||||
#include "opencv2/gpuwarping.hpp"
|
#include "opencv2/cudawarping.hpp"
|
||||||
#include "opencv2/imgproc.hpp"
|
#include "opencv2/imgproc.hpp"
|
||||||
|
|
||||||
#ifdef GTEST_CREATE_SHARED_LIBRARY
|
#ifdef GTEST_CREATE_SHARED_LIBRARY
|
@ -43,7 +43,7 @@
|
|||||||
#ifndef __OPENCV_PRECOMP_H__
|
#ifndef __OPENCV_PRECOMP_H__
|
||||||
#define __OPENCV_PRECOMP_H__
|
#define __OPENCV_PRECOMP_H__
|
||||||
|
|
||||||
#include "opencv2/gpuwarping.hpp"
|
#include "opencv2/cudawarping.hpp"
|
||||||
|
|
||||||
#include "opencv2/core/private.cuda.hpp"
|
#include "opencv2/core/private.cuda.hpp"
|
||||||
|
|
@ -54,7 +54,7 @@
|
|||||||
#include "opencv2/ts.hpp"
|
#include "opencv2/ts.hpp"
|
||||||
#include "opencv2/ts/gpu_test.hpp"
|
#include "opencv2/ts/gpu_test.hpp"
|
||||||
|
|
||||||
#include "opencv2/gpuwarping.hpp"
|
#include "opencv2/cudawarping.hpp"
|
||||||
#include "opencv2/imgproc.hpp"
|
#include "opencv2/imgproc.hpp"
|
||||||
|
|
||||||
#include "cvconfig.h"
|
#include "cvconfig.h"
|
@ -6,4 +6,4 @@ 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_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_gpuwarping OPTIONAL opencv_cudalegacy)
|
ocv_define_module(gpu opencv_calib3d opencv_objdetect opencv_cudaarithm opencv_cudawarping OPTIONAL opencv_cudalegacy)
|
||||||
|
@ -45,7 +45,7 @@
|
|||||||
|
|
||||||
#include "opencv2/gpu.hpp"
|
#include "opencv2/gpu.hpp"
|
||||||
#include "opencv2/cudaarithm.hpp"
|
#include "opencv2/cudaarithm.hpp"
|
||||||
#include "opencv2/gpuwarping.hpp"
|
#include "opencv2/cudawarping.hpp"
|
||||||
#include "opencv2/calib3d.hpp"
|
#include "opencv2/calib3d.hpp"
|
||||||
#include "opencv2/objdetect.hpp"
|
#include "opencv2/objdetect.hpp"
|
||||||
|
|
||||||
|
@ -6,4 +6,4 @@ set(the_description "GPU-accelerated Feature Detection and Description")
|
|||||||
|
|
||||||
ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4127 /wd4100 /wd4324 /wd4512 /wd4515 -Wundef -Wmissing-declarations -Wshadow -Wunused-parameter)
|
ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4127 /wd4100 /wd4324 /wd4512 /wd4515 -Wundef -Wmissing-declarations -Wshadow -Wunused-parameter)
|
||||||
|
|
||||||
ocv_define_module(gpufeatures2d opencv_features2d opencv_gpufilters opencv_gpuwarping)
|
ocv_define_module(gpufeatures2d opencv_features2d opencv_gpufilters opencv_cudawarping)
|
||||||
|
@ -49,7 +49,7 @@
|
|||||||
|
|
||||||
#include "opencv2/gpufeatures2d.hpp"
|
#include "opencv2/gpufeatures2d.hpp"
|
||||||
#include "opencv2/cudaarithm.hpp"
|
#include "opencv2/cudaarithm.hpp"
|
||||||
#include "opencv2/gpuwarping.hpp"
|
#include "opencv2/cudawarping.hpp"
|
||||||
#include "opencv2/features2d.hpp"
|
#include "opencv2/features2d.hpp"
|
||||||
|
|
||||||
#include "opencv2/core/private.cuda.hpp"
|
#include "opencv2/core/private.cuda.hpp"
|
||||||
|
@ -6,4 +6,4 @@ set(the_description "GPU-accelerated Optical Flow")
|
|||||||
|
|
||||||
ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4127 /wd4324 /wd4512 -Wundef -Wmissing-declarations)
|
ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4127 /wd4324 /wd4512 -Wundef -Wmissing-declarations)
|
||||||
|
|
||||||
ocv_define_module(gpuoptflow opencv_video opencv_legacy opencv_cudaarithm opencv_gpuwarping opencv_gpuimgproc OPTIONAL opencv_cudalegacy)
|
ocv_define_module(gpuoptflow opencv_video opencv_legacy opencv_cudaarithm opencv_cudawarping opencv_gpuimgproc OPTIONAL opencv_cudalegacy)
|
||||||
|
@ -47,7 +47,7 @@
|
|||||||
|
|
||||||
#include "opencv2/gpuoptflow.hpp"
|
#include "opencv2/gpuoptflow.hpp"
|
||||||
#include "opencv2/cudaarithm.hpp"
|
#include "opencv2/cudaarithm.hpp"
|
||||||
#include "opencv2/gpuwarping.hpp"
|
#include "opencv2/cudawarping.hpp"
|
||||||
#include "opencv2/gpuimgproc.hpp"
|
#include "opencv2/gpuimgproc.hpp"
|
||||||
#include "opencv2/video.hpp"
|
#include "opencv2/video.hpp"
|
||||||
|
|
||||||
|
@ -1,9 +0,0 @@
|
|||||||
if(ANDROID OR IOS)
|
|
||||||
ocv_module_disable(gpuwarping)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
set(the_description "GPU-accelerated Image Warping")
|
|
||||||
|
|
||||||
ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4127 /wd4324 /wd4512 -Wundef -Wmissing-declarations)
|
|
||||||
|
|
||||||
ocv_define_module(gpuwarping opencv_imgproc OPTIONAL opencv_cudalegacy)
|
|
@ -327,7 +327,7 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#ifdef HAVE_OPENCV_GPUWARPING
|
#ifdef HAVE_OPENCV_CUDAWARPING
|
||||||
class CV_EXPORTS PlaneWarperGpu : public PlaneWarper
|
class CV_EXPORTS PlaneWarperGpu : public PlaneWarper
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -145,7 +145,7 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef HAVE_OPENCV_GPUWARPING
|
#ifdef HAVE_OPENCV_CUDAWARPING
|
||||||
class PlaneWarperGpu: public WarperCreator
|
class PlaneWarperGpu: public WarperCreator
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -188,7 +188,7 @@ MultiBandBlender::MultiBandBlender(int try_gpu, int num_bands, int weight_type)
|
|||||||
{
|
{
|
||||||
setNumBands(num_bands);
|
setNumBands(num_bands);
|
||||||
|
|
||||||
#if defined(HAVE_OPENCV_CUDAARITHM) && defined(HAVE_OPENCV_GPUWARPING)
|
#if defined(HAVE_OPENCV_CUDAARITHM) && defined(HAVE_OPENCV_CUDAWARPING)
|
||||||
can_use_gpu_ = try_gpu && cuda::getCudaEnabledDeviceCount();
|
can_use_gpu_ = try_gpu && cuda::getCudaEnabledDeviceCount();
|
||||||
#else
|
#else
|
||||||
(void) try_gpu;
|
(void) try_gpu;
|
||||||
@ -491,7 +491,7 @@ void createLaplacePyr(const Mat &img, int num_levels, std::vector<Mat> &pyr)
|
|||||||
|
|
||||||
void createLaplacePyrGpu(const Mat &img, int num_levels, std::vector<Mat> &pyr)
|
void createLaplacePyrGpu(const Mat &img, int num_levels, std::vector<Mat> &pyr)
|
||||||
{
|
{
|
||||||
#if defined(HAVE_OPENCV_CUDAARITHM) && defined(HAVE_OPENCV_GPUWARPING)
|
#if defined(HAVE_OPENCV_CUDAARITHM) && defined(HAVE_OPENCV_CUDAWARPING)
|
||||||
pyr.resize(num_levels + 1);
|
pyr.resize(num_levels + 1);
|
||||||
|
|
||||||
std::vector<cuda::GpuMat> gpu_pyr(num_levels + 1);
|
std::vector<cuda::GpuMat> gpu_pyr(num_levels + 1);
|
||||||
@ -531,7 +531,7 @@ void restoreImageFromLaplacePyr(std::vector<Mat> &pyr)
|
|||||||
|
|
||||||
void restoreImageFromLaplacePyrGpu(std::vector<Mat> &pyr)
|
void restoreImageFromLaplacePyrGpu(std::vector<Mat> &pyr)
|
||||||
{
|
{
|
||||||
#if defined(HAVE_OPENCV_CUDAARITHM) && defined(HAVE_OPENCV_GPUWARPING)
|
#if defined(HAVE_OPENCV_CUDAARITHM) && defined(HAVE_OPENCV_CUDAWARPING)
|
||||||
if (pyr.empty())
|
if (pyr.empty())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -72,8 +72,8 @@
|
|||||||
# include "opencv2/cudaarithm.hpp"
|
# include "opencv2/cudaarithm.hpp"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_OPENCV_GPUWARPING
|
#ifdef HAVE_OPENCV_CUDAWARPING
|
||||||
# include "opencv2/gpuwarping.hpp"
|
# include "opencv2/cudawarping.hpp"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_OPENCV_GPUFEATURES2D
|
#ifdef HAVE_OPENCV_GPUFEATURES2D
|
||||||
|
@ -210,7 +210,7 @@ void SphericalWarper::detectResultRoi(Size src_size, Point &dst_tl, Point &dst_b
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#ifdef HAVE_OPENCV_GPUWARPING
|
#ifdef HAVE_OPENCV_CUDAWARPING
|
||||||
Rect PlaneWarperGpu::buildMaps(Size src_size, const Mat &K, const Mat &R, cuda::GpuMat &xmap, cuda::GpuMat &ymap)
|
Rect PlaneWarperGpu::buildMaps(Size src_size, const Mat &K, const Mat &R, cuda::GpuMat &xmap, cuda::GpuMat &ymap)
|
||||||
{
|
{
|
||||||
return buildMaps(src_size, K, R, Mat::zeros(3, 1, CV_32F), xmap, ymap);
|
return buildMaps(src_size, K, R, Mat::zeros(3, 1, CV_32F), xmap, ymap);
|
||||||
|
@ -6,4 +6,4 @@ set(the_description "Super Resolution")
|
|||||||
ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4127 -Wundef)
|
ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4127 -Wundef)
|
||||||
ocv_define_module(superres opencv_imgproc opencv_video
|
ocv_define_module(superres opencv_imgproc opencv_video
|
||||||
OPTIONAL opencv_highgui opencv_ocl
|
OPTIONAL opencv_highgui opencv_ocl
|
||||||
opencv_cudaarithm opencv_gpufilters opencv_gpuwarping opencv_gpuimgproc opencv_gpuoptflow opencv_cudacodec)
|
opencv_cudaarithm opencv_gpufilters opencv_cudawarping opencv_gpuimgproc opencv_gpuoptflow opencv_cudacodec)
|
||||||
|
@ -50,7 +50,7 @@ using namespace cv::cuda;
|
|||||||
using namespace cv::superres;
|
using namespace cv::superres;
|
||||||
using namespace cv::superres::detail;
|
using namespace cv::superres::detail;
|
||||||
|
|
||||||
#if !defined(HAVE_CUDA) || !defined(HAVE_OPENCV_CUDAARITHM) || !defined(HAVE_OPENCV_GPUWARPING) || !defined(HAVE_OPENCV_GPUFILTERS)
|
#if !defined(HAVE_CUDA) || !defined(HAVE_OPENCV_CUDAARITHM) || !defined(HAVE_OPENCV_CUDAWARPING) || !defined(HAVE_OPENCV_GPUFILTERS)
|
||||||
|
|
||||||
Ptr<SuperResolution> cv::superres::createSuperResolution_BTVL1_GPU()
|
Ptr<SuperResolution> cv::superres::createSuperResolution_BTVL1_GPU()
|
||||||
{
|
{
|
||||||
|
@ -42,7 +42,7 @@
|
|||||||
|
|
||||||
#include "opencv2/opencv_modules.hpp"
|
#include "opencv2/opencv_modules.hpp"
|
||||||
|
|
||||||
#if defined(HAVE_OPENCV_CUDAARITHM) && defined(HAVE_OPENCV_GPUWARPING) && defined(HAVE_OPENCV_GPUFILTERS)
|
#if defined(HAVE_OPENCV_CUDAARITHM) && defined(HAVE_OPENCV_CUDAWARPING) && defined(HAVE_OPENCV_GPUFILTERS)
|
||||||
|
|
||||||
#include "opencv2/core/cuda/common.hpp"
|
#include "opencv2/core/cuda/common.hpp"
|
||||||
#include "opencv2/core/cuda/transform.hpp"
|
#include "opencv2/core/cuda/transform.hpp"
|
||||||
|
@ -61,8 +61,8 @@
|
|||||||
# include "opencv2/cudaarithm.hpp"
|
# include "opencv2/cudaarithm.hpp"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_OPENCV_GPUWARPING
|
#ifdef HAVE_OPENCV_CUDAWARPING
|
||||||
# include "opencv2/gpuwarping.hpp"
|
# include "opencv2/cudawarping.hpp"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_OPENCV_GPUFILTERS
|
#ifdef HAVE_OPENCV_GPUFILTERS
|
||||||
|
@ -268,7 +268,7 @@ TEST_F(SuperResolution, BTVL1)
|
|||||||
RunTest(cv::superres::createSuperResolution_BTVL1());
|
RunTest(cv::superres::createSuperResolution_BTVL1());
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(HAVE_CUDA) && defined(HAVE_OPENCV_CUDAARITHM) && defined(HAVE_OPENCV_GPUWARPING) && defined(HAVE_OPENCV_GPUFILTERS)
|
#if defined(HAVE_CUDA) && defined(HAVE_OPENCV_CUDAARITHM) && defined(HAVE_OPENCV_CUDAWARPING) && defined(HAVE_OPENCV_GPUFILTERS)
|
||||||
|
|
||||||
TEST_F(SuperResolution, BTVL1_GPU)
|
TEST_F(SuperResolution, BTVL1_GPU)
|
||||||
{
|
{
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
set(the_description "Video stabilization")
|
set(the_description "Video stabilization")
|
||||||
ocv_define_module(videostab opencv_imgproc opencv_features2d opencv_video opencv_photo opencv_calib3d
|
ocv_define_module(videostab opencv_imgproc opencv_features2d opencv_video opencv_photo opencv_calib3d
|
||||||
OPTIONAL opencv_gpu opencv_gpuwarping opencv_gpuoptflow opencv_highgui)
|
OPTIONAL opencv_gpu opencv_cudawarping opencv_gpuoptflow opencv_highgui)
|
||||||
|
@ -44,8 +44,8 @@
|
|||||||
#include "opencv2/videostab/wobble_suppression.hpp"
|
#include "opencv2/videostab/wobble_suppression.hpp"
|
||||||
#include "opencv2/videostab/ring_buffer.hpp"
|
#include "opencv2/videostab/ring_buffer.hpp"
|
||||||
|
|
||||||
#ifdef HAVE_OPENCV_GPUWARPING
|
#ifdef HAVE_OPENCV_CUDAWARPING
|
||||||
# include "opencv2/gpuwarping.hpp"
|
# include "opencv2/cudawarping.hpp"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_OPENCV_GPU
|
#ifdef HAVE_OPENCV_GPU
|
||||||
@ -122,7 +122,7 @@ void MoreAccurateMotionWobbleSuppressor::suppress(int idx, const Mat &frame, Mat
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#ifdef HAVE_OPENCV_GPUWARPING
|
#ifdef HAVE_OPENCV_CUDAWARPING
|
||||||
void MoreAccurateMotionWobbleSuppressorGpu::suppress(int idx, const cuda::GpuMat &frame, cuda::GpuMat &result)
|
void MoreAccurateMotionWobbleSuppressorGpu::suppress(int idx, const cuda::GpuMat &frame, cuda::GpuMat &result)
|
||||||
{
|
{
|
||||||
CV_Assert(motions_ && stabilizationMotions_);
|
CV_Assert(motions_ && stabilizationMotions_);
|
||||||
|
@ -552,7 +552,7 @@ int main(int argc, char* argv[])
|
|||||||
// Warp images and their masks
|
// Warp images and their masks
|
||||||
|
|
||||||
Ptr<WarperCreator> warper_creator;
|
Ptr<WarperCreator> warper_creator;
|
||||||
#ifdef HAVE_OPENCV_GPUWARPING
|
#ifdef HAVE_OPENCV_CUDAWARPING
|
||||||
if (try_gpu && cuda::getCudaEnabledDeviceCount() > 0)
|
if (try_gpu && cuda::getCudaEnabledDeviceCount() > 0)
|
||||||
{
|
{
|
||||||
if (warp_type == "plane") warper_creator = new cv::PlaneWarperGpu();
|
if (warp_type == "plane") warper_creator = new cv::PlaneWarperGpu();
|
||||||
|
@ -2,7 +2,7 @@ SET(OPENCV_GPU_SAMPLES_REQUIRED_DEPS opencv_core opencv_flann opencv_imgproc ope
|
|||||||
opencv_ml opencv_video opencv_objdetect opencv_features2d
|
opencv_ml opencv_video opencv_objdetect opencv_features2d
|
||||||
opencv_calib3d opencv_legacy opencv_contrib opencv_gpu
|
opencv_calib3d opencv_legacy opencv_contrib opencv_gpu
|
||||||
opencv_nonfree opencv_softcascade opencv_superres
|
opencv_nonfree opencv_softcascade opencv_superres
|
||||||
opencv_cudaarithm opencv_gpufilters opencv_gpuwarping opencv_gpuimgproc
|
opencv_cudaarithm opencv_gpufilters opencv_cudawarping opencv_gpuimgproc
|
||||||
opencv_gpufeatures2d opencv_gpuoptflow opencv_gpubgsegm
|
opencv_gpufeatures2d opencv_gpuoptflow opencv_gpubgsegm
|
||||||
opencv_gpustereo opencv_cudalegacy)
|
opencv_gpustereo opencv_cudalegacy)
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
#include "opencv2/imgproc/imgproc.hpp"
|
#include "opencv2/imgproc/imgproc.hpp"
|
||||||
#include "opencv2/gpu.hpp"
|
#include "opencv2/gpu.hpp"
|
||||||
#include "opencv2/gpuimgproc.hpp"
|
#include "opencv2/gpuimgproc.hpp"
|
||||||
#include "opencv2/gpuwarping.hpp"
|
#include "opencv2/cudawarping.hpp"
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
using namespace cv;
|
using namespace cv;
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
#include "opencv2/gpu.hpp"
|
#include "opencv2/gpu.hpp"
|
||||||
#include "opencv2/gpuimgproc.hpp"
|
#include "opencv2/gpuimgproc.hpp"
|
||||||
#include "opencv2/cudaarithm.hpp"
|
#include "opencv2/cudaarithm.hpp"
|
||||||
#include "opencv2/gpuwarping.hpp"
|
#include "opencv2/cudawarping.hpp"
|
||||||
#include "opencv2/gpufeatures2d.hpp"
|
#include "opencv2/gpufeatures2d.hpp"
|
||||||
#include "opencv2/gpufilters.hpp"
|
#include "opencv2/gpufilters.hpp"
|
||||||
#include "opencv2/gpuoptflow.hpp"
|
#include "opencv2/gpuoptflow.hpp"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user