Crate oidn

source · []
Expand description

Rust bindings to Intel’s Open Image Denoise.

Open Image Denoise documentation can be found here.


The crate provides a lightweight wrapper over the Open Image Denoise library, along with raw C bindings exposed under oidn::sys. Below is an example of using the the RayTracing filter to denoise an image.

// Load scene, render image, etc.

let input_img: Vec<f32> = // A float3 RGB image produced by your renderer.
let mut filter_output = vec![0.0f32; input_img.len()];

let device = oidn::Device::new();
    // Optionally add float3 normal and albedo buffers as well.
    .image_dimensions(input.width() as usize, input.height() as usize);
    .filter(&input_img[..], &mut filter_output[..])
    .expect("Filter config error!");

if let Err(e) = device.get_error() {
    println!("Error denosing image: {}", e.1);

// Save out or display filter_output image.



An Open Image Denoise device (e.g. a CPU).

A generic ray tracing denoising filter for denoising images produces with Monte Carlo ray tracing methods such as path tracing.