mirror of
https://github.com/opencv/opencv.git
synced 2026-07-31 00:03:03 +04:00
move vstab related CUDA routines to vstab module
This commit is contained in:
@@ -48,10 +48,38 @@
|
||||
# include "opencv2/cudawarping.hpp"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_OPENCV_CUDA
|
||||
# include "opencv2/cuda.hpp"
|
||||
#endif
|
||||
#if !defined HAVE_CUDA || defined(CUDA_DISABLER)
|
||||
|
||||
namespace cv { namespace cuda {
|
||||
static void calcWobbleSuppressionMaps(int, int, int, Size, const Mat&, const Mat&, GpuMat&, GpuMat&) { throw_no_cuda(); }
|
||||
}}
|
||||
|
||||
#else
|
||||
|
||||
namespace cv { namespace cuda { namespace device { namespace globmotion {
|
||||
void calcWobbleSuppressionMaps(
|
||||
int left, int idx, int right, int width, int height,
|
||||
const float *ml, const float *mr, PtrStepSzf mapx, PtrStepSzf mapy);
|
||||
}}}}
|
||||
|
||||
namespace cv { namespace cuda {
|
||||
static void calcWobbleSuppressionMaps(
|
||||
int left, int idx, int right, Size size, const Mat &ml, const Mat &mr,
|
||||
GpuMat &mapx, GpuMat &mapy)
|
||||
{
|
||||
CV_Assert(ml.size() == Size(3, 3) && ml.type() == CV_32F && ml.isContinuous());
|
||||
CV_Assert(mr.size() == Size(3, 3) && mr.type() == CV_32F && mr.isContinuous());
|
||||
|
||||
mapx.create(size, CV_32F);
|
||||
mapy.create(size, CV_32F);
|
||||
|
||||
cv::cuda::device::globmotion::calcWobbleSuppressionMaps(
|
||||
left, idx, right, size.width, size.height,
|
||||
ml.ptr<float>(), mr.ptr<float>(), mapx, mapy);
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
||||
|
||||
namespace cv
|
||||
{
|
||||
@@ -121,8 +149,7 @@ void MoreAccurateMotionWobbleSuppressor::suppress(int idx, const Mat &frame, Mat
|
||||
remap(frame, result, mapx_, mapy_, INTER_LINEAR, BORDER_REPLICATE);
|
||||
}
|
||||
|
||||
|
||||
#if defined(HAVE_OPENCV_CUDA) && defined(HAVE_OPENCV_CUDAWARPING)
|
||||
#if defined(HAVE_OPENCV_CUDAWARPING)
|
||||
void MoreAccurateMotionWobbleSuppressorGpu::suppress(int idx, const cuda::GpuMat &frame, cuda::GpuMat &result)
|
||||
{
|
||||
CV_Assert(motions_ && stabilizationMotions_);
|
||||
|
||||
Reference in New Issue
Block a user