跟着学利用K-means聚类算法图像分割时,底下会报错,也不太清楚这个问题出在哪了TypeError: np.matrix is not supported. Please convert to a numpy array with np.asarray.
改成Label = km.fit_predict(np.asarray(imgData))试试