Hi ,
I am here because i do not come up to use a MOG background substractor with OpendCV 3.1.0
I don't know if it is an include probleme or anything else.
I followed this official tutorial :http://docs.opencv.org/3.1.0/d1/dc5/tutorial_background_subtraction.html#gsc.tab=0
But when i try to create a MOG background substractor like this:
Ptr pMOG; //MOG Background subtractor
Ptr pMOG2; //MOG2 Background subtractor
...
//create Background Subtractor objects
pMOG = createBackgroundSubtractorMOG(); //MOG approach
pMOG2 = createBackgroundSubtractorMOG2(); //MOG2 approach
i get the error: cv has no member named "createBackgroundSubtractorMOG"
Can someone help me?
Edit:
I write my own code, i can use the MOG2 but i can't find the simple MOG background substractor.
Solution:
Thanks to berak: MOG was moved to [opencv_contrib](https://github.com/Itseez/opencv_contrib)
Importing Contrib to OpenCV
Thanks to the Readme.md in github, i saw that the best way to improt contrib is to rebuild openCV using special option on CMake.
As a temporrary solution i copied the files in an external folder and i included them in my project.
As berak pointed out, the background substractor is in a new namespace, cv::bgsegm::createBackgroundSubtractorMOG(..)
↧