import cv2
img = cv2.imread('../0.jpg')
# 图片性质
#rows,cols,channels
rows, cols, channels = img.shape # 返回(310, 310, 3)
print(rows) # 宽310(rows)
print(cols) # 长310(cols)
print(channels) # 3通道(channels)
# size
print(img.size) # 所有像素数量: 288300 = 310 * 310 * 3
#type
print(img.dtype) # uint8
OpenCV图像处理---获取图片性质
最新推荐文章于 2024-12-15 01:19:03 发布