Commit 5ee7596c authored by Alexander Mordvintsev's avatar Alexander Mordvintsev

fixed EM sample

parent 9c44715f
...@@ -37,8 +37,7 @@ if __name__ == '__main__': ...@@ -37,8 +37,7 @@ if __name__ == '__main__':
print 'EM (opencv) ...' print 'EM (opencv) ...'
em = cv2.EM(points, params = dict( nclusters = cluster_n, cov_mat_type = cv2.EM_COV_MAT_GENERIC) ) em = cv2.EM(points, params = dict( nclusters = cluster_n, cov_mat_type = cv2.EM_COV_MAT_GENERIC) )
means = em.getMeans() means = em.getMeans()
covs = np.zeros((cluster_n, 2, 2), np.float32) covs = em.getCovs()
covs = em.getCovs(covs) # FIXME
found_distrs = zip(means, covs) found_distrs = zip(means, covs)
print 'ready!\n' print 'ready!\n'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment