Chapter 11 Filter Design 11.1 Introduction 11.2 Lowpass Filters A filter that can reduce the amplitude of high-frequency components is named a lowpass filter. A lowpass filter can eliminate the effects of high-frequency noise.
Simple Lowpass Filters The box filter Filters that make convolution operation using a rectangular pulse with the signal; In the frequency domain, the effect of a box filter is multiplying the spectrum of signal with function . Also called a moving-average filter. The outputs signal may cause black-for-white reversals of the polarity.
Image reversals caused by the box filter
Simple Lowpass Filters The Triangular Filter The triangular pulse is used as the impulse response of the lowpass filter, also called weighted-average filter. In the frequency domain, the spectrum is multiplied with the function .
High Frequency Cutoff Filter Filtering by setting the high frequency portion of the amplitude spectrum of a signal (image) to zero. This is equivalent to convolve with . May cause ringing effects The Gaussian Lowpass Filter
Bandpass and Bandstop Filters The ideal bandpass filter The transfer function of the ideal bandpass filter is given by A ideal bandpass filter allows the frequency components between f1 and f2 unchanged and makes the frequency components outside zero.
Bandpass filters Ideal bandpass transfer function where and .
The ideal bandpass filter The impulse response is
The ideal bandstop filter A bandstop filter is a filter that passes energy at all frequencies except for a band between f1 and f2. Its transfer function is given by or where and .
The ideal bandstop filter The impulse response of the ideal bandstop filter is
The impulse response of the ideal bandstop filter
The general bandpass filter The transfer function of a general bandpass filters is given by convolving a nonnegative unimodal function with an even impulse pair at frequency : and the impulse response is thus
The general bandpass filter An example of the general bandpass filter is the Gaussian bandpass filter The impulse response is where
The general bandpass filter Gaussian bandpass filter
High frequency enhancement filters Also called highpass filters. With transfer function that is unity at zero frequency and increases with increasing frequency. When the transfer function fall back to zero at higher frequency, the filter is catually a type of bandpass filter with unit gain at zero frequency Laplacian filter Highpass filter with a transfer function that pass through the origin
The difference-of-Gaussians filter Transfer function
The difference-of-Gaussians filter The transfer function of difference-of-Gaussians filter
The difference-of-Gaussians filter The impulse response is where
The difference-of-Gaussians filter The impulse response function
The Gaussian highpass filter In the difference-of-Gaussian filter, if , the transfer function becomes flatter and the central pulse in the impulse response becomes narrower, and ultimately, becomes a impulse at zero.
The Gaussian highpass filter Transfer function Impulse response
11.5 Optimal linear filter design Random variables A random signal is a signal for which we have some general knowledge about it, but lack specific details. We may think of a random variable as an ensemble of infinitely many member functions. When we make our recording, one of those member functions emerge to contaminate our record, but we have no way of knowing which one.
Ergodic random variables A random variable is ergodic if and only if (1) the time averages of all member functions are equal, (2) the ensemble average is constant with time, and (3) the time average and the ensemble average are numerically equal. The time average of a random variable is the average by integrating a particular member function over all time. The ensemble average of a random variable is to average together the values of all member functions evaluated at some particular point in time
For a ergodic random variable, the expectation We say that a random variable is ergodic means that it is a unknown function that has a known autocorrelation function and power spectrum.
11.5.2 The Wiener Estimator (Filter) The Wiener filter is a classic linear noise reduction filter. Suppose we have an observed signal , composed of a desired signal contaminated by an additive noise function . The filter is designed to reduce the contaminative noise as much as possible
The Wiener Estimator Model for the Wiener estimator Assumption in design Wiener filters Both and are ergodic random variables and thus know their autocorrelation and power spectrum.
The Wiener Estimator Optimality Criterion Define the error signal at the output of the filter as The mean square error is given by
The Wiener Estimator Given the power spectra of and , we wish to determine the impulse response that minimizes the mean square error. The mean square error can be expressed as function of the impulse response , and known autocorrelation and cross-correlation functions of the two input signal components.
The Wiener Estimator The mean square error can be written as 11.5.2.3 Minimizing MSE Denote by the particular impulse response function that minimizes MSE. An arbitrary impulse response can be written as
The Wiener Estimator Minimizing MSE The MSE can be rewritten as Where MSE0 is the mean square error under optimal conditions and T5 is independent of and cannot be negative.
The Wiener Estimator It can prove that the necessary and sufficient condition to optimize the filter is T4=0, this means that This is the condition that the impulse response of a Wiener estimator must satisfy. For any linear system, the cross-correlation between input and output is given by
The Wiener Estimator Thus Taking the Fourier transform of both sides This means that the Wiener filter makes the input/output cross-correlation function equal to the signal/signal-plus-noise cross-correlation funtion. Taking the Fourier transform of both sides Which implies that
Wiener filter design Digitize a sample of the input signal and auto-correlate the input sample to produce an estimate of . Compute the Fourier transform of to produce . Obtain and digitize a sample of the signal in the absence of noise and cross-correlate the signal sample with the input sample to estimate . Compute the Fourier transform of to produce .
Wiener filter design Compute the transfer function of the optimal Wiener filter by . Compute the impulse response of the optimal filter by computing the inverse Fourier transform of .
Examples of the Wiener filter 11.5.3.1 Uncorrelated signal ad noise If the noise is uncorrelated with the signal, this means that It can be derived that If ignoring zero frequency,
Examples of the Wiener filter 11.5.3.2 Filter performance Combining the MSE expression and the Wiener filter design condition, we have With uncorrelated zero mean noise,
The Wiener filter transfer function Wiener filter in the uncorrelated case
Ps(s) Pn(s) H0(s) MSE(s)
The Wiener filter transfer function The signal and the noise are separable
Pn(s) Ps(s) H0(s) MSE(s)
The Wiener filter transfer function A bandlimited signal is imbedded in white noise
Ps(s) Pn(s) H0(s) MSE(s)
Wiener Deconvolution Suppose the desired signal s(t) is first degraded by a linear system, the output of the filter is then corrupted by an additive noise to form the observed signal The Wiener deconvolution filter is a concatenation of a deconvolution filter and a Wiener filter.
The transfer function G(s) of the optimal Wiener deconvolution filter can be derived as
An example of Wiener deconvolution filter Ps(s) F(s) Pn(s) s s G(s) s
11.5.5 The Matched detector The Wiener filter is designed to recover an unknown signal from noise, and the matched detector is designed to detect a known signal from noise. Model for the matched detector
The matched detector A equivalent model for the matched detector
The matched detector Optimality criterion Use the average signal-to-noise power ratio at the output evaluated at time zero as the optimality criterion The matched filter is designed to maximize this criterion. If is large, the amplitude of the output will be highly dependent on the presence or absence of .
The matched detector We can rewrite as where is the noise power spectrum.
The matched detector We wish to maximize by properly choosing . Applying the well-known Schwartz Inequality We have
The matched detector And thus The maximum of is On the other hand, when assume a particular transfer function
The matched detector The optimality criterion achieves its maximum
Examples of the matched detector White noise Noise with flat power spectrum is called white noise. If the noise is white, its power spectrum is , the transfer function of the matched detector can be chosen as
Examples of the matched detector The impulse response is The output of the matched detector is This means that the matched filter is merely a cross-correlator, cross-correlating the incoming signal plus noise with the known form of the desired signal.
Examples of the matched detector If the correlation between the signal and noise is small, then is small for all values of , and the noise component at the output is small. Furthermore, the autocorrelation function has a peak at . So, is large at , or wherever the signal occurs, as desired.
Examples of the matched detector The rectangular pulse detector The matched filter is designed to detect a rectangular pulse in white noise. Suppose that the input signal is , where . The output of the filter is where recall that
Examples of the matched detector The input and the output
Comparison of the Wiener estimator and the matched detector The transfer function of the Wiener estimator for uncorrelated signal and noise is And the mean square error is
Comparison The matched filter transfer function is And the signal-to-noise power ratio is is real and even (and hence contains no phase information), is Hermite and contain phase information. is bounded between 0 and 1, while has no bound.
Comparison Let us define the signal-to-noise power ratio as Then
Practical consideration Estimation is a more difficult task than detection because first estimation is to recover the signal at all points in time while detection only to determine when the signal occurs; second, we have more a priori information in a detection problem in that we know the form of the signal exactly, instead of having only its power spectrum. Thus detector may perform better under the same conditions.
11.6 Order-statistic filters Order-statistic filter is a class of nonlinear filters that are based on statistics derived from ordering (ranking) the elements of a set rather than computer means. The Median Filter The pixels in the neighborhood of a particular pixel are ranked in the order of their gray level values, and the midvalue of the group is chosen as the gray level value of the output pixel.
Order-statistic filter The median filter has an ability to reduce random noise without blurring edges as much as a comparable linear lowpass filter The noise-reducing ability of a median filter depends on two factors: 1. The size of neighborhood (mask); 2. The number of pixels involved in the median computation.
The median filter Sparsely populated mask may be used in median computation. Other order-statistic filters
A comparison of the median filter and the mean filter
11.7 Summary of important points A high-frequency enhancement filter impulse response can be designed as a narrow positive pulse minus a broad negative pulse. The transfer function of a high frequency enhancement filter approaches a maximum value that is equal to the area under the narrow positive pulse. The transfer function of a high frequency enhancement filter has a zero frequency response equal to the difference of the area under the two component pulses.
11.7 Summary and important points The zero frequency response of a filter determines how the contrast of large feature is affected. Filters designed for ease of computation rather than for optimal performance are likely to introduce artifacts into image. An ergodic random process is a signal whose known power spectrum and autocorrelation function represent all the available knowledge about the signal. The Wiener estimator is optimal, in the mean square error sense, for recovering a signal of known power spectrum from additive noise of known power spectrum.
11.7 Summary of important points The Wiener filter transfer function takes on values near unity in frequency bands of high signal-to-noise ratio and near zero in bands dominated by noise. The matched detector is optimal for detecting the occurrence of a known signal in a background of additive noise. In the case of white noise, the matched filter correlates the input with the known form of the signal.
11.7 Summary of important points The wiener transfer function is real, even, and bounded by zero and unity. The matched filter transfer function is, in general, complex, Hermite, and unbounded. Order-statistic filters are nonlinear and work by ranking the pixels in a neighborhood. A median filter essentially eliminates objects less than half its size, while preserving larger objects. It is useful for noise reduction where edges must be preserved. A sparsely populated mask can reduce computation time on spatial large median filters.