Linear Filtering

download notebookDownload this example as a Mathematica notebook.


Many useful image processing operations may be implemented by filtering the image with a selected filter. Digital Image Processing defines a large number of smoothing, sharpening, noise reduction, and edge filters. Additional filters may be easily added or designed using the filter design functionality of the package.

[Graphics:Images/index_gr_1.gif]

BoxFilter, GaussianFilter, and SmoothingFilter are all variants of so-called smoothing filters. They produce a response that is a local (weighted) average of the samples of a signal.

The Savitzky-Golay smoothing filter is an optimal filter that returns the best average value, in the sense of least squares, for each neighborhood of image points. It is a good general-purpose smoothing filter. Here we show the coefficients of a Savitzky-Golay filter of order three and length five.

[Graphics:Images/index_gr_2.gif]
[Graphics:Images/index_gr_3.gif]

This loads an example image and computes a smoothed copy using the filter shown above.

[Graphics:Images/index_gr_4.gif]

Here we display the two images.

[Graphics:Images/index_gr_5.gif]

[Graphics:Images/index_gr_6.gif]