Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -449,8 +449,8 @@ def optimize(v, d):
|
|
449 |
depth[mask==0] = (255,255,255)
|
450 |
mask = cv2.inRange(frame, np.array([dcolor[k][0]-8, dcolor[k][1]-8, dcolor[k][2]-8]), np.array([dcolor[k][0]+8, dcolor[k][1]+8, dcolor[k][2]+8]))
|
451 |
depth[mask>0] = (255,255,255)
|
452 |
-
depth[depth.shape[0]-1:depth.shape[0], 0:depth.shape[1]] = 160
|
453 |
-
depth[0:1, 0:depth.shape[1]] = 0
|
454 |
cv2.imwrite(depths[k], depth)
|
455 |
|
456 |
if d == False:
|
|
|
449 |
depth[mask==0] = (255,255,255)
|
450 |
mask = cv2.inRange(frame, np.array([dcolor[k][0]-8, dcolor[k][1]-8, dcolor[k][2]-8]), np.array([dcolor[k][0]+8, dcolor[k][1]+8, dcolor[k][2]+8]))
|
451 |
depth[mask>0] = (255,255,255)
|
452 |
+
depth[depth.shape[0]-1:depth.shape[0], 0:depth.shape[1]] = (160, 160, 160)
|
453 |
+
depth[0:1, 0:depth.shape[1]] = (0, 0, 0)
|
454 |
cv2.imwrite(depths[k], depth)
|
455 |
|
456 |
if d == False:
|