聚類應用,圖像壓縮 ---kmeans

import matplotlib.pyplot as plt # plt 用於顯示圖片 import matplotlib.image as mpimg # mpimg 用於讀取圖片 from sklearn.cluster import KMeans import numpy as np pixel = mpimg.imread(‘lena_cor.jpg’) pixel = pixel.re
相關文章
相關標籤/搜索