Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -474,7 +474,7 @@ def draw_mask(l, t, v, d, evt: gr.EventData):
|
|
474 |
x = points[len(points)-1][0]
|
475 |
y = points[len(points)-1][1]
|
476 |
|
477 |
-
mask = cv2.floodFill(bg, None, (x, y), 1,
|
478 |
# 255 << 8 tells to fill with the value 255)
|
479 |
mask = mask[1:mask.shape[0]-1, 1:mask.shape[1]-1]
|
480 |
|
|
|
474 |
x = points[len(points)-1][0]
|
475 |
y = points[len(points)-1][1]
|
476 |
|
477 |
+
mask = cv2.floodFill(bg, None, (x, y), 1, 0, int(t*256/l), (4 | cv2.FLOODFILL_FIXED_RANGE))[2] #(4 | cv2.FLOODFILL_FIXED_RANGE | cv2.FLOODFILL_MASK_ONLY | 255 << 8)
|
478 |
# 255 << 8 tells to fill with the value 255)
|
479 |
mask = mask[1:mask.shape[0]-1, 1:mask.shape[1]-1]
|
480 |
|