Update app.py
Browse files
app.py
CHANGED
@@ -195,7 +195,7 @@ def remove_bg(fl, count, mh, ms, md, lm):
|
|
195 |
m = cv2.inRange(fr, np.array([0,0,0]), np.array([15,15,15]))
|
196 |
fr[m>0] = (16,16,16)
|
197 |
fr[fr_shadow>0] = (fr[fr_shadow>0] / 17).astype(np.uint8)
|
198 |
-
fr[fr_fg==0] = (255,255,255)
|
199 |
|
200 |
fr_fg[fr_fg>0] = 3 #probable fg
|
201 |
mask, bgdModel, fgdModel = cv2.grabCut(fr, fr_fg, None,None,None,15, cv2.GC_INIT_WITH_MASK)
|
|
|
195 |
m = cv2.inRange(fr, np.array([0,0,0]), np.array([15,15,15]))
|
196 |
fr[m>0] = (16,16,16)
|
197 |
fr[fr_shadow>0] = (fr[fr_shadow>0] / 17).astype(np.uint8)
|
198 |
+
#fr[fr_fg==0] = (255,255,255)
|
199 |
|
200 |
fr_fg[fr_fg>0] = 3 #probable fg
|
201 |
mask, bgdModel, fgdModel = cv2.grabCut(fr, fr_fg, None,None,None,15, cv2.GC_INIT_WITH_MASK)
|