Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -145,6 +145,8 @@ def make_video(video_path, outdir='./vis_video_depth', encoder='vits'):
|
|
145 |
# change image to black where we found white
|
146 |
depth_color[mask>0] = (0,0,0)
|
147 |
|
|
|
|
|
148 |
blur_frame = raw_frame.copy()
|
149 |
i = 240
|
150 |
l = 0
|
@@ -262,7 +264,8 @@ def get_mesh(image, depth):
|
|
262 |
verts = pts3d.reshape(-1, 3)
|
263 |
#triangles = create_triangles(image.shape[0], image.shape[1])
|
264 |
#print('triangles - ok')
|
265 |
-
rgba = cv2.cvtColor(image[fnum][0], cv2.
|
|
|
266 |
colors = rgba.reshape(-1, 4)
|
267 |
clrs = [[128, 128, 128, 0]]
|
268 |
|
|
|
145 |
# change image to black where we found white
|
146 |
depth_color[mask>0] = (0,0,0)
|
147 |
|
148 |
+
raw_frame = cv2.cvtColor(raw_frame, cv2.COLOR_BGR2RGBA)
|
149 |
+
cv2.mixChannels((depth_color,), (raw_frame,), (0,3,))
|
150 |
blur_frame = raw_frame.copy()
|
151 |
i = 240
|
152 |
l = 0
|
|
|
264 |
verts = pts3d.reshape(-1, 3)
|
265 |
#triangles = create_triangles(image.shape[0], image.shape[1])
|
266 |
#print('triangles - ok')
|
267 |
+
rgba = cv2.cvtColor(image[fnum][0], cv2.COLOR_RGBA2RGB)
|
268 |
+
rgba = cv2.cvtColor(rgba, cv2.COLOR_RGB2RGBA)
|
269 |
colors = rgba.reshape(-1, 4)
|
270 |
clrs = [[128, 128, 128, 0]]
|
271 |
|