freealise commited on
Commit
940b269
·
verified ·
1 Parent(s): 4e41967

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -224,8 +224,8 @@ def make_video(video_path, outdir='./vis_video_depth', encoder='vits', blur_data
224
  blur_frame = blur_image(raw_frame, depth_color, blur_data)
225
 
226
  # encoding depth within original video
227
- blur_frame = (np.round(blur_frame / 17) * 17).astype(np.uint8)
228
- depth_r = np.round(depth_gray / 17).astype(np.uint8)
229
  # may use green channel for 16 levels of opacity
230
  depth_b = depth_gray - depth_r * 17
231
  blur_frame[:,:,0] = blur_frame[:,:,0] + depth_r
 
224
  blur_frame = blur_image(raw_frame, depth_color, blur_data)
225
 
226
  # encoding depth within original video
227
+ blur_frame = (int(blur_frame / 17) * 17).astype(np.uint8)
228
+ depth_r = int(depth_gray / 17).astype(np.uint8)
229
  # may use green channel for 16 levels of opacity
230
  depth_b = depth_gray - depth_r * 17
231
  blur_frame[:,:,0] = blur_frame[:,:,0] + depth_r