From f739990f4c139fe83583bcae7e39545e4a669de7 Mon Sep 17 00:00:00 2001 From: Rok Mandeljc Date: Sat, 30 Aug 2014 00:05:52 +0200 Subject: [PATCH] samples: gpu: performance: removed FGDStatModel performance comparison test The FGD background subtraction model was part of opencv_legacy module; as it is gone now, it makes little sense to benchmark the GPU version, either, so the whole test is removed. --- samples/gpu/performance/tests.cpp | 57 --------------------------------------- 1 file changed, 57 deletions(-) diff --git a/samples/gpu/performance/tests.cpp b/samples/gpu/performance/tests.cpp index 305f0cc..cecf1ce 100644 --- a/samples/gpu/performance/tests.cpp +++ b/samples/gpu/performance/tests.cpp @@ -1266,63 +1266,6 @@ TEST(FarnebackOpticalFlow) }}} } -namespace cv -{ - template<> void DefaultDeleter::operator ()(CvBGStatModel* obj) const - { - cvReleaseBGStatModel(&obj); - } -} - -TEST(FGDStatModel) -{ - const std::string inputFile = abspath("768x576.avi"); - - VideoCapture cap(inputFile); - if (!cap.isOpened()) throw runtime_error("can't open 768x576.avi"); - - Mat frame; - cap >> frame; - - IplImage ipl_frame = frame; - Ptr model(cvCreateFGDStatModel(&ipl_frame)); - - while (!TestSystem::instance().stop()) - { - cap >> frame; - ipl_frame = frame; - - TestSystem::instance().cpuOn(); - - cvUpdateBGStatModel(&ipl_frame, model); - - TestSystem::instance().cpuOff(); - } - TestSystem::instance().cpuComplete(); - - cap.open(inputFile); - - cap >> frame; - - cuda::GpuMat d_frame(frame), d_fgmask; - Ptr d_fgd = cuda::createBackgroundSubtractorFGD(); - - d_fgd->apply(d_frame, d_fgmask); - - while (!TestSystem::instance().stop()) - { - cap >> frame; - d_frame.upload(frame); - - TestSystem::instance().gpuOn(); - - d_fgd->apply(d_frame, d_fgmask); - - TestSystem::instance().gpuOff(); - } - TestSystem::instance().gpuComplete(); -} - TEST(MOG) { const std::string inputFile = abspath("768x576.avi"); -- 2.7.4