1 | initial version |
Declare your instance as;
cv::BackgroundSubtractorMOG2 bg;
In your loop;
bg.operator ()(frame,fore);
BackgroundSubtractor itself is only used to define the common interface for the whole family of background/foreground segmentation algorithms.
See this example; http://mateuszstankiewicz.eu/?p=189
2 | added another algorithm instantiation |
Declare your instance as;
cv::BackgroundSubtractorMOG2 bg;
or
cv::BackgroundSubtractorMOG2 bg;
In your loop;
bg.operator ()(frame,fore);
BackgroundSubtractor itself is only used to define the common interface for the whole family of background/foreground segmentation algorithms.
See this example; http://mateuszstankiewicz.eu/?p=189
3 | corrected name of additional algorithm |
Declare your instance as;
cv::BackgroundSubtractorMOG2 cv::BackgroundSubtractorMOG bg;
or
cv::BackgroundSubtractorMOG2 bg;
In your loop;
bg.operator ()(frame,fore);
BackgroundSubtractor itself is only used to define the common interface for the whole family of background/foreground segmentation algorithms.
See this example; http://mateuszstankiewicz.eu/?p=189