freealise commited on
Commit
647055f
·
verified ·
1 Parent(s): dd5a8d5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -175,7 +175,7 @@ def remove_bg(fl, count):
175
 
176
  if count % 2: # odd: is photo without the flash
177
  fr = cv2.imread(fl_).astype(np.uint8)
178
- fr = fr_diff - fr
179
  cv2.imwrite(fl_, fr)
180
  else: # even: with the flash
181
  fl_ = fl.split(".")[0] + "_.png"
 
175
 
176
  if count % 2: # odd: is photo without the flash
177
  fr = cv2.imread(fl_).astype(np.uint8)
178
+ fr = fr_diff - cv2.cvtColor(fr, cv2.COLOR_BGR2GRAY)
179
  cv2.imwrite(fl_, fr)
180
  else: # even: with the flash
181
  fl_ = fl.split(".")[0] + "_.png"