Noise

Noise is an unwanted component added to the true image signal during acquisition, storage or transmission, usually random. Structured corruptions introduced by processing, such as compression blocking or aliasing, are normally called artefacts instead.

Often modeled probabilistically, since noise is usually embedded within image detail

Static corruptions remain at the same pixel locations across repeated captures. A scratch on a lens or a defective sensor element can cause them. Random noise changes between captures.

Properties

  • Locality
    Noise affects isolated pixels, while image pixels are correlated locally, so noisy pixels stand out by examining local correlation.
  • Randomness
    Noise follows a probability distribution based on its source, allowing its level to be estimated.
  • Visibility
    Noise can be visible, especially in low-contrast images, but is often not perceptible.

Noise Distribution Models

A noise model gives the probability density p(z)p(z) of the noise value zz added to a pixel. The shape of p(z)p(z) depends on the noise source and decides which filter cancels it.

Gaussian Noise

Independent noise drawn from a normal distribution is added to every pixel.

p(z)=12π σexp⁡[−(z−μ)22σ2]p(z) = \frac{1}{\sqrt{2\pi}\,\sigma} \exp\left[-\frac{(z-\mu)^2}{2\sigma^2}\right]
Here:
zz
noise value added to a pixel
μ\mu

mean, taken as 00 so the noise neither brightens nor darkens on average

σ\sigma
standard deviation, sets the noise strength

p(z)p(z) only gives the probability of each noise value. The amount added to a pixel is an independent random draw following p(z)p(z), so the equation fixes the odds, not the outcome.

Unimodal and symmetric about μ\mu. About 68% of values fall within ±σ\pm\sigma, so most pixels get zero or small noise and large deviations are rare. Arises when many small independent disturbances add up, such as sensor thermal noise. Most common model.

Gaussian noise

Left: Original. Right: With added Gaussian noise. Every pixel is perturbed by a small zero-mean random amount. Generated from a photo by Hannes Röst, CC BY-SA 3.0.

Uniform Noise

Every noise value in a fixed range is equally likely.

p(z)={1b−aa≤z≤b0otherwisep(z) = \begin{cases} \dfrac{1}{b-a} & a \le z \le b \\[2mm] 0 & \text{otherwise} \end{cases}
Here:
aa
lower bound of the noise range
bb
upper bound of the noise range

Flat with no peak. Mean is a+b2\frac{a+b}{2}. Hard to estimate because no noise value is more frequent than another. Rarely matches a real source. Quantisation error is close to uniform.

Salt and Pepper Noise

Impulse noise replaces isolated pixel values with abrupt outliers. It affects a sparse set of pixels, unlike Gaussian noise, which perturbs every pixel by a small amount.

Salt and pepper noise is a form of impulse noise. A fraction of pixels are forced to the minimum or maximum intensity. The rest are left unchanged.

p(z)={Paz=zmin⁡Pbz=zmax⁡1−Pa−Pbpixel unchangedp(z) = \begin{cases} P_a & z = z_{\min} \\ P_b & z = z_{\max} \\ 1 - P_a - P_b & \text{pixel unchanged} \end{cases}
Here:
zmin⁡,zmax⁡z_{\min}, z_{\max}
darkest and brightest intensity values
PaP_a
probability a pixel is set to zmin⁡z_{\min}, seen as pepper
PbP_b
probability a pixel is set to zmax⁡z_{\max}, seen as salt

Bi-modal, with spikes only at the two intensity extremes. Corrupted pixels keep none of their original value, so they act as outliers. Caused by bit errors in transmission, dead sensor elements, or ADC faults.

Salt and pepper noise

Left: Original. Right: With salt and pepper noise on about 5% of pixels, each forced to pure black or pure white. Generated from a photo by Hannes Röst, CC BY-SA 3.0.

Noise Filtering

Noise filtering identifies and reverses the effect of noise on an image, using properties of noise rather than direct observation, since only pixel values after corruption are visible.

Frame Averaging

For a static scene captured over nn frames, averaging corresponding pixels across frames cancels the noise contribution while preserving the scene.

Output=1n∑i=1nFramei=F+1n∑i=1nNi\text{Output} = \frac{1}{n}\sum_{i=1}^{n} \text{Frame}_i = F + \frac{1}{n}\sum_{i=1}^{n} N_i
Here:
FF
static source scene frame
NiN_i
noise in frame ii

Frame averaging also requires frames to be spatially aligned and their noise to be independent. It suits a stationary camera observing an empty scene. It does not suit moving traffic or a reversing vehicle.

For independent zero-mean noise with variance σ2\sigma^2, the average of nn frames has variance σ2/n\sigma^2/n. Its noise standard deviation is σ/n\sigma/\sqrt{n}.

Mean Filter

Averages pixel values within a local neighbourhood. Since correlated image features vary slowly relative to sampling resolution, any local variation is assumed to be noise.

1m∑i=1mfi=P+1m∑i=1mNi\frac{1}{m}\sum_{i=1}^{m} f_i = P + \frac{1}{m}\sum_{i=1}^{m} N_i

As a convolution kernel:

19[111111111]\frac{1}{9}\begin{bmatrix} 1 & 1 & 1 \\ 1 & 1 & 1 \\ 1 & 1 & 1 \end{bmatrix}

Blurring

Local pixel variation is not always caused by noise. Averaging over genuine detail blurs it.

Weighted averages, with more weight on the pivot pixel, reduce blurring:

110[111121111]116[121242121]\frac{1}{10}\begin{bmatrix} 1 & 1 & 1 \\ 1 & 2 & 1 \\ 1 & 1 & 1 \end{bmatrix} \qquad \frac{1}{16}\begin{bmatrix} 1 & 2 & 1 \\ 2 & 4 & 2 \\ 1 & 2 & 1 \end{bmatrix}

Gaussian Filter

The Gaussian filter gives greater weight to pixels closer to the pivot. It reduces random noise while blurring edges less than the mean filter.

Conditional Averaging

Reduces blurring by only replacing pixels where the local variation is likely to be noise.

  • Threshold averaging
    Replace the pixel with the local mean ml(x,y)m_l(x,y) only if the difference from the pivot is smaller than a threshold TT.
g(x,y)={ml(x,y)if ∣f(x,y)−ml(x,y)∣<Tf(x,y)otherwiseg(x,y) = \begin{cases} m_l(x,y) & \text{if } |f(x,y) - m_l(x,y)| < T \\ f(x,y) & \text{otherwise} \end{cases}
  • kk-closest averaging
    Select k≤Mk \le M pixels with values closest to the pivot before averaging, avoiding outliers that represent real image features. Requires sorting pixel values.

Median Filter

Replaces the pivot pixel with the median value of its neighbourhood.

  • Preserves edges better than mean filtering
  • Well suited to salt and pepper noise, since outlier values get discarded rather than averaged in

Mixed Noise

An image with impulse noise and Gaussian noise needs both outlier removal and local averaging.

  • Apply a median filter first to remove the impulse outliers.
  • Apply a mean or Gaussian filter next to reduce the remaining random noise.

Applying the averaging filter first spreads an impulse into neighbouring pixels. The median filter then cannot remove the original outlier as cleanly.

Worked Example

Median Filtering

Apply a 3×33 \times 3 median filter to the following neighbourhood.

[1011101225511101211]\begin{bmatrix} 10 & 11 & 10 \\ 12 & 255 & 11 \\ 10 & 12 & 11 \end{bmatrix}
Solution Reveal Hide
{10,10,10,11,11,11,12,12,255}\{10, 10, 10, 11, 11, 11, 12, 12, 255\}

The middle value is 1111. The filtered pivot value is 1111.

Written by November 3, 2026 5 min read
Was this helpful?