Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -427,7 +427,7 @@ def draw_mask(l, c, k, v, d, evt: gr.EventData):
|
|
427 |
|
428 |
_, bg, mask = cv2.floodFill(bg, None, (x, y), 1, 0, 0 #, (
|
429 |
#4 | cv2.FLOODFILL_FIXED_RANGE | cv2.FLOODFILL_MASK_ONLY | 255 << 8)
|
430 |
-
)
|
431 |
grad_x = cv2.convertScaleAbs(cv2.Sobel(mask, ddepth, 1, 0, ksize=3, scale=scale, delta=delta, borderType=cv2.BORDER_DEFAULT))
|
432 |
grad_y = cv2.convertScaleAbs(cv2.Sobel(mask, ddepth, 0, 1, ksize=3, scale=scale, delta=delta, borderType=cv2.BORDER_DEFAULT))
|
433 |
|
|
|
427 |
|
428 |
_, bg, mask = cv2.floodFill(bg, None, (x, y), 1, 0, 0 #, (
|
429 |
#4 | cv2.FLOODFILL_FIXED_RANGE | cv2.FLOODFILL_MASK_ONLY | 255 << 8)
|
430 |
+
) # 255 << 8 tells to fill with the value 255)
|
431 |
grad_x = cv2.convertScaleAbs(cv2.Sobel(mask, ddepth, 1, 0, ksize=3, scale=scale, delta=delta, borderType=cv2.BORDER_DEFAULT))
|
432 |
grad_y = cv2.convertScaleAbs(cv2.Sobel(mask, ddepth, 0, 1, ksize=3, scale=scale, delta=delta, borderType=cv2.BORDER_DEFAULT))
|
433 |
|