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

@@ -87,15 +87,15 @@ int main(int argc, char** argv)
namedWindow("video", 1);
namedWindow("segmented", 1);
BackgroundSubtractorMOG bgsubtractor;
bgsubtractor.set("noiseSigma", 10);
Ptr<BackgroundSubtractorMOG> bgsubtractor=createBackgroundSubtractorMOG();
bgsubtractor->setNoiseSigma(10);
for(;;)
{
cap >> tmp_frame;
if( !tmp_frame.data )
break;
bgsubtractor(tmp_frame, bgmask, update_bg_model ? -1 : 0);
bgsubtractor->apply(tmp_frame, bgmask, update_bg_model ? -1 : 0);
//CvMat _bgmask = bgmask;
//cvSegmentFGMask(&_bgmask);
refineSegments(tmp_frame, bgmask, out_frame);