This Matlab code takes a noisy image and a confidence map as input and outputs a denoised version of the image. The confidence map is used to locally adapt the strength of the filter.
The advantage over non-adaptive methods is that fine structures are better preserved as unnecessary blurring is avoided (see example above). This works very well for images from 3D TOF cameras with the squared signal amplitude as a confidence measure. The method is described in here. If you find a way to improve it, please let us know. The code is free for non-commercial use.
The code contains a demo call and processes an example image. See below how the output should look like: