freealise commited on
Commit
54a41e3
1 Parent(s): 130a9f9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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, int(t*256/l), 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
 
 
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