Update app.py
Browse files
app.py
CHANGED
@@ -12,6 +12,8 @@ def doo(video):
|
|
12 |
|
13 |
processed_frames = [] # List to store processed frames
|
14 |
|
|
|
|
|
15 |
while cap.isOpened():
|
16 |
ret, frame = cap.read() # Read video
|
17 |
|
@@ -31,8 +33,9 @@ def doo(video):
|
|
31 |
if processed_frame.shape[2] != 3:
|
32 |
raise ValueError("Processed frame does not have 3 channels (RGB)")
|
33 |
|
34 |
-
# Append the processed frame to the list
|
35 |
-
processed_frames.append(processed_frame)
|
|
|
36 |
|
37 |
cap.release()
|
38 |
|
|
|
12 |
|
13 |
processed_frames = [] # List to store processed frames
|
14 |
|
15 |
+
frame_index = 0 # Initialize frame index
|
16 |
+
|
17 |
while cap.isOpened():
|
18 |
ret, frame = cap.read() # Read video
|
19 |
|
|
|
33 |
if processed_frame.shape[2] != 3:
|
34 |
raise ValueError("Processed frame does not have 3 channels (RGB)")
|
35 |
|
36 |
+
# Append the processed frame (as a tuple) to the list
|
37 |
+
processed_frames.append((frame_index, processed_frame))
|
38 |
+
frame_index += 1
|
39 |
|
40 |
cap.release()
|
41 |
|