1
$\begingroup$

I am going through an old exam paper and trying to understand this question where they ask us to tell them what effect the following image filter would have if its convolved with an image:

     0     0     0     0     1     0     0
     0     0     0     0     0     0     0
     0     0     0     0     0     0     0
     0     0     0     0     0     0     0
     0     0     0     0     0     0     1
     0     0     0     0     0     0     0
     1     0     0     0     0     0     0

Now by using Matlab I can easily tell that this blurs the image. But what I am wondering is how would one know by just looking at this filter that the image will get blurred when this filter is applied?

Here's the image I'm working with in its original form:

enter image description here

Here's the same image after being convolved with the kernel in Matlab:

enter image description here

I would appreciate an explanation here or if someone can point me in the right direction as to a reading online I'd appreciate that too.

$\endgroup$
5
$\begingroup$

Convolution with following kernel returns the signal unchanged.

 0     0     0     0     0     0     0
 0     0     0     0     0     0     0
 0     0     0     0     0     0     0
 0     0     0     1     0     0     0
 0     0     0     0     0     0     0
 0     0     0     0     0     0     0
 0     0     0     0     0     0     0

If the '1' is shifted to the right one position, the convolution output will be shifted to the right one position as well.

If the '1' is a '2' the convolution output will be double (scaled by 2).

If there is more than one non-zero number in the kernel, the convolution output will be the addition of each scaled and shifted copy.

For your kernel

 0     0     0     0     1     0     0
 0     0     0     0     0     0     0
 0     0     0     0     0     0     0
 0     0     0     0     0     0     0
 0     0     0     0     0     0     1
 0     0     0     0     0     0     0
 1     0     0     0     0     0     0

the output is the addition of three copies of the signal, shifted by (1,3), (3,-1) and (-3,-3) and scaled by 1. I wouldn't call it blurring though.

$\endgroup$
  • $\begingroup$ Thank you for this very simple and straightforward explanation. $\endgroup$ – nico_c May 4 '13 at 16:41
1
$\begingroup$

You need to understand how convolution work. You apply the filter by placing the filter on the image. You than calculate sum of all the P(x,y)*C(x,y)=v. Then you replace center pixel value (the pixel value which is under the center of the filter) with v. This is the new value of pixel You then slide the filter up, down , left right in every possible direction, and replace all pixels that coincides with center of filter by a newly computed v. Ultimately you get a filter image. The coefficients of the filter would define which type of filter is this: high, low or some thing else. To be a high pass filter it need to have all the coefficients equal such that total sum of the coefficient is 1. (this is not strictly needed though). This is because when you take equal coefficients you are essentially taking effects from all the neighboring pixels equally and replacing the pixel by this effect. Thus you have minimized the 'changes'. Which is low pass filtering.

In present case it is not clear how you know that it is blurring filter. In fact it can be seen that it is not a low pass or blurring filter. Why I said this? Because you look at the filter coefficients which are mostly zero. In a blurring filter (which is a low pass filter) the idea is to take neighboring effects 'equally' and replace the pixel in question with this neighboring effect. In your case actually you are taking effects from far apart pixels since you have coefficients 1 there only. So it cannot be said that it is blurring in true sense.

If you take a complete white image think how will it appear after filtering? For an 8 bit image it will be: every pixel will be replaced by (256 + 256 +256)= 256. So the image will remain as it is. Here we have ignored boundary conditions. In general we can say that each v value will be very much different from the actual neighboring pixel of the pixel in question.

I will add to this answer more later.

$\endgroup$
0
$\begingroup$

I would say it does sums three shifted copies of the original image. The shifts are given by positions of 1s in the kernel.

If the kernel is normalized (i.e. 1/3 instead of each 1), the result would be average of the three shifted image.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.