ImageWindow
ImageWindow [/I][/O][/P=param ] method srcWave
ImageWindow multiplies srcWave by the specified window function. ImageWindow is useful in preparing an image for FFT analysis by reducing FFT artifacts produced at the image boundaries. By default, the operation saves the data in the wave M_WindowedImage in the current data folder.
ImageWindow is useful in preparing an image for FFT analysis by reducing FFT artifacts produced at the image boundaries.
Flags
| /DEST=destWave | ||
| Specifies the output wave created by the operation. It is an error to specify the same wave as both srcWave and destWave. | ||
| When used in a function, the operation creates a real wave reference for the destination wave. See Automatic Creation of Wave References for details. | ||
| /FREE | Creates destWave (specified by /DEST) as a free wave. | |
| /FREE is allowed only in functions and only if destWave is a simple name or wave reference structure field. | ||
| See Free Waves for more discussion. | ||
| The /FREE flag was added in Igor Pro 10.00. | ||
| /I | Creates only the output wave containing the windowing filter values that are used to multiply each pixel in srcWave . The source image is not filtered. | |
| /O | Overwrites the source image with the output image. If /O is not used, then the operation creates the M_WindowedImage wave containing the filtered source image. | |
| /P=param | Specifies the design parameter for the Kaiser window. | |
Parameters
method selects the type of windowing filter, which is one of the following:
| Hanning | ||
| Hamming | ||
| Bartlett | ||
| Blackman | ||
| Kaiser | ||
| where I0{...} is the zeroth-order Bessel function of the first kind and ωa is the design parameter specified by /P=param. | ||
| KaiserBessel20: | α =2.0 | |
| KaiserBessel25: | α =2.5 | |
| KaiserBessel30: | α =3.0 | |
In the above equations, L is the number of columns or rows and n is the pixel column or row number.
Details
The 1-dimensional window for each column is multiplied by the value of the corresponding row's window value. In other words, each point is multiplied by the both the row-oriented and column-oriented window value.
This means that all four edges of the image are decreased while the center remains at or near its original value. For example, applying the Bartlett window to an image whose values are all equal results in a trapezoidal pyramid of values:
![]() | ||
The default output wave is created with the same data type as the source image. Therefore, if the source image is of type unsigned byte (/b/u) the result of using /I will be identically zero (except possibly for the middle-most pixel). If you keep in mind that you need to convert the source image to a wave type of single or double precision in order to perform the FFT, it is best if you convert your source image (e.g., Redimension/S srcImage) before using the ImageWindow operation.
The windowed output is in the M_WindowedImage wave unless the source is overwritten using the /O flag.
The necessary normalization value (equals to the average squared window factor) is stored in V_value.
Examples
To see what one of the windowing filters looks like:
Make/N=(80,80) wShape // Make a matrix
ImageWindow/I/O Blackman wShape // Replace with windowing filter
Display;AppendImage wShape // Display windowing filter
Make/N=2 xTrace={0,79},yTrace={39,39} // Prepare for 1D section
AppendToGraph yTrace vs xTrace
ImageLineProfile srcWave=wShape, xWave=xTrace, yWave=yTrace
Display W_ImageLineProfile // Display 1D section of filter
See Also
WindowFunction operation for information about 1D applications.
Spectral Windowing. Image Processing contains links to and descriptions of other image operations.
See FFT operation for other 1D windowing functions for use with FFTs.
DSPPeriodogram uses the same window functions. See Correlation.
References
For further windowing information, see page 243 of William K. Pratt, Digital Image Processing, John Wiley, New York, 1991.
