<< Chapter < Page | Chapter >> Page > |
The Finite Impulse Response (FIR) filters are all those filters characterised by an impulse response with a finite number ofsamples. They are realized by the operation of convolution . For each sample of the convolution product a weighted sum of afinite number of input samples is computed.
The simplest non trivial FIR filter is the filter that computesthe running average of two contiguous samples, and the corresponding convolution can be expressed as
If we put a sinusoidal signal into the filter, the output will still be a sinusoidal signal scaled in amplitude anddelayed in phase according to the frequency response , which is
The one just presented is a first-order (or lenght ) filter, because it uses only one sample of the past sequence of input. From [link] we see that the frequency response is of the low-pass kind, because the high frequencies are attenuated as compared to the lowfrequencies. Attenuating high frequencies means smoothing the rapid signal variations. If one wants a steeper frequencyresponse from an FIR filter, the order must be increased or, in other words, more samples of the input signal have to beprocessed by the convolution operator to give one sample of output.
A symmetric second-order FIR filter has an impulse response whose form is , and the frequency response turns out to be . Convolution can be expressed as
Given the simple low-pass filters that we have just seen, it issufficient to change sign to a coefficient to obtain a high-pass kind of response, i.e. to emphasize high frequencies as compared to low frequencies. For example,the [link] displays the magnitude of the frequency responses of high-pass FIR filters of the first andsecond order, whose impulse responses are, respectively and .
To emphasize high frequencies means to make rapid variations of signal more evident, being those variations timetransients in the case of sounds, or contours in the case of images.
In 2D, the impulse response of an FIR filter is a convolution mask with a finite number of elements, i.e. amatrix. In particular, the averaging filter can be represented, for example, by the convolution matrix .
The low-pass filters (and, in particular, the smoothing filters) perform some sort of smoothing of the input signal, in the sense that the resulting signalhas a smoother design, where abrupt discontinuities are less evident. This can serve the purpose of reducing theperceptual effect of noises added to audio signals or images. For example, the code reported below loads an image, it corrupts with white noise, and then itfilters half of it with an averaging filter, thus obtaining [link] .
Notification Switch
Would you like to follow the 'Media processing in processing' conversation and receive update notifications?