IMAGE PROCESSING IN FREQUENCY SPACE Erkki Rämö1
Lauri Toivio2
Images frequency domain 2D spatial domain image can be altered into frequency domain by applying Fourier transformation Frequency image has the same dimensions as the original, but the components are complex numbers Frequency image is a map of image frequencies in the spatial image
Images frequency domain Components of frequency image are complex numbers Consists of magnitude and phase components Frequency image is visualized by showing its magnitude components Calculated from spatial images first by rows then by columns
Example of frequency images 5 Low frequencies are near origin Frequency is symmetrical in relation to the coordinate axis
Numeral scope of frequency image Complex number consists of magnitude and phase components Magnitude components differencies of samples are so big that a logarithmic scaling is needed to visualize the frequency image
Visualization of frequency image 7 Original Magnitude component Logarithmic scaling
Directional dependency of frequency image
Lauri Toivio 9
Directional dependency – application Straightening of scanned text Threshold FFT
Some hardcore mathematics
Fourier-transform Fourier –transform in one dimension: Fourier –counter transform:
Fourier-transform If using angular frequen instead of oscillation frequency, the formulas are:
Discrete Fourier trasform X(k) and its counter transform x(n):
2D Fourier-transform = =
DFT - 2D
Euler formula Lauri Toivio17 Example: for (i=0;i<m;i++) { x2[i] = 0; y2[i] = 0; arg = - dir * 2.0 * * (double)i / (double)m; for (k=0;k<m;k++) { cosarg = cos(k * arg); sinarg = sin(k * arg); x2[i] += (x1[k] * cosarg - y1[k] * sinarg); y2[i] += (x1[k] * sinarg + y1[k] * cosarg); }
Fast Fourier Transform - FFT Speed up calculation by decreasing values to be calculated where
Single-frequency images frequency domain In image, only one vertical frequency Shows as a dot in frequency image
Lauri Toivio 20
Lauri Toivio 21
Threshold pixel wide vertical lines FFT
Frequency filtering Chosen frequencies are masked off of frequency image
FFT-filtering Low-pass filtering High-pass filtering
Lauri Toivio 25
Lauri Toivio27
Image restoration by Photoshop Lauri Toivio 30
Group discussion Discuss application areas for frequency based image processing Lauri Toivio31
Fourier-transform in Matlab >> load trees >> I=ind2gray(X,map); >> FI=fft2(I); >> SFI=fftshift(FI); >> abs(SFI); >> max(max(abs(SFI))) ans = e+004 >> m=3.7987e+004 >> imshow(abs(SFI)/m,64)
More information: