Standard Library function that implements a windowfunction for Fast Fourier Transform signal or image filtering.
row (optional) The number of rows in the result.
The window calculated by HANNING is basically the first half of a cosine in other words, only the positive cosine values. When used with only the col parameter, HANNING returns a vector of the same length as col. The vector starts and ends with zeros and rises to a peak in the center (just as a cosine goes up and then comes back down to zero).
For one dimension, the result of HANNING is determined by the following equation:
where n is the total number of elements described by row and col.
When used with both the col and row parameters, HANNING returns an array whose dimensions are the same as these two parameters. The resultant array has zeros around the sides and rises to a peak in the center.
For two dimensions, the result (i, j) = result(i) * result(j).
OPENR, unit, !Data_dir + 'mandril.img', /Get_lun
aa = ASSOC(unit, BYTARR(512, 512)) image = aa(0)
CLOSE, unit
han = HANNING(512, 512)
a = FFT(image, -1)
WINDOW, 0, XSize=512, YSize=512, $ Title='FFT without HANNING Window Applied' TVSCL, SHIFT(ALOG(ABS(a)), 256, 256)
b = FFT(image * han, -1)
WINDOW, 2, Xsize=512, Ysize=512, $ Title='FFT with HANNING Window Applied' TVSCL, SHIFT(ALOG(ABS(b)), 256, 256)