bra*_*ess 3 python opencv image-processing computer-vision
是否有任何选项可以在Mahalanobis中进行聚类,或者可以轻松地与Opencv一起使用
cv2.kmeans
Run Code Online (Sandbox Code Playgroud)
在python中的功能?
该文档显示在构造函数中没有参数或以其他方式可以改变距离度量.事实上,访问git上的kmeans.cpp源代码,你可以从这样的行看到欧几里德距离(即normL2Sqr)是硬编码的:
const double dist = normL2Sqr(sample, center, dims);
Run Code Online (Sandbox Code Playgroud)
如果您愿意为您的kmeans 使用sklearn scipy,您可以查看此问题以了解如何指定您自己的距离指标.
| 归档时间: |
|
| 查看次数: |
743 次 |
| 最近记录: |