Update app.py
Browse files
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"
|