[Image Processing] Gaussian Noise

Dongwoo Lee·2023년 5월 17일
0

Image Processing

목록 보기
1/1

Gaussian noise

Gaussian noise is a type of statistical noise that has a probability density function (PDF) equal to the normal distribution, which is also known as the Gaussian distribution. In other words, the values that the noise can take on are Gaussian-distributed.

In statistics, a normal distribution or Gaussian distribution is a type of continuous probability distribution for a real-valued random variable. The general form of its probability density function is

f(xμ,σ2)=12πσ2e(xμ)22σ2f(x | \mu, \sigma^2) = \frac{1}{\sqrt{2\pi\sigma^2}} e^{ -\frac{(x-\mu)^2}{2\sigma^2} }

Method to generate a noisy image with Gaussian noise

1. calculate the power(variance) of original image

For image data, the power of a signal is typically calculated as the variance of the pixel values in the image.

Psignal=1M×Nm=1Mn=1N(xmnμ)2P_{signal} = \frac{1}{M \times N} \sum_{m=1}^{M}\sum_{n=1}^{N} (x_{mn} - \mu)^2
  • PsignalP_{signal} represents the power of the signal.
  • M×NM \times N is the total number of pixels in the image.
  • xmnx_{mn} refers to the value of each pixel.
  • μ\mu is the average of all pixel values.

2. SNR (Signal-to-Noise Ratio) from the power(variance) of noise

Signal-to-noise ratio (SNR) refers to the ratio between the strength of a signal and the strength of noise. This ratio is commonly expressed in decibels (dB).

SNRdB=10log10(PsignalPnoise)SNR_{dB} = 10 \cdot \log_{10} \left( \frac{P_{signal}}{P_{noise}} \right)

If we rewrite the preceding formula in terms of the power of noise,

Pnoise=Psignal/10(SNRdB/10)P_{noise} = P_{signal} / 10^{(SNR_{dB}/10)}

3. Generate random values from a Gaussian distribution

How to random sampling? : Box–Muller transform

The Box-Muller transform is a mathematical technique used to generate random numbers from a standard normal distribution. Let U1U_1 and U2U_2 be independent random variables that are uniformly distributed in the interval (0, 1). Then, the two random variables Z0Z_0 and Z1Z_1 are given by:

Z0=2logU1cos(2πU2)Z_0 = \sqrt{-2 \log U_1} \cos(2\pi U_2)

and

Z1=2logU1sin(2πU2)Z_1 = \sqrt{-2 \log U_1} \sin(2\pi U_2)

Z0Z_0 and Z1Z_1 are independent random variables with a standard normal distribution.


4. Add the noise to image

The noisy image InoiseI_{noise} is obtained by adding Gaussian noise η\eta to the original image IorigI_{orig}:

Inoise=Iorig+ηI_{noise} = I_{orig} + \eta

0개의 댓글