Convolution


Convolution is a technique for filtering images.

Each pixel in the image is replaced by a function of the pixels in the vicinity (neighbors) of the pixel being considered.

A common convolution filter is simply a rectangular array of neighbors centered around the pixel.

A weight is given to each of the surrounding pixels. Specifying each pixel by it's row and column p(i,j) (e.g. top left pixel is p(1,1)) and the corresponding weight by w(i,j) then we have that the new value for the center pixel p(2,2) is

p(2,2) = w(1,1) p(1,1) + w(1,2) p(1,2) + w(1,3) p(1,3) +
w(2,1) p(2,1) + w(2,2) p(2,2) + w(2,3) p(2,3) +
w(3,1) p(3,1)+ w(3,2) p(3,2) + w(3,3) p(3,3)

We apply this function to every pixel in the image, making sure that the values on the RHS are always the old values and not the updated values.

What do you think the following weights will do?

Simple filters of this type can be used for a number of different functions, depending on the weighting facters:

Instead of using a 3x3 filter, one can use any rectangular size. What effect do you think this will have?


[top]

[Home]