Apply NL Means filter to an image.


Implementation is an approximation of NL Means, which is faster.


Input image -in image Mandatory
Input image to denoise

Output Image -out image [dtype] Mandatory
Output image.

Patch radius (patch is a square) -patchradius int Default value: 2
Full patch will have a size of 2*patchradius +1.

Search window radius (search window is a square) -searchradius int Default value: 7
Search window is used to find similar patches. Its size will be 2*searchradius+1.

Standard deviation in image -sig float Default value: 0
Noise standard deviation estimated in image. This parameter is used to correct for the expected difference between two patches. This filter works fine without using this tuning.

Similarity threshold -thresh float Default value: 1
Factor influencing similarity score of two patches. The higher the threshold, the more permissive the filter. It is common to set this threshold slightly below the standard deviation (for Gaussian noise), at about 0.8*sigma.

Available RAM (MB) -ram int Default value: 256
Available memory for processing (in MB).


From the command-line:

otbcli_FastNLMeans -in GomaAvant.tif -out denoisedImage_NLMeans.tif

From Python:

import otbApplication

app = otbApplication.Registry.CreateApplication("FastNLMeans")

app.SetParameterString("in", "GomaAvant.tif")
app.SetParameterString("out", "denoisedImage_NLMeans.tif")



This filter relies on integral images. Overflow may happen though the risk is limited by OTB mechanism which process data by chunks.

See also