# -*- coding:utf-8 -*- import cv2 img = cv2.imread('test.jpg') print "img.shape=", img.shape height, width = img.shape[:2] print "height=", height print "width=", width
$ python getImageSize.py img.shape= (1802, 1150, 3) height= 1802 width= 1150
0 件のコメント:
コメントを投稿