OpenCV: how to get GMM parameters?

468 views Asked by At

I am using BackgroundSubtractorMOG2 to do background subtraction, and I've manually set the number of mixture model to be used as follows:

cv::BackgroundSubtractorMOG2 myModel;
myModel.set("nmixtures",5);

Now I want to display the actual mixture number on the screen to check whether it is working correctly or not. For this, I've tried 'myModel.getParams("nmixtures")' and 'myModel.bgmodelUsedModes', etc. but all failed. I am using OpenCV2.4.5 version. How can I get the actual parameters that GMM is using? Thank you.

1

There are 1 answers

0
E_learner On BEST ANSWER

Ok, I solved it by myself. It should be 'myModel.getInt("nmixtures")'.