freealise commited on
Commit
f275bfd
·
verified ·
1 Parent(s): e255a5e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -166,7 +166,8 @@ def remove_bg(fl, s, l, v):
166
 
167
  #remove regions of low saturation and lightness (get scene without shadow)
168
  m = cv2.inRange(cv2.cvtColor(frame_c, cv2.COLOR_RGB2HSV), np.array([0,0,0]), np.array([180,s,l]))
169
- mask = cv2.inRange(blur_s, 0, int(v))
 
170
  masks = np.bitwise_and(m, mask)
171
  frame[masks>0] = (127,127,127)
172
  frame = cv2.medianBlur(frame, b)
 
166
 
167
  #remove regions of low saturation and lightness (get scene without shadow)
168
  m = cv2.inRange(cv2.cvtColor(frame_c, cv2.COLOR_RGB2HSV), np.array([0,0,0]), np.array([180,s,l]))
169
+ print(v)
170
+ mask = cv2.inRange(blur_s, 0, v)
171
  masks = np.bitwise_and(m, mask)
172
  frame[masks>0] = (127,127,127)
173
  frame = cv2.medianBlur(frame, b)