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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -176,13 +176,12 @@ def remove_bg(fl, count):
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"
182
- print(fl_)
183
  cv2.imwrite(fl_, fr_diff.astype(np.uint8))
184
-
185
- return fl_
186
 
187
  def sharpest(fl, i):
188
  break_vid = get_frames(fl, "vid_input_frame", "origin", i)
 
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
+ return fl
181
  else: # even: with the flash
182
  fl_ = fl.split(".")[0] + "_.png"
 
183
  cv2.imwrite(fl_, fr_diff.astype(np.uint8))
184
+ return fl_
 
185
 
186
  def sharpest(fl, i):
187
  break_vid = get_frames(fl, "vid_input_frame", "origin", i)