2017-03-23 13:34:14 -0500 | asked a question | export Gaussian mixture model of backgroundsubtractorMOG2 I'm using the MOG2 algorithm for background subtration in opencv 3.2. I want to look at the learned gaussian mixture models(weights, variance, mean...), however opencv does not provide built-in function to look at the values. In bgfg_gaussmix2.cpp source code, I found the variables I need in class BackgroundSubtractorMOG2Impl: So what I did is just put some functions that can return the variables(in the same format as the built-in functions) Then I also added the following to the background_segm.hpp file, in class CV_EXPORTS_W BackgroundSubtractorMOG2: After this, I build and install the modified opencv source code. Then I wrote my own program to run the backgroundubtractorMOG2 algorithm. I can call the new functions I added to the opencv source code to return those UMat, but the returned UMats are just full of zeros. So my question is how to get the UMats in the right way? |

Copyright OpenCV foundation, 2012-2018. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.