Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

The reason why you get different results is hidden in one of the parameters you use: CvEM::START_AUTO_STEP . Thereby the k-means algorithm is used to estimate the initial parameters. Since k-means is initialized with random initial centers (KMEANS_PP_CENTERS) it results in different outcomes of parameters and thus different initial parameters for the EM-algorithm. If you use a large amount of data, I guess the effect will be reduced. However, if you don't want this effect at all, you have to initialize your EM-algorithm by hand and then use either CvEM::START_E_STEP or CvEM::START_M_STEP.