# IMAGE PROCESSING IN FREQUENCY SPACE 19.4.2015Erkki Rämö1.

## Presentation on theme: "IMAGE PROCESSING IN FREQUENCY SPACE 19.4.2015Erkki Rämö1."— Presentation transcript:

IMAGE PROCESSING IN FREQUENCY SPACE 19.4.2015Erkki Rämö1

19.4.2015Lauri 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 19.4.20153

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 19.4.20154

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 19.4.20156

Visualization of frequency image 7 Original Magnitude component Logarithmic scaling

Directional dependency of frequency image 19.4.20158

Lauri Toivio 9

Directional dependency – application  Straightening of scanned text 19.4.201510 Threshold FFT

Some hardcore mathematics 19.4.201511

Fourier-transform Fourier –transform in one dimension: 19.4.201512 Fourier –counter transform:

Fourier-transform  If using angular frequen instead of oscillation frequency, the formulas are: 19.4.201513

Discrete Fourier trasform X(k) and its counter transform x(n): 19.4.201514

2D Fourier-transform 19.4.201515 = =

DFT - 2D 19.4.201516

Euler formula Lauri Toivio17  Example: for (i=0;i { "@context": "http://schema.org", "@type": "ImageObject", "contentUrl": "http://images.slideplayer.com/12/3744096/slides/slide_17.jpg", "name": "Euler formula Lauri Toivio17  Example: for (i=0;i

Fast Fourier Transform - FFT  Speed up calculation by decreasing values to be calculated 19.4.201518 where

Single-frequency images frequency domain  In image, only one vertical frequency  Shows as a dot in frequency image 19.4.201519

19.4.2015Lauri Toivio 20

19.4.2015Lauri Toivio 21

Threshold 200 2 pixel wide vertical lines FFT

Frequency filtering  Chosen frequencies are masked off of frequency image 19.4.201523

FFT-filtering Low-pass filtering High-pass filtering

19.4.2015Lauri Toivio 25

19.4.201526

19.4.2015Lauri Toivio27

19.4.201528

19.4.201529

Image restoration by Photoshop 19.4.2015Lauri Toivio 30

Group discussion Discuss application areas for frequency based image processing 19.4.2015Lauri Toivio31

Fourier-transform in Matlab >> load trees >> I=ind2gray(X,map); >> FI=fft2(I); >> SFI=fftshift(FI); >> abs(SFI); >> max(max(abs(SFI))) ans = 3.7987e+004 >> m=3.7987e+004 >> imshow(abs(SFI)/m,64) 19.4.201532