OpenCv图像大小,以kb计算大小

时间:2016-04-26 10:17:54

标签: python opencv

>>> import cv2
>>> img = cv2.imread("messi5.jpg", cv2.CV_LOAD_IMAGE_COLOR)
>>> row, column, depth = img.shape
>>> row, column, depth
(308, 450, 3)       # Dimension is right same as reported by mac
>>> row*column*depth
415800
>>> float(row*column*depth)/1024
406.0546875

我的mac报告大小不同:

My mac report different size:

0 个答案:

没有答案