Normalize 16-bit PNG depth maps to 8-bit grayscale with an optional Turbo colormap visualization.
cargo install depth-map-processordepth-map-processor --input depth_16bit.png --output depth_gray.png --viz depth_turbo.pnguse std::path::Path;
fn main() -> Result<(), Box<dyn std::error::Error>> {
let stats = depth_map_processor::process_depth_map(
Path::new("depth_16bit.png"),
Path::new("depth_gray.png"),
Some(Path::new("depth_turbo.png")),
)?;
println!("{}x{}", stats.width, stats.height);
Ok(())
}- Grayscale normalization uses min/max from the 16-bit input.
- Visualization uses the Turbo colormap.