Support #14557
fermé
création d'une vidéo au ralenti par opencv
Ajouté par Sebastien LENGAGNE il y a plus de 2 ans.
Mis à jour il y a plus d'un an.
Temps estimé:
(Total: 8:00 h)
Description
L'objectif est de réaliser une vidéo au ralentit (une image par minute) en utilisant la librairie OpenCV
temps estimé 8h
Fichiers
- Version cible mis à Polytech Projets GE - Deuxième Itération 2022
import numpy as np
import cv2 as cv
cap = cv.VideoCapture(0)
- Define the codec and create VideoWriter object
fourcc = cv.VideoWriter_fourcc(*'DIVX')
out = cv.VideoWriter('output.avi', fourcc, 1, (640, 480))
while cap.isOpened():
ret, frame = cap.read()
if not ret:
print("Can't receive frame (stream end?). Exiting ...")
break
#frame = cv.flip(frame, 0)
# write the flipped frame
out.write(frame)
cv.imshow('frame', frame)
if cv.waitKey(1) == ord('q'):
break
- Release everything if job is finished
cap.release()
out.release()
cv.destroyAllWindows()
- Copié vers Support #14728: création d'une vidéo au ralenti par opencv ajouté
- Statut changé de New à In Progress
- Statut changé de In Progress à Resolved
- Statut changé de Resolved à Closed
Formats disponibles : Atom
PDF