如何使用opencv访问均值和协方差?

2024-05-18 12:34:49 发布

您现在位置:Python中文网/ 问答频道 /正文

我尝试在GMM上应用EM之后访问这个方法,使用下面详述的代码:http://docs.opencv.org/2.3/modules/ml/doc/expectation_maximization.html

我的代码:

import cv2,cv 

em = cv2.EM(nclusters=4)
result = em.train(gaussData)

print em.getMeans()

但我得到一个错误:

^{pr2}$

我使用OpenCV2.4.5(http://docs.opencv.org/2.4.5/modules/ml/doc/expectation_maximization.html),它只列出了C++:

的算法::()和算法::SET()函数。

如何使用Python访问均值和协方差?!在


Tags: 代码org算法moduleshttpdocsdochtml
1条回答
网友
1楼 · 发布于 2024-05-18 12:34:49

我克服这一切的方法就是简单地把

print help(em)

在我的代码里。这打印了所有与em相关的数据成员,我能够找到我需要的!在

相关问题 更多 >

    热门问题