Image Processing Toolbox    

Creating the Desired Frequency Response Matrix

The filter design functions fsamp2, fwind2, and fwind2 all create filters based on a desired frequency response magnitude matrix. You can create an appropriate desired frequency response matrix using the freqspace function. freqspace returns correct, evenly spaced frequency values for any size response. If you create a desired frequency response matrix using frequency points other than those returned by freqspace, you may get unexpected results, such as nonlinear phase.

For example, to create a circular ideal lowpass frequency response with cutoff at 0.5 use

Figure 7-9: Ideal Circular Lowpass Frequency Response

Note that for this frequency response, the filters produced by fsamp2, fwind1, and fwind2 are real. This result is desirable for most image processing applications. To achieve this in general, the desired frequency response should be symmetric about the frequency origin (f1 = 0, f2 = 0).


  Windowing Method Computing the Frequency Response of a Filter