Update app.py
Browse files
app.py
CHANGED
@@ -604,7 +604,7 @@ def draw_mask(l, t, b, v, d, evt: gr.EventData):
|
|
604 |
x = points[len(points)-1][0]
|
605 |
y = points[len(points)-1][1]
|
606 |
|
607 |
-
sel = cv2.floodFill(
|
608 |
# 255 << 8 tells to fill with the value 255)
|
609 |
sel = sel[1:sel.shape[0]-1, 1:sel.shape[1]-1]
|
610 |
|
|
|
604 |
x = points[len(points)-1][0]
|
605 |
y = points[len(points)-1][1]
|
606 |
|
607 |
+
sel = cv2.floodFill(mask, None, (x, y), 1, 2, 2, (4 | cv2.FLOODFILL_FIXED_RANGE))[2] #(4 | cv2.FLOODFILL_FIXED_RANGE | cv2.FLOODFILL_MASK_ONLY | 255 << 8)
|
608 |
# 255 << 8 tells to fill with the value 255)
|
609 |
sel = sel[1:sel.shape[0]-1, 1:sel.shape[1]-1]
|
610 |
|