Applying noise using noise models to images

In digital image processing, degradation is typically modeled as an additive process:

g(x,y)=f(x,y)+η(x,y)

Where f(x,y) is the original clean image, η(x,y) is the noise component generated from a specific Probability Density Function (PDF), and g(x,y) is the resulting corrupted image.

Let's look at a simple 3×3 patch of an image. Assume this patch is a solid, flat mid-gray area where every pixel has an intensity value of 100 (on a standard 0–255 8-bit scale).

f(x,y)=[100100100100100100100100100]

Here is how two different noise models would numerically attack this matrix:

Example 1: Adding Impulse (Salt-and-Pepper) Noise

Salt-and-Pepper noise doesn't add a continuous value; it acts as a probability-based replacement.

1. Define the PDF Rules:

2. The Random Process:

The computer evaluates every single pixel and generates a random probability number between 0.00 and 1.00 for each one. Let's assume the computer rolls the following random numbers for our 9 pixels:

Random Rolls=[0.450.050.880.120.760.250.910.550.08]

3. Applying the Thresholds:

4. The Final Corrupted Matrix, g(x,y):

g(x,y)=[10025510001000100100255]

Notice how the noise completely obliterated the original data in the affected pixels, creating extreme black and white spikes.


Example 2: Adding Gaussian Noise

Gaussian noise is strictly additive. It generates random numerical offsets based on a bell curve. Most offsets will be small (near the mean), but a few will be large.

1. Define the PDF Rules:

2. The Random Process:

The computer samples 9 values from a Gaussian distribution with z¯=0 and σ=15. Here are the generated noise values, η(x,y):

η(x,y)=[+125+322+318+115+6]

3. The Additive Math (g=f+η):

We simply add the noise matrix to the original image matrix. (Note: If a value drops below 0 or exceeds 255, we clip it).

g(x,y)=[100100100100100100100100100]+[+125+322+318+115+6]

4. The Final Corrupted Matrix, g(x,y):

g(x,y)=[11295103781319210185106]

Notice how unlike Salt-and-Pepper, Gaussian noise affects absolutely every pixel, but the original 100 intensity is still "hidden" within the noisy values.