freealise commited on
Commit
e7b48bb
1 Parent(s): 3349f6e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -492,7 +492,7 @@ def apply_mask(d, b):
492
  if ksize/2 - int(ksize/2) == 0:
493
  ksize = ksize + 1
494
 
495
- frame = cv2.imread(frames[frame_selected]).astype(np.uint8)
496
  dmask = cv2.GaussianBlur(dmask, (ksize,ksize), 0)
497
  frame[:, :, 3] = 255 - dmask
498
  cv2.imwrite(frames[frame_selected], frame)
 
492
  if ksize/2 - int(ksize/2) == 0:
493
  ksize = ksize + 1
494
 
495
+ frame = cv2.imread(frames[frame_selected], cv2.IMREAD_UNCHANGED).astype(np.uint8)
496
  dmask = cv2.GaussianBlur(dmask, (ksize,ksize), 0)
497
  frame[:, :, 3] = 255 - dmask
498
  cv2.imwrite(frames[frame_selected], frame)