Commit f531dd83 authored by Vladislav Vinogradov's avatar Vladislav Vinogradov

gpubgsegm module fixes

parent c0b3424a
......@@ -4,6 +4,6 @@ endif()
set(the_description "GPU-accelerated Background Segmentation")
ocv_warnings_disable(CMAKE_CXX_FLAGS -Wundef -Wmissing-declarations)
ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4127 /wd4324 /wd4512 -Wundef -Wmissing-declarations)
ocv_define_module(gpubgsegm opencv_video opencv_legacy opencv_gpufilters opencv_gpuimgproc)
ocv_define_module(gpubgsegm opencv_video opencv_imgproc opencv_legacy opencv_gpuarithm opencv_gpufilters opencv_gpuimgproc)
********************************************
gpu. GPU-accelerated Background Segmentation
********************************************
**************************************************
gpubgsegm. GPU-accelerated Background Segmentation
**************************************************
.. toctree::
:maxdepth: 1
......
......@@ -43,6 +43,10 @@
#ifndef __OPENCV_GPUBGSEGM_HPP__
#define __OPENCV_GPUBGSEGM_HPP__
#ifndef __cplusplus
# error gpubgsegm.hpp header must be compiled as C++
#endif
#include <memory>
#include "opencv2/core/gpumat.hpp"
......
......@@ -41,6 +41,7 @@
//M*/
#include "perf_precomp.hpp"
#include "opencv2/legacy.hpp"
using namespace std;
using namespace testing;
......@@ -73,7 +74,7 @@ namespace cv
DEF_PARAM_TEST_1(Video, string);
PERF_TEST_P(Video, Video_FGDStatModel,
PERF_TEST_P(Video, FGDStatModel,
Values(string("gpu/video/768x576.avi")))
{
declare.time(60);
......@@ -146,7 +147,7 @@ PERF_TEST_P(Video, Video_FGDStatModel,
DEF_PARAM_TEST(Video_Cn_LearningRate, string, MatCn, double);
PERF_TEST_P(Video_Cn_LearningRate, Video_MOG,
PERF_TEST_P(Video_Cn_LearningRate, MOG,
Combine(Values("gpu/video/768x576.avi", "gpu/video/1920x1080.avi"),
GPU_CHANNELS_1_3_4,
Values(0.0, 0.01)))
......@@ -245,7 +246,7 @@ PERF_TEST_P(Video_Cn_LearningRate, Video_MOG,
DEF_PARAM_TEST(Video_Cn, string, int);
PERF_TEST_P(Video_Cn, Video_MOG2,
PERF_TEST_P(Video_Cn, MOG2,
Combine(Values("gpu/video/768x576.avi", "gpu/video/1920x1080.avi"),
GPU_CHANNELS_1_3_4))
{
......@@ -344,7 +345,7 @@ PERF_TEST_P(Video_Cn, Video_MOG2,
#if BUILD_WITH_VIDEO_INPUT_SUPPORT
PERF_TEST_P(Video_Cn, Video_MOG2GetBackgroundImage,
PERF_TEST_P(Video_Cn, MOG2GetBackgroundImage,
Combine(Values("gpu/video/768x576.avi", "gpu/video/1920x1080.avi"),
GPU_CHANNELS_1_3_4))
{
......@@ -428,7 +429,7 @@ PERF_TEST_P(Video_Cn, Video_MOG2GetBackgroundImage,
DEF_PARAM_TEST(Video_Cn_MaxFeatures, string, MatCn, int);
PERF_TEST_P(Video_Cn_MaxFeatures, Video_GMG,
PERF_TEST_P(Video_Cn_MaxFeatures, GMG,
Combine(Values(string("gpu/video/768x576.avi")),
GPU_CHANNELS_1_3_4,
Values(20, 40, 60)))
......
......@@ -44,4 +44,4 @@
using namespace perf;
CV_PERF_TEST_MAIN(gpuarithm, printCudaInfo())
CV_PERF_TEST_MAIN(gpubgsegm, printCudaInfo())
......@@ -55,9 +55,7 @@
#include "opencv2/ts/gpu_perf.hpp"
#include "opencv2/gpubgsegm.hpp"
#include "opencv2/video.hpp"
#include "opencv2/legacy.hpp"
#ifdef GTEST_CREATE_SHARED_LIBRARY
#error no modules except ts should have GTEST_CREATE_SHARED_LIBRARY defined
......
......@@ -48,7 +48,7 @@
#include "opencv2/core/cuda/utility.hpp"
#include "opencv2/core/cuda/reduce.hpp"
#include "opencv2/core/cuda/functional.hpp"
#include "fgd_bgfg_common.hpp"
#include "fgd.hpp"
using namespace cv::gpu;
using namespace cv::gpu::cudev;
......
......@@ -59,7 +59,7 @@ int cv::gpu::FGDStatModel::update(const cv::gpu::GpuMat&) { throw_no_cuda(); ret
#else
#include "fgd_bgfg_common.hpp"
#include "cuda/fgd.hpp"
#include "opencv2/imgproc/imgproc_c.h"
namespace
......
......@@ -46,23 +46,10 @@
#include <limits>
#include "opencv2/gpubgsegm.hpp"
#include "opencv2/gpuarithm.hpp"
#include "opencv2/gpufilters.hpp"
#include "opencv2/gpuimgproc.hpp"
#include "opencv2/imgproc/imgproc_c.h"
#include "opencv2/video.hpp"
#include "opencv2/core/gpu_private.hpp"
#include "opencv2/opencv_modules.hpp"
#ifdef HAVE_OPENCV_GPULEGACY
# include "opencv2/gpulegacy/private.hpp"
#endif
#ifdef HAVE_CUDA
# include "cuda/fgd_bgfg_common.hpp"
#endif
#endif /* __OPENCV_PRECOMP_H__ */
......@@ -143,7 +143,7 @@ GPU_TEST_P(FGDStatModel, Update)
}
}
INSTANTIATE_TEST_CASE_P(GPU_Video, FGDStatModel, testing::Combine(
INSTANTIATE_TEST_CASE_P(GPU_BgSegm, FGDStatModel, testing::Combine(
ALL_DEVICES,
testing::Values(std::string("768x576.avi")),
testing::Values(Channels(3), Channels(4))));
......@@ -219,7 +219,7 @@ GPU_TEST_P(MOG, Update)
}
}
INSTANTIATE_TEST_CASE_P(GPU_Video, MOG, testing::Combine(
INSTANTIATE_TEST_CASE_P(GPU_BgSegm, MOG, testing::Combine(
ALL_DEVICES,
testing::Values(std::string("768x576.avi")),
testing::Values(UseGray(true), UseGray(false)),
......@@ -339,7 +339,7 @@ GPU_TEST_P(MOG2, getBackgroundImage)
ASSERT_MAT_NEAR(background_gold, background, 0);
}
INSTANTIATE_TEST_CASE_P(GPU_Video, MOG2, testing::Combine(
INSTANTIATE_TEST_CASE_P(GPU_BgSegm, MOG2, testing::Combine(
ALL_DEVICES,
testing::Values(std::string("768x576.avi")),
testing::Values(UseGray(true), UseGray(false)),
......@@ -395,7 +395,7 @@ GPU_TEST_P(GMG, Accuracy)
ASSERT_MAT_NEAR(fullfg, d_fgmask, 0);
}
INSTANTIATE_TEST_CASE_P(GPU_Video, GMG, testing::Combine(
INSTANTIATE_TEST_CASE_P(GPU_BgSegm, GMG, testing::Combine(
ALL_DEVICES,
DIFFERENT_SIZES,
testing::Values(MatType(CV_8U), MatType(CV_16U), MatType(CV_32F)),
......
......@@ -57,8 +57,6 @@
#include "opencv2/ts/gpu_test.hpp"
#include "opencv2/gpubgsegm.hpp"
#include "opencv2/video.hpp"
#include "opencv2/legacy.hpp"
#endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment