Non-Local Means Denoising Visualization

An interactive tool to visualize the inner workings of the NL-means algorithm

Add Noise

0 100
Image View
Denoising Results
Intensity Profiles
Click on the image to select a pixel
Low
High

Green square: Reference patch | Blue square: Search region | Red heatmap: Patch weights

Visualization Options

Denoising Results

Original
Denoised

Quality Metrics

PSNR: N/A
SSIM: N/A
Processing Time: N/A

Pixel Intensity Profiles

Shows pixel intensities along horizontal and vertical lines through the selected pixel.

Patch Analysis

Reference Patch

Gaussian Kernel

Similarity Weights

Top 5 Most Similar Patches

Position Weight Distance

Algorithm Parameters

3 15
5 25
0.01 0.5
0.001 0.1

How Non-Local Means Works

Non-local means denoising is a powerful image denoising algorithm that leverages self-similarity within images. Here's what's happening in the visualization:

  1. Reference Patch: For each pixel (x,y) in the image, a patch centered at that pixel is extracted (green square).
  2. Search Region: The algorithm searches within a neighborhood around the pixel (blue square).
  3. Patch Comparison: Each patch in the search region is compared to the reference patch.
  4. Similarity Weights: Weights are assigned based on patch similarity, with more similar patches receiving higher weights.
  5. Weighted Average: The final denoised value for the pixel is a weighted average of all center pixels from the compared patches.

The sliders control: