In the image smoothing operation that we introduced in the last section, we used a 3 x 3 filter where every value was 1/9. When we discussed the working of a filter, we explained that every element in a filter multiplies itself with the intensity value of a pixel in the neighborhood and the result is added up (this was one way to visualize the averaging operation). Now, we will present one more technique to visualize the same!
I am guessing that you are aware of the concept of weighted averages. For those who are not, we reiterate the same here. Given a sequence of n values and their corresponding weights , the weighted average of these n values is given by the following relation:
In the special case where all of the weights sum up to 1, our equation reduces to the following:
This form is starting to feel a little familiar now, isn't it? What if the weights correspond to the values in our filter and the sequence is our pixel intensity values? Well, in that case the...