Update app.py
Browse files
app.py
CHANGED
@@ -150,7 +150,7 @@ def remove_bg(fl, count):
|
|
150 |
fr = cv2.imread(fl).astype(np.uint8)
|
151 |
|
152 |
b = 3
|
153 |
-
element = cv2.getStructuringElement(cv2.
|
154 |
|
155 |
n = int((fr.shape[0]*fr.shape[1]) / (256*256))
|
156 |
fr_bg = cv2.medianBlur(fr, 255)
|
|
|
150 |
fr = cv2.imread(fl).astype(np.uint8)
|
151 |
|
152 |
b = 3
|
153 |
+
element = cv2.getStructuringElement(cv2.MORPH_CROSS, (2 * b + 1, 2 * b + 1), (b, b))
|
154 |
|
155 |
n = int((fr.shape[0]*fr.shape[1]) / (256*256))
|
156 |
fr_bg = cv2.medianBlur(fr, 255)
|