top of page

Spatial filtering

filtsp.m

Spatial filtering now only contains three types of filter, boxcar low-pass, boxcar high-pass and gaussian low-pass by entering the according keys ('lowp','highp','gauss'). The function of the filtering is similar to image processing which boxcar and gaussian low-pass filters will smooth out the overall image, whereas boxcar high-pass would enhance the edges (Not obvious in the following example).

The window size should be an odd number (3,5,7,9) and the window size will adjust to deal with the edges of the image. No zero-padding was used.

  • Example

original.png
high.png
gauss.png
low.png

boxcar low-pass filtering

gaussian low-pass filtering

boxcar high-pass filtering

bottom of page