xmrt commited on
Commit
b1ec559
·
1 Parent(s): ceba3ce

3d visualization

Browse files
Files changed (1) hide show
  1. main.py +22 -1
main.py CHANGED
@@ -63,7 +63,28 @@ def poses(photo):
63
  print(glob.glob("*.mp4"))
64
  print(glob.glob("*.avi"))
65
 
66
- return output_file[0]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
67
 
68
 
69
 
 
63
  print(glob.glob("*.mp4"))
64
  print(glob.glob("*.avi"))
65
 
66
+ cap = cv2.VideoCapture(os.path.join(output_file[0]))
67
+ formatfile = "test.mp4"
68
+ fourcc = cv2.VideoWriter_fourcc(*"mp4v") # Codec for MP4 video
69
+ fps = 32
70
+ height = 480
71
+ width = 640
72
+ size = (width,height)
73
+
74
+ out_writer = cv2.VideoWriter(formatfile, fourcc, fps, size)
75
+
76
+ while cap.isOpened():
77
+ ret, frame = cap.read()
78
+ out_writer.write(frame)
79
+
80
+
81
+ # Release everything if job is finished
82
+ cap.release()
83
+ out_writer.release()
84
+ cv2.destroyAllWindows()
85
+
86
+
87
+ return formatfile #output_file[0]
88
 
89
 
90