Spaces:
				
			
			
	
			
			
					
		Running
		
	
	
	
			
			
	
	
	
	
		
		
					
		Running
		
	Update app.py
Browse files
    	
        app.py
    CHANGED
    
    | @@ -69,6 +69,13 @@ def stitch_rgbd_videos( | |
| 69 | 
             
                            # Generate a color depth image using the inferno colormap.
         | 
| 70 | 
             
                            cmap = matplotlib.colormaps.get_cmap("inferno")
         | 
| 71 | 
             
                            depth_vis = (cmap(depth_norm / 255.0)[..., :3] * 255).astype(np.uint8)
         | 
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
| 72 | 
             
                        # Apply Gaussian blur if requested.
         | 
| 73 | 
             
                        if blur > 0:
         | 
| 74 | 
             
                            kernel_size = int(blur * 20) * 2 + 1  # Ensures an odd kernel size.
         | 
|  | |
| 69 | 
             
                            # Generate a color depth image using the inferno colormap.
         | 
| 70 | 
             
                            cmap = matplotlib.colormaps.get_cmap("inferno")
         | 
| 71 | 
             
                            depth_vis = (cmap(depth_norm / 255.0)[..., :3] * 255).astype(np.uint8)
         | 
| 72 | 
            +
                        
         | 
| 73 | 
            +
                        # Ensure depth_vis is valid and contiguous
         | 
| 74 | 
            +
                        if depth_vis is None or depth_vis.size == 0:
         | 
| 75 | 
            +
                            raise ValueError("depth_vis is empty or not properly computed.")
         | 
| 76 | 
            +
                        else:
         | 
| 77 | 
            +
                            depth_vis = np.ascontiguousarray(depth_vis)
         | 
| 78 | 
            +
                        
         | 
| 79 | 
             
                        # Apply Gaussian blur if requested.
         | 
| 80 | 
             
                        if blur > 0:
         | 
| 81 | 
             
                            kernel_size = int(blur * 20) * 2 + 1  # Ensures an odd kernel size.
         |