Update app.py
Browse files
app.py
CHANGED
@@ -435,7 +435,7 @@ def seg_frame(newmask):
|
|
435 |
bg = cv2.dilate(newmask, element)
|
436 |
bg[bg.shape[0]-64:bg.shape[0],0:bg.shape[1]] = 0
|
437 |
|
438 |
-
mask = np.zeros(
|
439 |
# https://docs.opencv.org/4.x/d8/d83/tutorial_py_grabcut.html
|
440 |
# wherever it is marked white (sure foreground), change mask=1
|
441 |
# wherever it is marked black (sure background), change mask=0
|
|
|
435 |
bg = cv2.dilate(newmask, element)
|
436 |
bg[bg.shape[0]-64:bg.shape[0],0:bg.shape[1]] = 0
|
437 |
|
438 |
+
mask = np.zeros(newmask.shape[:2],np.uint8)
|
439 |
# https://docs.opencv.org/4.x/d8/d83/tutorial_py_grabcut.html
|
440 |
# wherever it is marked white (sure foreground), change mask=1
|
441 |
# wherever it is marked black (sure background), change mask=0
|