refactored video module; use the new-style algorithms now

This commit is contained in:
Vadim Pisarevsky
2013-03-20 19:51:49 +04:00
parent 14a0abbfa9
commit 07e0f7bf59
28 changed files with 1113 additions and 2270 deletions

View File

@@ -1316,10 +1316,10 @@ TEST(MOG)
cv::Mat frame;
cap >> frame;
cv::BackgroundSubtractorMOG mog;
cv::Ptr<cv::BackgroundSubtractor> mog = cv::createBackgroundSubtractorMOG();
cv::Mat foreground;
mog(frame, foreground, 0.01);
mog->apply(frame, foreground, 0.01);
while (!TestSystem::instance().stop())
{
@@ -1327,7 +1327,7 @@ TEST(MOG)
TestSystem::instance().cpuOn();
mog(frame, foreground, 0.01);
mog->apply(frame, foreground, 0.01);
TestSystem::instance().cpuOff();
}
@@ -1367,12 +1367,12 @@ TEST(MOG2)
cv::Mat frame;
cap >> frame;
cv::BackgroundSubtractorMOG2 mog2;
cv::Ptr<cv::BackgroundSubtractor> mog2 = cv::createBackgroundSubtractorMOG2();
cv::Mat foreground;
cv::Mat background;
mog2(frame, foreground);
mog2.getBackgroundImage(background);
mog2->apply(frame, foreground);
mog2->getBackgroundImage(background);
while (!TestSystem::instance().stop())
{
@@ -1380,8 +1380,8 @@ TEST(MOG2)
TestSystem::instance().cpuOn();
mog2(frame, foreground);
mog2.getBackgroundImage(background);
mog2->apply(frame, foreground);
mog2->getBackgroundImage(background);
TestSystem::instance().cpuOff();
}