freealise commited on
Commit
b7c9bf3
1 Parent(s): 799c779

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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