What is Image Blurring
What is convolution in 2D?
Image is denoted as matrix inside computer. An image contains a lot of features like edge, contrast etc. In image processing features have to be extracted from the image for further study of image.
Convolution is a fundamental operation on images in which a mathematical operation is applied to each pixel to get the desired result.
For this purpose, another matrix called as kernel is used which is smaller in size of image. This is also called filter. This filter is applied on each pixel of the image and new value obtained is the value of that pixel. The image obtained is called filtered image.
In kernel each cell contain some value, that kernel is kept above the pixel and corresponding values are multiplied and then summed up this value obtained is new the value of pixel.
What is Blurring
If a blurred image is observed carefully then a common thing to notice is that image is smooth meaning edges are not observed. A filter used for blurring is also called low pass filter, because it allows low frequency to enter and stop high frequency. Here frequency means the change of pixel value. Around edge pixel value changes rapidly as blur image is smooth so high frequency should be filtered out.
For blur purpose a filter with every call having value 1 is used because to blur image a pixel value should be close to neighbor value.
In filter it is divided by 9 for normalization otherwise value of a pixel will increase resulting in more contrast which is not the goal.
We can choose the size of the kernel depending on how much we want to smoothen the image. Choosing a bigger size will be averaging over a larger area. This tends to increase the smoothening effect.
Blurred with filter of 3 x 3
Blurred with filter of 5 x 5
Blurred with filter of 7 x 7
With large filter the images smoothed more.
Attention reader! Don’t stop learning now. Participate in the Scholorship Test for First-Step-to-DSA Course for Class 9 to 12 students.