Noise
Noise
Noise
Noise is simply a function that is combined
with the original function to get a new.
Common Types of Noise
Salt and pepper noise: random occurrences of
black and white pixels
Common Types of Noise
Impulse noise: random occurrences of white
pixels
noise = randn(size(img)).*sigma;
Output = noise + img;
Fig: M. Hebert
Filtering
Gaussian noise
noise =randn(size(img)).*sigma;
output = img + noise;
Removing Noise
from: S. Marschner
1D Illustration- moving average with moving window
Replace each pixel with an average of all the values
in its neighborhood – ongoing proc…..
from: S. Marschner
1D Illustration
Replace each pixel with an average of all the values
in its neighborhood – ongoing proc…..
from: S. Marschner
1D Illustration
Replace each pixel with an average of all the values
in its neighborhood – ongoing proc…..
from: S. Marschner
Bunch of random nos. so called noise.
Bunch of random nos. so called noise.
The standard deviation is a measure of how spread out the distribution is.
sigma = 32 sigma = 64
This is because the values that
randn generated are really small
compared to the image.
Removing Noise
from: S. Marschner
1D Illustration- moving average with moving window
Replace each pixel with an average of all the values
in its neighborhood – ongoing proc…..
from: S. Marschner
1D Illustration
Replace each pixel with an average of all the values
in its neighborhood – ongoing proc…..
from: S. Marschner
1D Illustration
Replace each pixel with an average of all the values
in its neighborhood – ongoing proc…..
from: S. Marschner
Averaging ….why (Assumptions here)
• The "true" value of pixels are similar to the true value of
pixels nearby.
F(x,y) G(x,y)
image: S. Seitz
Moving Average In 2D
F(x, y) G(x,y)
Moving Average In 2D
F(x,y) G(x,y)
Moving Average In 2D
F(x, y) G(x,y)
Moving Average In 2D
F(x, y) G(x,y)
Moving Average In 2D
F(x, y) G(x,y)
Correlation filtering - uniform weights
Non-uniform weights
This is called cross-correlation, denoted G = H ⊗ F
The filter “kernel” or “mask” H[u, v] is the matrix of weights
in the linear combination.
Averaging filter
F(x,y) ⊗ H(u,v) = G(x,y)
1 1 1
1/9 1 1 1
1 1 1
“box filter”
G = H ⊗F
Smoothing by box averaging
original filtered
Averaging filter: Weaknesses
D. Forsyth
Gaussian filter
Nearest neighboring pixels have the most influence
Size of kernel or mask is not variance, larger with more smooth effect
𝜎 = 5 with 10 x 10 𝜎 = 5 with 30 x 30
kernel kernel
Now finalizing the two Gaussians