Comment lire la largeur du cadre de la vidéo dans CV2
import cv2
vcap = cv2.VideoCapture('video.avi') # 0=camera
if vcap.isOpened():
# get vcap property
width = vcap.get(cv2.cv.CV_CAP_PROP_FRAME_WIDTH) # float `width`
height = vcap.get(cv2.cv.CV_CAP_PROP_FRAME_HEIGHT) # float `height`
# or
width = vcap.get(3) # float `width`
height = vcap.get(4) # float `height`
# it gives me 0.0 :/
fps = vcap.get(cv2.cv.CV_CAP_PROP_FPS)
Trewqy Zebra