refactored MOG2 algorithm

This commit is contained in:
Vladislav Vinogradov
2013-05-06 17:41:13 +04:00
parent a2adab7283
commit b8f0d1a0e4
6 changed files with 224 additions and 215 deletions

View File

@@ -1399,13 +1399,13 @@ TEST(MOG2)
cap >> frame;
cv::Ptr<cv::BackgroundSubtractor> d_mog2 = cv::gpu::createBackgroundSubtractorMOG2();
cv::gpu::GpuMat d_frame(frame);
cv::gpu::MOG2_GPU d_mog2;
cv::gpu::GpuMat d_foreground;
cv::gpu::GpuMat d_background;
d_mog2(d_frame, d_foreground);
d_mog2.getBackgroundImage(d_background);
d_mog2->apply(d_frame, d_foreground);
d_mog2->getBackgroundImage(d_background);
while (!TestSystem::instance().stop())
{
@@ -1414,8 +1414,8 @@ TEST(MOG2)
TestSystem::instance().gpuOn();
d_mog2(d_frame, d_foreground);
d_mog2.getBackgroundImage(d_background);
d_mog2->apply(d_frame, d_foreground);
d_mog2->getBackgroundImage(d_background);
TestSystem::instance().gpuOff();
}