About Site Map Submit Contact Us Log in | Create an account
Create an account Log In
Average Rating
User Rating:
Visitors Rating:
My rating:

Write review
See full specifications

scripts default iconToolbox Non-Local Means (Scripts) Publisher's description

A toolbox for the non-local means algorithm.

A toolbox for the non-local means algorithm.
by Gabriel PeyrГ©, 2007.

The non-local means is an algorithm introduced by A. Buades, B. Coll, J.M Morel.
The main reference for the algorithm is

A. Buades, B. Coll, J.M Morel,
"A review of image denoising algorithms, with a new one" ,
Multiscale Modeling and Simulation (SIAM interdisciplinary journal), Vol 4 (2), pp: 490-530, 2005.

This toolbox implements the algorithm in a fairly general way in a C file that can be called from Matlab. It allows to perform the traditional NL-means for denoising (for both B&W and color images) but also to use an arbitrary set of patches to perform the denoising.


Un-zip the file in your directory and start matlab from the unzipped directory. First compile the main mex file using
> compile_mex;
If this is not working, you should select your compiler using
> mex -setup
Before writing your own code, be sure to add the following line
so that the additional helper functions (such as image loading and resizing) are available. This is done automatically at the beginning of the test files "test_xxx.m".


I recommend that you run the file "test_nlmeans" (the best would be to run each line one by one to see the effect) to perform a traditional denoising. Then you can start to play with the parameters.


You can denoise an image using the patch of another image. This is useful for funny renderings or for textures synthesis. My recommendation is then to use a small variance for the averaging, but to iterate the NL-means processing. This way, at each iteration, the algorithm will automatically initialize its search around the previous best match (and not from the original pixel). I recommend that you run test_nlmeans_duo.m to see this method.

You can perform very nice texture synthesis by denoising with NL-means a white noise. To that end, you can use the patch from another image. The file text_nl_synthesis.m does exactly that. For synthesis, you can even set the variance options.T to a very small number (like 1e-9) so that no averaging is performed and pixel recopy is simply performed. Once again this should be iterated so that the synthesis improves through iterations. This process is equivalent to traditional texture synthesis as explained in

Alexei A. Efros and Thomas K. Leung
"Texture Synthesis by Non-parametric Sampling"
IEEE International Conference on Computer Vision (ICCV'99),

You can also perform denoising (or synthesis) using patches from a synthetic dictionary. I have implemented a dictionary of binary step edges, and you can see the effect of tynehis in test_edge_synthesis.m.

Copyright (c) 2007 Gabriel PeyrГ©

System Requirements:

MATLAB 7 (R14)
Program Release Status: New Release
Program Install Support: Install and Uninstall

Toolbox Non-Local Means (Scripts) Tags:

Click on a tag to find related softwares

Is Toolbox Non-Local Means (Scripts) your software?

Manage your software

Most Popular

scripts default icon ASK, OOK, FSK, BPSK, QPSK, 8PSK modulation 1.1
ASK, OOK, FSK, BPSK, QPSK, 8PSK modulation contain several functions for digital modulation simulation
scripts default icon Simulink Communication Labs 1.1
Simulink Communication Labs allows you to learn communication systems in greater depth.
scripts default icon M-QAM modulation and demodulation 1.1
M-QAM modulation and demodulation is the QAM modulation and demodulation tech.
scripts default icon LZW Compression/Decompression 1.1
LZW Compression/Decompression - Updated LZW compressor and decompressor with reasonable performance
scripts default icon InSPIRE utility to plot a 2D displacement field (Scripts) 1.0
This program plots the deformation field (displace vectors) contained in vector.txt.