Image size (Python, OpenCV) April 17, 2023 by Tarik Using openCV and numpy it is as easy as this: import cv2 img = cv2.imread('path/to/img',0) height, width = img.shape[:2]