background detection tutorial: error using MOG pointers
Hi everyone, I was trying to go through this background detection tutorial:
The MOG pointer is initialized as
Ptr<BackgroundSubtractor> pMOG; //MOG Background subtractor
and in main, it is used in the following manner:
pMOG = createBackgroundSubtractorMOG();
However, this yields the following error:
Error: Identifier "createBackgroundSubtractorMOG" is undefined
Also, when the background model is to be updated, the following command is used:
pMOG->apply(frame, fgMaskMOG);
Which in turn yields the following error:
Error: class "cv::BackgroundSubtractor" has no member "apply"
Any idea of what can be done about this?
Many thanks in advance!