freealise commited on
Commit
86036bf
1 Parent(s): 1d54076

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -3
app.py CHANGED
@@ -148,17 +148,21 @@ def make_video(video_path, outdir='./vis_video_depth', encoder='vits'):
148
  blur_frame = raw_frame.copy()
149
  i = 240
150
  j = 1
 
151
  while j <= 16:
152
  blur_lo = np.array([i,i,i])
153
  blur_hi = np.array([i+16,i+16,i+16])
154
  blur_mask = cv2.inRange(depth_color, blur_lo, blur_hi)
155
 
156
- print(f'kernel size {pow(2,int(j/2)+1)-1}')
157
- blur = cv2.GaussianBlur(raw_frame, (pow(2,int(j/2)+1)-1, pow(2,int(j/2)+1)-1), 0)
158
 
159
  blur_frame[blur_mask>0] = blur[blur_mask>0]
160
  i = i - 16
161
- j = j + 1
 
 
 
162
 
163
  # split_region = np.ones((frame_height, margin_width, 3), dtype=np.uint8) * 255
164
  # combined_frame = cv2.hconcat([raw_frame, split_region, depth_color])
 
148
  blur_frame = raw_frame.copy()
149
  i = 240
150
  j = 1
151
+ l = 0
152
  while j <= 16:
153
  blur_lo = np.array([i,i,i])
154
  blur_hi = np.array([i+16,i+16,i+16])
155
  blur_mask = cv2.inRange(depth_color, blur_lo, blur_hi)
156
 
157
+ print(f'kernel size {j}')
158
+ blur = cv2.GaussianBlur(raw_frame, (j, j), 0)
159
 
160
  blur_frame[blur_mask>0] = blur[blur_mask>0]
161
  i = i - 16
162
+ l = l + 1
163
+ if l = 2:
164
+ l = 0
165
+ j = j + 2
166
 
167
  # split_region = np.ones((frame_height, margin_width, 3), dtype=np.uint8) * 255
168
  # combined_frame = cv2.hconcat([raw_frame, split_region, depth_color])