How does opencv store matrix value in Gaussian mixture? In which order?
-
25-06-2021 - |
Question
I've searched the "bgfg_gaussmix2.cpp" code, it says in gaussian mixture model, it stores mixture weight (w), mean ( nchannels values ) and covariance for each gaussian mixture of each pixel background model. I want to know the order of its storage, for instance, is it "weight, mean, covariance", or " mean, covariance, weight", or something else? Thanks in advance.
Solution
If you are speeking about the gaussian mixture structure CvPBGMMGaussian, the storing order is
- Weight
- mean dimension 1
- mean dimension 2
- mean dimension 3
- Variance
The three dimensions are packed in a float array. Here is the definition of this structure :
#define CV_BGFG_MOG2_NDMAX 3
typedef struct CvPBGMMGaussian
{
float weight;
float mean[CV_BGFG_MOG2_NDMAX];
float variance;
}CvPBGMMGaussian
If you are not speeking about this structure, please be more precise in your question.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow