freealise commited on
Commit
43e945e
·
verified ·
1 Parent(s): 3933bf5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -224,10 +224,10 @@ 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 = (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
232
  # blur_frame[:,:,1] = blur_frame[:,:,1] + opacity_g
233
  blur_frame[:,:,2] = blur_frame[:,:,2] + depth_b
 
224
  blur_frame = blur_image(raw_frame, depth_color, blur_data)
225
 
226
  # encoding depth within original video
227
+ blur_frame = (np.floor(blur_frame / 6) * 6).astype(np.uint8)
228
+ depth_r = np.floor(depth_gray / 6).astype(np.uint8)
229
  # may use green channel for 16 levels of opacity
230
+ depth_b = depth_gray - depth_r * 6
231
  blur_frame[:,:,0] = blur_frame[:,:,0] + depth_r
232
  # blur_frame[:,:,1] = blur_frame[:,:,1] + opacity_g
233
  blur_frame[:,:,2] = blur_frame[:,:,2] + depth_b