next up previous contents
Next: Commands related to fuzzy-analysis Up: Image processing Previous: Finding blobs with certain

Fourier commands

    

Note that the commands fft2, visualfft and conv require matrixes to have the names real, imag, spec and angle. And all matrixes have to be stored under a single data frame (which is an argument to the commands below).

fft Perform a one-dimensional Fourier transformation for a matrix
-d <data> source data (contains "real" [and "imag"] matrix)
-dout <dataout> target data
[-spec] | [-angle] flags to add spectrum and angle matrixes to target
[-inv] inverse transform

This command performs a one-dimensional Fourier transformation.

fft2 Perform a two-dimensional Fourier transformation for a matrix
-in <matrix> matrix to transform
-out <matrixout> matrix to output
[-inv] inverse transform
[-nulls <0 | 1 | 2>] 0 = nulls for the left and top sides of the larger matrix
1 = nulls for all the sides
2 = nulls for the right and bottom of the matrix (default)
[-width <w>] width for a larger matrix (rounded to the next integer power of 2)
[-height <h>] height for a larger matrix (rounded to the next integer power of 2)
[-re, -im, -spec, -angle] defines for the output matrixes (-re and -im are the default)
[-all] create all output matrixes

This command performs a two-dimensional Fourier transformation for matrixes.

visualfft Visualize a frame containing real and imag matrixes
-in <frame> frame containing the real and imag matrixes
-out <image> resulting image
-width <w> resulting image width (must be <= frame matrixes)
-height <h> resulting image height ( - " - )
[-nulls <0 | 1 | 2>] zero padding used in the fft-transform (see fft2) for cutting away blank areas (default 2)
[-shift] use a shifting process for the frame
[-scale] fit values to be shown in 256 gray levels

This command visualizes a frame containing real and imag matrixes (usually after an fft-transform).

conv Perform a convolution between two frames
-in1 <frame1> the first frame for convolution
-in2 <frame2> the second frame for convolution
-out <oframe> resulting frame

This command makes a convolution between two frames (both including at least a real matrix).

Example (ex6.1):

...
# 2-dimensional fft-transform
NDA> fft2 -in mask -out maskfft -width 128 -height 128
NDA> fft2 -in matrix -out matrixfft 
# Convolution and visualization of the result
NDA> conv -in1 matrixfft -in2 mask -out convmatrix 
NDA> visualfft -in convmatrix -out convimage -width 128 -height 128 -scale
...


next up previous contents
Next: Commands related to fuzzy-analysis Up: Image processing Previous: Finding blobs with certain

Anssi Lensu
Thu May 17 15:00:44 EET DST 2001