Update app.py
Browse files
app.py
CHANGED
@@ -582,13 +582,7 @@ def draw_mask(l, t, th, v, d, evt: gr.EventData):
|
|
582 |
|
583 |
#bd = cv2.convertScaleAbs(cv2.Laplacian(bg, cv2.CV_64F, 5))
|
584 |
|
585 |
-
|
586 |
-
_bg = cv2.medianBlur(bg, 255)
|
587 |
-
|
588 |
-
for i in range(0, n):
|
589 |
-
_bg = cv2.medianBlur(_bg, 255)
|
590 |
-
|
591 |
-
bg = cv2.convertScaleAbs(bg.astype(np.int16)-_bg.astype(np.int16)).astype(np.uint8)
|
592 |
|
593 |
#indices = np.arange(0,256) # List of all colors
|
594 |
#divider = np.linspace(0,255,l+1)[1] # we get a divider
|
|
|
582 |
|
583 |
#bd = cv2.convertScaleAbs(cv2.Laplacian(bg, cv2.CV_64F, 5))
|
584 |
|
585 |
+
bg = ((bg - 127) * 2).astype(np.uint8)
|
|
|
|
|
|
|
|
|
|
|
|
|
586 |
|
587 |
#indices = np.arange(0,256) # List of all colors
|
588 |
#divider = np.linspace(0,255,l+1)[1] # we get a divider
|