Commit f739990f authored by Rok Mandeljc's avatar Rok Mandeljc

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.
parent 51311779
......@@ -1266,63 +1266,6 @@ TEST(FarnebackOpticalFlow)
}}}
}
namespace cv
{
template<> void DefaultDeleter<CvBGStatModel>::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<CvBGStatModel> 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<BackgroundSubtractor> 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");
......
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