mirror of
https://github.com/opencv/opencv.git
synced 2026-07-30 07:43:03 +04:00
renamed gpuoptflow -> cudaoptflow
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
if(ANDROID OR IOS)
|
||||
ocv_module_disable(cudaoptflow)
|
||||
endif()
|
||||
|
||||
set(the_description "CUDA-accelerated Optical Flow")
|
||||
|
||||
ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4127 /wd4324 /wd4512 -Wundef -Wmissing-declarations)
|
||||
|
||||
ocv_define_module(cudaoptflow opencv_video opencv_legacy opencv_cudaarithm opencv_cudawarping opencv_cudaimgproc OPTIONAL opencv_cudalegacy)
|
||||
+4
-4
@@ -40,11 +40,11 @@
|
||||
//
|
||||
//M*/
|
||||
|
||||
#ifndef __OPENCV_GPUOPTFLOW_HPP__
|
||||
#define __OPENCV_GPUOPTFLOW_HPP__
|
||||
#ifndef __OPENCV_CUDAOPTFLOW_HPP__
|
||||
#define __OPENCV_CUDAOPTFLOW_HPP__
|
||||
|
||||
#ifndef __cplusplus
|
||||
# error gpuoptflow.hpp header must be compiled as C++
|
||||
# error cudaoptflow.hpp header must be compiled as C++
|
||||
#endif
|
||||
|
||||
#include "opencv2/core/cuda.hpp"
|
||||
@@ -308,4 +308,4 @@ CV_EXPORTS void createOpticalFlowNeedleMap(const GpuMat& u, const GpuMat& v, Gpu
|
||||
|
||||
}} // namespace cv { namespace cuda {
|
||||
|
||||
#endif /* __OPENCV_GPUOPTFLOW_HPP__ */
|
||||
#endif /* __OPENCV_CUDAOPTFLOW_HPP__ */
|
||||
@@ -44,4 +44,4 @@
|
||||
|
||||
using namespace perf;
|
||||
|
||||
CV_PERF_TEST_CUDA_MAIN(gpuoptflow)
|
||||
CV_PERF_TEST_CUDA_MAIN(cudaoptflow)
|
||||
+1
-1
@@ -54,7 +54,7 @@
|
||||
#include "opencv2/ts.hpp"
|
||||
#include "opencv2/ts/gpu_perf.hpp"
|
||||
|
||||
#include "opencv2/gpuoptflow.hpp"
|
||||
#include "opencv2/cudaoptflow.hpp"
|
||||
#include "opencv2/video.hpp"
|
||||
|
||||
#ifdef GTEST_CREATE_SHARED_LIBRARY
|
||||
@@ -45,7 +45,7 @@
|
||||
|
||||
#include <limits>
|
||||
|
||||
#include "opencv2/gpuoptflow.hpp"
|
||||
#include "opencv2/cudaoptflow.hpp"
|
||||
#include "opencv2/cudaarithm.hpp"
|
||||
#include "opencv2/cudawarping.hpp"
|
||||
#include "opencv2/cudaimgproc.hpp"
|
||||
+1
-1
@@ -56,7 +56,7 @@
|
||||
#include "opencv2/ts.hpp"
|
||||
#include "opencv2/ts/gpu_test.hpp"
|
||||
|
||||
#include "opencv2/gpuoptflow.hpp"
|
||||
#include "opencv2/cudaoptflow.hpp"
|
||||
#include "opencv2/video.hpp"
|
||||
|
||||
#include "cvconfig.h"
|
||||
@@ -1,9 +0,0 @@
|
||||
if(ANDROID OR IOS)
|
||||
ocv_module_disable(gpuoptflow)
|
||||
endif()
|
||||
|
||||
set(the_description "GPU-accelerated Optical Flow")
|
||||
|
||||
ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4127 /wd4324 /wd4512 -Wundef -Wmissing-declarations)
|
||||
|
||||
ocv_define_module(gpuoptflow opencv_video opencv_legacy opencv_cudaarithm opencv_cudawarping opencv_cudaimgproc OPTIONAL opencv_cudalegacy)
|
||||
@@ -6,4 +6,4 @@ set(the_description "Super Resolution")
|
||||
ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4127 -Wundef)
|
||||
ocv_define_module(superres opencv_imgproc opencv_video
|
||||
OPTIONAL opencv_highgui opencv_ocl
|
||||
opencv_cudaarithm opencv_cudafilters opencv_cudawarping opencv_cudaimgproc opencv_gpuoptflow opencv_cudacodec)
|
||||
opencv_cudaarithm opencv_cudafilters opencv_cudawarping opencv_cudaimgproc opencv_cudaoptflow opencv_cudacodec)
|
||||
|
||||
@@ -267,7 +267,7 @@ namespace
|
||||
blurKernelSize_ = 5;
|
||||
blurSigma_ = 0.0;
|
||||
|
||||
#ifdef HAVE_OPENCV_GPUOPTFLOW
|
||||
#ifdef HAVE_OPENCV_CUDAOPTFLOW
|
||||
opticalFlow_ = createOptFlow_Farneback_GPU();
|
||||
#else
|
||||
opticalFlow_ = createOptFlow_Farneback();
|
||||
|
||||
@@ -343,7 +343,7 @@ Ptr<DenseOpticalFlowExt> cv::superres::createOptFlow_DualTVL1()
|
||||
///////////////////////////////////////////////////////////////////
|
||||
// GpuOpticalFlow
|
||||
|
||||
#ifndef HAVE_OPENCV_GPUOPTFLOW
|
||||
#ifndef HAVE_OPENCV_CUDAOPTFLOW
|
||||
|
||||
Ptr<DenseOpticalFlowExt> cv::superres::createOptFlow_Farneback_GPU()
|
||||
{
|
||||
@@ -369,7 +369,7 @@ Ptr<DenseOpticalFlowExt> cv::superres::createOptFlow_PyrLK_GPU()
|
||||
return Ptr<DenseOpticalFlowExt>();
|
||||
}
|
||||
|
||||
#else // HAVE_OPENCV_GPUOPTFLOW
|
||||
#else // HAVE_OPENCV_CUDAOPTFLOW
|
||||
|
||||
namespace
|
||||
{
|
||||
@@ -717,7 +717,7 @@ Ptr<DenseOpticalFlowExt> cv::superres::createOptFlow_DualTVL1_GPU()
|
||||
return new DualTVL1_GPU;
|
||||
}
|
||||
|
||||
#endif // HAVE_OPENCV_GPUOPTFLOW
|
||||
#endif // HAVE_OPENCV_CUDAOPTFLOW
|
||||
#ifdef HAVE_OPENCV_OCL
|
||||
|
||||
namespace
|
||||
|
||||
@@ -73,8 +73,8 @@
|
||||
# include "opencv2/cudaimgproc.hpp"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_OPENCV_GPUOPTFLOW
|
||||
# include "opencv2/gpuoptflow.hpp"
|
||||
#ifdef HAVE_OPENCV_CUDAOPTFLOW
|
||||
# include "opencv2/cudaoptflow.hpp"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_OPENCV_CUDACODEC
|
||||
|
||||
@@ -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_gpuoptflow opencv_highgui)
|
||||
OPTIONAL opencv_gpu 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_GPUOPTFLOW)
|
||||
#if defined(HAVE_OPENCV_CUDAIMGPROC) && defined(HAVE_OPENCV_GPU) && 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_GPUOPTFLOW)
|
||||
#endif // defined(HAVE_OPENCV_CUDAIMGPROC) && defined(HAVE_OPENCV_GPU) && defined(HAVE_OPENCV_CUDAOPTFLOW)
|
||||
|
||||
CV_EXPORTS Mat getMotion(int from, int to, const std::vector<Mat> &motions);
|
||||
|
||||
|
||||
@@ -46,8 +46,8 @@
|
||||
#include "opencv2/core.hpp"
|
||||
#include "opencv2/opencv_modules.hpp"
|
||||
|
||||
#ifdef HAVE_OPENCV_GPUOPTFLOW
|
||||
#include "opencv2/gpuoptflow.hpp"
|
||||
#ifdef HAVE_OPENCV_CUDAOPTFLOW
|
||||
#include "opencv2/cudaoptflow.hpp"
|
||||
#endif
|
||||
|
||||
namespace cv
|
||||
@@ -99,7 +99,7 @@ public:
|
||||
OutputArray status, OutputArray errors);
|
||||
};
|
||||
|
||||
#ifdef HAVE_OPENCV_GPUOPTFLOW
|
||||
#ifdef HAVE_OPENCV_CUDAOPTFLOW
|
||||
|
||||
class CV_EXPORTS SparsePyrLkOptFlowEstimatorGpu
|
||||
: public PyrLkOptFlowEstimatorBase, public ISparseOptFlowEstimator
|
||||
|
||||
@@ -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_GPUOPTFLOW)
|
||||
#if defined(HAVE_OPENCV_CUDAIMGPROC) && defined(HAVE_OPENCV_GPU) && 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_GPUOPTFLOW)
|
||||
#endif // defined(HAVE_OPENCV_CUDAIMGPROC) && defined(HAVE_OPENCV_GPU) && defined(HAVE_OPENCV_CUDAOPTFLOW)
|
||||
|
||||
|
||||
Mat getMotion(int from, int to, const std::vector<Mat> &motions)
|
||||
|
||||
@@ -323,7 +323,7 @@ public:
|
||||
|
||||
MotionInpainter::MotionInpainter()
|
||||
{
|
||||
#ifdef HAVE_OPENCV_GPUOPTFLOW
|
||||
#ifdef HAVE_OPENCV_CUDAOPTFLOW
|
||||
setOptFlowEstimator(new DensePyrLkOptFlowEstimatorGpu());
|
||||
#else
|
||||
CV_Error(Error::StsNotImplemented, "Current implementation of MotionInpainter requires GPU");
|
||||
|
||||
@@ -58,7 +58,7 @@ void SparsePyrLkOptFlowEstimator::run(
|
||||
}
|
||||
|
||||
|
||||
#ifdef HAVE_OPENCV_GPUOPTFLOW
|
||||
#ifdef HAVE_OPENCV_CUDAOPTFLOW
|
||||
|
||||
SparsePyrLkOptFlowEstimatorGpu::SparsePyrLkOptFlowEstimatorGpu()
|
||||
{
|
||||
@@ -135,7 +135,7 @@ void DensePyrLkOptFlowEstimatorGpu::run(
|
||||
flowY_.download(flowY.getMatRef());
|
||||
}
|
||||
|
||||
#endif // HAVE_OPENCV_GPUOPTFLOW
|
||||
#endif // HAVE_OPENCV_CUDAOPTFLOW
|
||||
|
||||
} // namespace videostab
|
||||
} // namespace cv
|
||||
|
||||
Reference in New Issue
Block a user