PANDORE Version 6 | GREYC-IMAGE |
pbutterworthfilter designs either a lowpass, highpass, bandpass or bandreject Butterworth filter. If ndep<1 the filter im_out is a 2D float image with size nrow*ncol otherwise the filter im_out is a 3D float image with size ndep*nrow*ncol.
The Butterworth lowpass filter cuts off high-frequency components of the Fourier transform that are at a distance greater than a specified distance D0 (the cutoff value) from the origin of the centered transform.
The type of filter is given by both parameters highpass and cutin:
The transfer function for a 2D Butterworth lowpass filter of the given order n and with cutoff frequency at distance D0 from the origin is defined as:
Hlp(u,v) = 1 -------------------- 1 + [ D(u,v)/D0]2n
where D(u,v) is the distance of point (u,v) from the origin:
D(u,v)=sqrt((u-M/2)2 + (v-N/2)2)
where N is the number of rows and M is the number of columns.
The transfert function for a Butterworth highpass is defined as:
H(u,v) = 1- Hlp(u,v)
The transfer function for a band reject is defined as:
H(u,v) = 1 ------------------ 1+ [ D(u,v)W ]2n [----------] [D2(u,v)-D02]
where W is the bands width = cutoff-cutin and D0 is the radius=(cutin+cutoff)/2.
Returns SUCCESS or FAILURE in case of bad parameter values.
Performs Butterworth lowpass filtering:
psetcst 0 tangram.pan i1.pan pfft tangram.pan i1.pan i2.pan i3.pan pbutterworthfilter 256 256 0 0 0 50 2 i4.pan pmult i2.pan i4.pan i5.pan pmult i3.pan i4.pan i6.pan pifft i5.pan i6.pan out.pan i8.pan
Performs Butterworth highpass filtering:
psetcst 0 tangram.pan i1.pan pfft tangram.pan i1.pan i2.pan i3.pan pbutterworthfilter 256 256 0 1 0 50 2 i4.pan pmult i2.pan i4.pan i5.pan pmult i3.pan i4.pan i6.pan pifft i5.pan i6.pan out.pan i8.pan
Performs Butterworth bandreject filtering:
psetcst 0 tangram.pan i1.pan pfft tangram.pan i1.pan i2.pan i3.pan pbutterworthfilter 256 256 0 0 25 50 2 i4.pan pmult i2.pan i4.pan i5.pan pmult i3.pan i4.pan i6.pan pifft i5.pan i6.pan out.pan i8.pan
Performs Butterworth bandpass filtering:
psetcst 0 tangram.pan i1.pan pfft tangram.pan i1.pan i2.pan i3.pan pbutterworthfilter 256 256 0 1 25 50 2 i4.pan pmult i2.pan i4.pan i5.pan pmult i3.pan i4.pan i6.pan pifft i5.pan i6.pan out.pan i8.pan
Génère un filtre passe-bas, passe-haut, coupe-bande ou passe-bande de Butterworth.
Author: Régis Clouard