 Image Processing - Noise and denoise

# Image Processing - Noise and denoise

Donny March 20, 2019
October 30, 2022
466
-

Tags in blue are handcrafted tags; Tags in green are generated using AutoTag.

## Types of Noise

Additive noise is independent from image signal. The image g with nosie can be considered as the sum of ideal image f and noise n.

$$g = f + n$$

### Multiplicative noise

Multifplicative noise is often dependent on image signal. The relation of image and noise is:

$$g = f + fn$$

### Gaussian noise

Gaussian noise, named after Carl Friedrich Gauss, is statistical noise having a probability density function (PDF) equal to that of the normal distribution, aka. the Gaussian distribution. i.e. the values that the noise can take on are Gaussian-distributed.

The PDF $$p$$ of a Gaussian random variable $$z$$ is given by:

$$p_G(z) = \frac{1}{ \sigma \sqrt{2\pi} } e^{ - \frac{ (z-\mu)^2 }{ 2 \sigma^2 } }$$

### Salt-and-pepper noise

Fat-tail distributed or "impulsive" noise is sometimes called salt-and-pepper nosie or spike noise. An image containing salt-and-pepper noise will have dark pixels in bright regions and bright pixels in dark regions.

The PDF of (Bipolar) Impulse noise is given by:

$$p(z) = \left\{ \begin{array}{ll} p_a \qquad & for \, z = a \\ p_b \qquad & for \, z = b \\ 0 \qquad & otherwise \\ \end{array} \right.$$

if b > a, gray-level b appears as a light dot in the image. Conversely, level a appears like a dark dot. If either $$p_a$$ or $$p_b$$ is zero, the impulse noise is called unipolar.

## Types of Filters

1. Spatial domain

2. Frequency domain (Transform domain)

3. Integrated Spatial and Frequency Domain

## Spatial domain filtering

### Low-pass filter

Typical low-pass filters can be:

$$\frac{1}{9} \begin{bmatrix} 1 & 1 & 1 \\ 1 & 1 & 1 \\ 1 & 1 & 1 \\ \end{bmatrix}$$

and:

$$\frac{1}{8} \begin{bmatrix} 0 & 1 & 0 \\ 1 & 4 & 1 \\ 0 & 1 & 0 \\ \end{bmatrix}$$

and a typical Gaussian filter:

$$\frac{1}{16} \begin{bmatrix} 1 & 2 & 1 \\ 2 & 4 & 2 \\ 1 & 2 & 1 \\ \end{bmatrix}$$

More generally, a 2 dimensional Gaussian filter in spatial domain is:

$$G(x,y) = \frac{1}{2 \pi \sigma^2} e^{- \frac{x^2+y^2}{2 \sigma^2}}$$

### High-pass filter

Basically, we can obtain a high-pass filtering kernel corresponding to each of the low-pass filter kernels by subtracting the low-pass kernel from the all-pass kernel.

A typical high-pass filter can be:

$$\frac{1}{9} \begin{bmatrix} -1 & -1 & -1 \\ -1 & 8 & -1 \\ -1 & -1 & -1 \\ \end{bmatrix}$$

and a typical Laplacian filter:

$$\begin{bmatrix} 0.17 & 0.67 & 0.17 \\ 0.67 & -3.33 & 0.67 \\ 0.17 & 0.67 & 0.17 \\ \end{bmatrix}$$

### Median filter

Replace a value with the median value of its surroundings.

$$\begin{bmatrix} 2 & 4 & 1 \\ 3 & 8 & 1 \\ 2 & 5 & 1 \end{bmatrix} \Rightarrow \begin{bmatrix} 2 & 4 & 1 \\ 3 & 2 & 1 \\ 2 & 5 & 1 \end{bmatrix}$$

## Frequency domain filtering

### Low-pass filter

The Gaussian filter in frequency domain:

The derivation: