1
! @(#)fftfilt.prg 19.1 (ES0-DMD) 02/25/03 13:20:09
2
! ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
4
! MIDAS procedure fftfilt.prg
5
! K. Banse 860915,900703, 901212
7
! use via @a fftfilt,a filter input fftr fftim imreal imimag
8
! @a fftfilt,b filter fftr fftim imreal imimag
10
! for mode = a, the FFT of the real input image 'input' is computed and
11
! stored into 'fftr' and 'fftim'
12
! for mode b, we already start with 'fftr' and 'fftim'
14
! both modes will then multiply the real and imaginary part of the
15
! Fourier transform with the given filter and yield the final
16
! result via an inverse FFT
18
! filter is defaulted to blpf.bdf,
19
! fftr to fftr.bdf, fftim to ffti.bdf, imreal to nfftr.bdf, imimag to nffti.bdf,
20
! no default exists for input
22
! ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
28
DEFINE/PARAM P1 blpf IMA
29
DEFINE/PARAM P2 ? IMA "Enter input frame:"
30
DEFINE/PARAM P3 fftr IMA
31
DEFINE/PARAM P4 ffti IMA
32
DEFINE/PARAM P5 nfftr IMA
33
DEFINE/PARAM P6 nffti IMA
35
FFT/FREQU 'P2' ? 'P3' 'P4'
36
COMP/PIX &a = 'P3'*'P1'
37
COMP/PIX &b = 'P4'*'P1'
39
FFT/FINV &a &b 'P5' 'P6'
43
DEFINE/PARAM P1 blpf IMA
44
DEFINE/PARAM P2 fftr IMA
45
DEFINE/PARAM P3 ffti IMA
46
DEFINE/PARAM P4 nfftr IMA
47
DEFINE/PARAM P5 nffti IMA
49
COMP/PIX &a = 'P2'*'P1'
50
COMP/PIX &b = 'P3'*'P1'
52
FFT/FINV &a &b 'P4' 'P5'