from skimage import io,data,color
import matplotlib.pyplot as plt
img=data.chelsea()
print(img.shape)
#img = color.rgb2gray(img)
#print(type(img))
#print(img.shape)
io.imshow(img)
plt.show()
输出结果,如图所示:
from skimage import io,data,color
import matplotlib.pyplot as plt
img=data.chelsea()
print(img.shape)
img = color.rgb2gray(img)
print(type(img))
print(img.shape)
io.imshow(img)
plt.show()
灰色的维度就是一维的,彩色的维度是三维的
版权声明:本文为ningyanggege原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。