C++
//Chargement de la vidéo
cv::VideoCapture video("filename");
//largeur
int W = video.get(CV_CAP_PROP_FRAME_WIDTH);
//la taille
int H = video.get(CV_CAP_PROP_FRAME_HEIGHT);
//Nombre total d'images
int count = video.get(CV_CAP_PROP_FRAME_COUNT);
// fps
double fps = video.get(CV_CAP_PROP_FPS);
Python
#Chargement de la vidéo
video = cv2.VideoCapture("filename")
#largeur
W = video.get(cv2.CAP_PROP_FRAME_WIDTH)
#la taille
H = video.get(cv2.CAP_PROP_FRAME_HEIGHT)
#Nombre total d'images
count = video.get(cv2.CAP_PROP_FRAME_COUNT)
# fps
fps = video.get(cv2.CAP_PROP_FPS)
Recommended Posts