def rgb2gray(rgb): return np.dot(rgb[...,:3], [0.299, 0.587, 0.114]) gray = rgb2gray(lena) # 也可以用plt.imshow(gray, cmap ...
確定! 回上一頁