我正在通过openCV示例工作,有时示例将无法运行.在许多情况下,我只需做一些小改动就可以了.在这种情况下,到目前为止我找不到解决方案 如果我运行以下代码,我会在kmeans行上出错.我检查了数据类型,似乎一切都很好.谁知道出了什么问题?谢谢!
代码示例来自https://github.com/Itseez/opencv:
'''
Keyboard shortcuts:
ESC - exit
space - generate new distribution
'''
import numpy as np
import cv2
from gaussian_mix import make_gaussians
if __name__ == '__main__':
cluster_n = 5
img_size = 512
print __doc__
# generating bright palette
colors = np.zeros((1, cluster_n, 3), np.uint8)
colors[0,:] = 255
colors[0,:,0] = np.arange(0, 180, 180.0/cluster_n)
colors = cv2.cvtColor(colors, cv2.COLOR_HSV2BGR)[0]
while True:
print 'sampling distributions...'
points, _ = make_gaussians(cluster_n, img_size)
term_crit = (cv2.TERM_CRITERIA_EPS, 30, 0.1)
ret, labels, centers = …
Run Code Online (Sandbox Code Playgroud) 我的 phpMyAdmin 安装似乎运行良好。我可以处理数据库和表格并将数据集插入表格中。
但我看不到表中的数据集。如果我尝试通过在表导航中选择“浏览”来让它显示数据集,我会收到以下消息:
Showing rows 0 - 0 ( 1 total, Query took 0.0061 sec)
Run Code Online (Sandbox Code Playgroud)
但该表仍然是空的,并且没有出现错误消息。
我可以使用 php 获取数据。