Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -135,9 +135,12 @@ def make_video(video_path, outdir='./vis_video_depth', encoder='vits'):
|
|
135 |
if not ret:
|
136 |
break
|
137 |
|
138 |
-
thumbnail = cv2.cvtColor(cv2.resize(raw_frame, (
|
139 |
-
if len(thumbnail_old) > 0
|
140 |
-
|
|
|
|
|
|
|
141 |
thumbnail_old = thumbnail
|
142 |
|
143 |
frame = cv2.cvtColor(raw_frame, cv2.COLOR_BGR2RGB) / 255.0
|
|
|
135 |
if not ret:
|
136 |
break
|
137 |
|
138 |
+
thumbnail = cv2.cvtColor(cv2.resize(raw_frame, (16,32)), cv2.COLOR_BGR2GRAY).flatten()
|
139 |
+
if len(thumbnail_old) > 0:
|
140 |
+
diff = thumbnail - thumbnail_old
|
141 |
+
print(diff)
|
142 |
+
if sum(diff) == 0:
|
143 |
+
continue
|
144 |
thumbnail_old = thumbnail
|
145 |
|
146 |
frame = cv2.cvtColor(raw_frame, cv2.COLOR_BGR2RGB) / 255.0
|