Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -145,13 +145,15 @@ def make_video(video_path, outdir='./vis_video_depth', encoder='vits'):
|
|
145 |
# change image to black where we found white
|
146 |
depth_color[mask>0] = (0,0,0)
|
147 |
|
|
|
148 |
for i in range(0, 256):
|
149 |
blur_lo = np.array([i,i,i])
|
150 |
blur_hi = np.array([i+16,i+16,i+16])
|
151 |
blur_mask = cv2.inRange(depth_color, blur_lo, blur_hi)
|
152 |
|
153 |
-
|
154 |
-
|
|
|
155 |
blur_frame[blur_mask>0] = blur[blur_mask>0]
|
156 |
i = i + 16
|
157 |
|
|
|
145 |
# change image to black where we found white
|
146 |
depth_color[mask>0] = (0,0,0)
|
147 |
|
148 |
+
blur_frame = raw_frame.copy()
|
149 |
for i in range(0, 256):
|
150 |
blur_lo = np.array([i,i,i])
|
151 |
blur_hi = np.array([i+16,i+16,i+16])
|
152 |
blur_mask = cv2.inRange(depth_color, blur_lo, blur_hi)
|
153 |
|
154 |
+
print(f'kernel size {int((256-i)/16*2+1)}')
|
155 |
+
blur = cv2.GaussianBlur(raw_frame,(int((256-i)/16*2+1),int((256-i)/16*2+1)),0)
|
156 |
+
|
157 |
blur_frame[blur_mask>0] = blur[blur_mask>0]
|
158 |
i = i + 16
|
159 |
|