>>> import numpy as np >>> import cv2 >>> img = cv2.imread('foo.jpg') >>> height, width, channels = img.shape >>> print height, width, channels 600 800 3