[iadctmatrix] [Up] [iadftmatrix] Image Transformation

iadft
Discrete Fourier Transform.

Synopsis

F = iadft( f )

Implemented in Python.

Input

f Image. Gray-scale (uint8 or uint16) or binary image (logical).

Output

F Image. Gray-scale (uint8 or uint16) or binary image (logical).

Examples

>>> f = 255 * iacircle([256,256], 10, [129,129])

              
>>> iashow(f)
(256, 256) Min= 0 Max= 255 Mean=1.233 Std=17.69
>>> F = iadft(f)

              
>>> Fv = iadftview(F)

              
>>> iashow(Fv)
(256, 256) Min= 11 Max= 255 Mean=148.606 Std=27.35
f Fv

Equation

Source Code

def iadft(f):
    from Numeric import asarray, Float64, NewAxis, sqrt, matrixmultiply
    f = asarray(f).astype(Float64)
    if len(f.shape) == 1: f = f[:,NewAxis]
    (m, n) = f.shape
    if (n == 1):
        A = iadftmatrix(m)
        F = sqrt(m) * matrixmultiply(A, f)
    else:
        A = iadftmatrix(m)
        B = iadftmatrix(n)
        F = sqrt(m * n) * matrixmultiply(matrixmultiply(A, f), B)
    return F
    

See also

iaidft Inverse Discrete Fourier Transform.
iadftmatrix Kernel matrix for the DFT Transform.
iadftview Generate optical Fourier Spectrum for display from DFT data.
iaisdftsym Check for conjugate symmetry
[iadctmatrix] [Up] [iadftmatrix] http://www.python.org