Image Filtering Notes
Image Filtering Notes
There are two main types of image filtering: spatial domain filtering and
frequency domain filtering. In spatial domain filtering, the filter operates
directly on the pixel values of the image. Common spatial filters include
convolution and correlation filters. Frequency domain filtering involves
transforming the image into its frequency components using techniques like
the Fourier Transform and applying filters in the frequency domain.
Image filtering: When we filter an image, we apply a mask over each position
in an image. For example: A smooth filter calculate the value in a pixel (x,y)
position as the average value of the n neighborhoods. With this type of filters,
we will need to calculate the average of positions (x-1,y-1)+(x,y-1)+(x+1,y-1)+
(x-1,y)+(x,y)+(x+1,y)+(x-1,y+1)+(x,y+1)+(x+1,y1+1) (or the weighted values if
the filter matrix have not the same values for each position).
You will have 2 matrices: Image and Filter. The first one will be a random
matrix or a preloaded image (in order to be more generic, we will uses in the
begining a random matrix). You does not known the original size (that means:
you will have to calculate the shape of image) If the image have more than
one layer, the filter must be applied to all the layers