def test_MOG2apply(self):
     bgs = bw.BackgroundSubtractorMOG2(History=10)
     frames = create_frameswithmovingcircle(nframes=5,
                                            width=1080,
                                            height=720)
     for fg in frames.apply_backgroundsegmenter(bgs,
                                                roi=(10, 710, 10, 500),
                                                nroi=(20, 30, 20, 30)):
         pass
 def test_MOG2(self):
     bgs = bw.BackgroundSubtractorMOG2(History=2)
     bw.detect_movement(self.vfs,
                        bgs=bgs,
                        analysispath=self.tempdirname1,
                        overwrite=True)
 def test_MOG2params(self):
     bgs = bw.BackgroundSubtractorMOG2(History=10)
     self.assertEqual(bgs.get_params()['History'], 10)
 def test_MOG2defaultinstantiation(self):
     bw.BackgroundSubtractorMOG2()