how to get the height and width of the capture opencv python code example
Example 1: find width and height of imported video frame opencv2
width = vcap.get(cv2.CAP_PROP_FRAME_WIDTH )
height = vcap.get(cv2.CAP_PROP_FRAME_HEIGHT )
fps = vcap.get(cv2.CAP_PROP_FPS)
Example 2: cv2 frame size
h, w, c = im.shape
print('width: ', w)
print('height: ', h)
print('channel:', c)
# width: 400
# height: 225
# channel: 3