I can get size of image, like this:
import cv2
img = cv2.imread(\'my_image.jpg\',0)
height, width = img.shape[:2]
How about video?
For the 3.3.1 version, the methods have changed. Check this link for the changes: https://docs.opencv.org/3.3.1/d4/d15/group__videoio__flags__base.html#ga023786be1ee68a9105bf2e48c700294d
Instead of cv2.cv.CV_CAP_PROP_FRAME_WIDTH
use cv2.CAP_PROP_FRAME_WIDTH
and others as necessary from the link above.