This function can be used to design a lowpass, highpass, bandpass, or bandstop
two-dimensional filter which satisfies prescribed specifications.
_ Type can be "Lowpass", "Highpass", "Bandpass", or "Bandstop"
_ edges is a vector of normalized frequencies (rad/s) including passband and stopband edges.
(frequencies must be in an increasing order)
_ Ap: peak to peak passband ripple (db)
_ Aa: minimum stopband attenuation (db)
_ transformation_vector: this is a vector with 4 elements which maps 1D
space to 2D space . These coefficients can be found based on the method
presented in . Some examples are as follows:
2D Filter with circularly symmetric spectrum=[-0.5 0.5 0.5 0.5];
2D Filter with elliptic spectrum=[-2.4973 2.9006 0.3127 0.2840];
2D Filter with fan shape spectrum=[0 0.5 -0.5 0];
The amplitude response of 2D and 1D filters as well as contours of the
transformation function will be shown at the output.
[Filter_1D,Filter_2D] are 1D and 2D filters’ coefficients, respectively.
[Filter_1D,Filter_2D]=Filter_Design_2D_McClellan('lowpass',[0.1*pi,0.2*pi],0.5,30,[-0.5 0.5 0.5 0.5]);
Which designs a lowpass 2D FIR filter with circularly symmetric spectrum using Kaiser Method. Passband edge is 0.1*pi, and stopband edge is 0.2*pi,
Ap=0.5 (db) and Aa=30 (db).