import cv2
import numpy as np
file = cat01.jpg
img = cv2.imread(file)
image_shape = img.shape
sz1 = image_shape[0]#height(rows) of image
sz2 = image_shape[1]#width(colums) of image
sz3 = image_shape[2]#the pixels value is made up of three primary colors
获取图片的长宽高和颜色
最新推荐文章于 2023-02-21 11:23:23 发布