freealise commited on
Commit
fbfa9b1
·
verified ·
1 Parent(s): 93d854e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -196,7 +196,7 @@ def make_video(video_path, outdir='./vis_video_depth', encoder='vits', blur_data
196
  mask = cv2.inRange(depth_gray[int(depth_gray.shape[0]/7*6):depth_gray.shape[0], 0:depth_gray.shape[1]], 180, 255)
197
  depth_gray[int(depth_gray.shape[0]/7*6):depth_gray.shape[0], 0:depth_gray.shape[1]][mask>0] = 180
198
 
199
- depth_color = cv2.cvtColor(depth_gray, cv2.COLOR_GRAY2BGR)
200
  # split_region = np.ones((frame_height, margin_width, 3), dtype=np.uint8) * 255
201
  # combined_frame = cv2.hconcat([raw_frame, split_region, depth_color])
202
 
@@ -219,7 +219,7 @@ def make_video(video_path, outdir='./vis_video_depth', encoder='vits', blur_data
219
  continue
220
  thumbnail_old = thumbnail
221
 
222
- blur_frame = blur_image(raw_frame, depth_color, blur_data)
223
  comb_frame = np.concatenate((blur_frame, depth_color), axis=0)
224
 
225
  cv2.imwrite(f"f{count}_comb.png", comb_frame)
 
196
  mask = cv2.inRange(depth_gray[int(depth_gray.shape[0]/7*6):depth_gray.shape[0], 0:depth_gray.shape[1]], 180, 255)
197
  depth_gray[int(depth_gray.shape[0]/7*6):depth_gray.shape[0], 0:depth_gray.shape[1]][mask>0] = 180
198
 
199
+ depth_color = cv2.cvtColor(depth_gray, cv2.COLOR_GRAY2BGRA)
200
  # split_region = np.ones((frame_height, margin_width, 3), dtype=np.uint8) * 255
201
  # combined_frame = cv2.hconcat([raw_frame, split_region, depth_color])
202
 
 
219
  continue
220
  thumbnail_old = thumbnail
221
 
222
+ blur_frame = cv2.cvtColor(blur_image(raw_frame, depth_color, blur_data), cv2.COLOR_BGR2BGRA)
223
  comb_frame = np.concatenate((blur_frame, depth_color), axis=0)
224
 
225
  cv2.imwrite(f"f{count}_comb.png", comb_frame)