⚲
Projet
Général
Profil
Connexion
S'enregistrer
Accueil
Projets
Aide
Recherche
:
Polytech Ge Sous Traitance
Tous les projets
Polytech Projets Ge
»
Polytech Ge Sous Traitance
Aperçu
Activité
Roadmap
Demandes
Gantt
Calendrier
Annonces
Documents
Wiki
Fichiers
Dépôt
Télécharger (564 octets)
Capture de video au ralentit
» in_img_out_video.py
Marouane SOBTI
, 02/12/2022 14:14
import
cv2
import
numpy
as
np
import
glob
import
os
dir_path
=
os
.
path
.
dirname
(
os
.
path
.
realpath
(
__file__
))
file_pattern
=
'/*'
file_extenstion
=
'.png'
full
=
dir_path
+
file_pattern
+
file_extenstion
img_array
=
[]
for
filename
in
glob
.
glob
(
full
):
img
=
cv2
.
imread
(
filename
)
height
,
width
,
layers
=
img
.
shape
size
=
(
width
,
height
)
img_array
.
append
(
img
)
out
=
cv2
.
VideoWriter
(
'project.avi'
,
cv2
.
VideoWriter_fourcc
(
*
'DIVX'
),
25
,
size
)
for
i
in
range
(
len
(
img_array
)):
out
.
write
(
img_array
[
i
])
out
.
release
()
« Précédent
1
2
Suivant »
(2-2/2)
Chargement...