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)=2πσ21e−2σ2(x−μ)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=M×N1m=1∑Mn=1∑N(xmn−μ)2
Psignal represents the power of the signal.
M×N is the total number of pixels in the image.
xmn refers to the value of each pixel.
μ 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=10⋅log10(PnoisePsignal)
If we rewrite the preceding formula in terms of the power of noise,
Pnoise=Psignal/10(SNRdB/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 U1 and U2 be independent random variables that are uniformly distributed in the interval (0, 1). Then, the two random variables Z0 and Z1 are given by:
Z0=−2logU1cos(2πU2)
and
Z1=−2logU1sin(2πU2)
Z0 and Z1 are independent random variables with a standard normal distribution.
4. Add the noise to image
The noisy image Inoise is obtained by adding Gaussian noise η to the original image Iorig: