'''
实验名称：获取图像属性信息
实验平台：核桃派1B
'''

import cv2

img = cv2.imread("lenna.jpg") # 读取当前目录下的图像lenna.jpg
print('彩色图像: ')
print('shape: ', img.shape)
print('size: ', img.size)
print('dtype: ', img.dtype)

img = cv2.imread("lenna.jpg", 0) # 读取并转换成灰度图像
print('灰度图像: ')
print('shape: ', img.shape)
print('size: ', img.size)
print('dtype: ', img.dtype)