Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

There is an example under <your-opencv-folder>/opencv/samples/python2/ , it shows that you can access the mean and cov-matrices via getMat('means') and getMatVector('covs'), e.g.:

em = cv2.EM(...) // specify params inside
em.train(...) // train your em
// get mean and covariance matrices
means = em.getMat('means') 
covs = em.getMatVector('covs')