Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -203,8 +203,8 @@ def make_video(video_path, outdir='./vis_video_depth', encoder='vits', remove_bg
|
|
203 |
mask_no_shadow = cv2.inRange(diff_c, np.array([0,0,0]), np.array([16,16,16]))
|
204 |
mask_shadow = cv2.bitwise_not(mask_no_shadow)
|
205 |
|
206 |
-
backSub = cv2.
|
207 |
-
fgMask = backSub.apply(raw_frame)
|
208 |
|
209 |
m = cv2.inRange(raw_frame, np.array([255,255,255]), np.array([255,255,255]))
|
210 |
raw_frame[m>0] = (239,239,239)
|
|
|
203 |
mask_no_shadow = cv2.inRange(diff_c, np.array([0,0,0]), np.array([16,16,16]))
|
204 |
mask_shadow = cv2.bitwise_not(mask_no_shadow)
|
205 |
|
206 |
+
backSub = cv2.createBackgroundSubtractorMOG2()
|
207 |
+
fgMask = backSub.apply(cv2.cvtColor(raw_frame, cv2.COLOR_BGR2RGB))
|
208 |
|
209 |
m = cv2.inRange(raw_frame, np.array([255,255,255]), np.array([255,255,255]))
|
210 |
raw_frame[m>0] = (239,239,239)
|