applies a nonlocal means filter to image by comparing a range r neighborhood to its nearby neighborhoods.


assumes an additive noise power value ns for comparing neighborhoods.


compares neighborhoods in a range w window.

Details and Options


open allclose all

Basic Examples  (1)

Filter a noisy grayscale image:

Scope  (5)

Data  (2)

Filtering of a grayscale image:

Filter a noisy color image:

Parameters  (3)

Specify the range:

Use the default additive noise power setting:

Use a custom noise power setting:

The default range window is 5r:

Use different window sizes:

Options  (2)

Padding  (2)

By default, a "Fixed" padding is used:

Specify a custom padding:

Applications  (3)

Remove Gaussian color noise from an image:

Use a NonlocalMeansFilter to remove smaller stars from an astronomical image:

Unsharp masking using NonlocalMeansFilter:

Properties & Relations  (1)

NonlocalMeansFilter returns an image of the same type as image:

Introduced in 2012