Update app.py
Browse files
    	
        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 = ( | 
| 228 | 
            -
                        depth_r =  | 
| 229 | 
             
                        # may use green channel for 16 levels of opacity
         | 
| 230 | 
            -
                        depth_b = depth_gray - depth_r *  | 
| 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
         | 
