Image Filtering Techniques: Gaussian Blurring and Median filtering
Image filtering techniques are applied to remove image noises in images containing different kinds of noises. Image noise means distortions or variations in colour and brightness in an image. Some image noises are Gaussian noise, Salt-and-pepper noise, Periodic noise, etc.
Median Filtering and Gaussian blurring are described below.
Median Filtering: We represent or replace the each pixel by the median of the pixels contained in a window around the pixel.
i.e. v(m,n) = median{y(m-k,n-l),(k,l)E w}
where, v(m,n) is output image, w is window of pixels and odd i.e 3x3, 5x5, 7x7.
It is good for binary noise but poor for Gaussian noise.
Gaussian Blurring: It is used to maintain the distorted edges in the image.
Gaussian blur is based on the normal distribution of intensity of a pixel in the image 2D-plane. The 2D-gaussian function for calculation of weight of pixels in a window is given by,
G(x,y)=1/2π(σ^2) * (e^ -(x^2 +y ^2 ) ⁄ 2(σ^2))
Where, x and y as (x,y) represent the pixel vector in a window and σ is the standard deviation of the normal distribution which is determined by using value of radius r using the relation,
r = σ √(2*log(255)-1)