Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -406,7 +406,7 @@ def optimize(v, d):
|
|
406 |
dcolor = bincount(frame)
|
407 |
print(dcolor)
|
408 |
depth = cv2.imread(depths[k]).astype(np.uint8)
|
409 |
-
mask = cv2.inRange(frame, np.array(dcolor), np.array(dcolor))
|
410 |
depth[mask>0] = (255,255,255)
|
411 |
cv2.imwrite(depths[k], depth)
|
412 |
|
|
|
406 |
dcolor = bincount(frame)
|
407 |
print(dcolor)
|
408 |
depth = cv2.imread(depths[k]).astype(np.uint8)
|
409 |
+
mask = cv2.inRange(frame, np.array([dcolor[0]-8, dcolor[1]-8, dcolor[2]-8]), np.array([dcolor[0]+8, dcolor[1]+8, dcolor[2]+8]))
|
410 |
depth[mask>0] = (255,255,255)
|
411 |
cv2.imwrite(depths[k], depth)
|
412 |
|