Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Which version of OpenCV do you use? createBackgroundSubtractorMOG was added in master branch and will be available in the next major release. In 2.4 version BackgroundSubtractorMOG is used that way:

BackgroundSubtractorMOG mog;
mog(frame, fgMaskMOG);

And don't forget to include opencv2/video/video.hpp header.