Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống
1
/ 70 trang
THÔNG TIN TÀI LIỆU
Thông tin cơ bản
Định dạng
Số trang
70
Dung lượng
2,17 MB
Nội dung
Chapter4 FrequencyDomainProcessing Image Enhancement in the FrequencyDomain Jean Baptiste Joseph Fourier (1768-1830) had crazy idea (1807): Any periodic function can be rewritten as a weighted sum of sines and cosines of different frequencies. Don’t believe it? – Neither did Lagrange, Laplace, Poisson and other big wigs – Not translated into English until 1878! But it’s true! – called Fourier Series Introduction to the Fourier Transform Any function that periodically repeats itself can be expressed as the sum of sines and/or cosines of different frequencies, each multiplied by a different coefficient (Fourier series). Even functions that are not periodic (but whose area under the curve is finite) can be expressed as the integral of sines and/or cosines multiplied by a weighting function (Fourier transform). The advent of digital computation and the “discovery” of fast Fourier Transform (FFT) algorithm in the late 1950s revolutionized the field of signal processing, and allowed for the first time practical processing and meaningful interpretation of a host of signals of exceptional human and industrial importance. FrequencyDomainProcessing The frequencydomain refers to the plane of the two dimensional discrete Fourier transform of an image. The purpose of the Fourier transform is to represent a signal as a linear combination of sinusoidal signals of various frequencies. FrequencyDomainProcessing = + example : g(t) = sin(2pi f t) + (1/3)sin(2pi (3f) t) 1D Fourier transform and its inverse 1 2 / 0 ( ) ( ) for 0,1, 2, , 1 M j ux M x F u f x e u M π − − = = = − ∑ 1 2 / 0 1 ( ) ( ) for 0,1, 2, , 1 M j ux M u f x F u e x M M π − = = = − ∑ Fourier transform (DFT) Inverse Fourier transform (IDFT) 2D Fourier transform and its inverse 1 1 2 ( / / ) 0 0 ( , ) ( , ) for 0,1, 2, , 1, 0,1, 2, , 1 M N j ux M vy N x y F u v f x y e u M v N π − − − + = = = = − = − ∑ ∑ 1 1 2 ( / / ) 0 0 1 ( , ) ( , ) for 0,1, 2, , 1, 0,1, 2, , 1 M N j ux M vy N u v f x y F u v e MN x M y N π − − + = = = = − = − ∑∑ Fourier transform (DFT) Inverse Fourier transform (IDFT) Discrete Fourier Transform The Fourier transform of a discrete function f(x), x=0,1,2,…,M-1 is given by (Discrete Fourier transform, DFT) inverse DFT The multiplier 1/M in front of the Fourier transform sometimes is placed in front of the inverse instead Or, both equations are multiplied by 1, ,2,1,0 )( 1 )( 1 0 /2 −== ∑ − = − Muforexf M uF M x Muxj π 1, ,2,1,0 )()( 1 0 /2 −== ∑ − = MxforeuFxf M u Muxj π M/1 Discrete Fourier Transform Euler’s formula DFT is represented as Each term of the Fourier transform is composed of the sum of all values fo the function f(x). The values of f(x) are multiplied by sines and cosines of various frequencies The domain (values of u) of F(u) is appropriately called frequencydomain because u determines the frequency of the components of the transform θθ θ sincos je j += 1, ,2,1,0 ]/2sin/2)[cos( 1 )( 1 0 −= −= ∑ − = Mufor MuxjMuxxf M uF M x ππ Discrete Fourier Transform The Fourier transform may be viewed as a “mathematical prism” that separates a function into various components based on frequency content In the analysis of complex numbers, it is convinient to express F(u) in polar coordinates where )( |)(|)( uj euFuF φ = 1/2 2 2 1 2 2 2 ( ) ( ) ( ) ; ( ) ( ) tan : ( ) ( ) ( ) ( ) ( ) : F u R u I u magnitude, spectrum I u u phase angle, phase spectrum R u P u F u R u I u power spectrum ϕ − = + = = = + [...]... fft2',… 'FontSize', 14) subplot(2, 2, [3 4] ); imshow(F0);title('Centered spectrum: ifft2',… 'FontSize', 14) Filtering in the frequency domain f ( x, y ) ∗ h ( x, y ) ⇔ H (u, v ) F (u, v ) The convolution theorem: Linear spatial convolution is by convolving f(x,y) and h(x,y) The same result is obtained in the frequencydomain by multiplying F(u,v) and H(u,v) The basic idea in frequencydomain is to select... shown in × following figure In what follows, we generate the frequencydomain filter, H, corresponding to the Sobel spatial filter that enhance vertical edges We then compare the result of filtering f in the spatial domain with the Sobel mask process in the frequency domain Obtain FrequencyDomain Filters from Spatial Filters Obtain FrequencyDomain Filters from Spatial Filters clear all; clc f = imread('circuit.tif');... v(idy) = v(idy) - N; % Compute the meshgrid arrays [V, U] = meshgrid(v, u); clear all; clc [U, V] = dftuv(5, 5); D2=U.^2+V.^2 D2c=fftshift(D2) D2 = 0 1 44 1 1 2 5 5 2 4 5 8 8 5 4 5 8 8 5 1 2 5 5 2 D2c = 8 5 4 5 8 5 2 1 2 5 4 1 0 1 4 5 2 1 2 5 8 5 4 5 8 Basic Steps in DFT Filtering 1 Obtain the padding parameters using function paddedsize : PQ= paddedsize(size(f)); 2 Obtain the Fourier transform with... . Chapter4 Frequency Domain Processing Image Enhancement in the Frequency Domain Jean Baptiste Joseph Fourier (1768-1830) had crazy. interpretation of a host of signals of exceptional human and industrial importance. Frequency Domain Processing The frequency domain refers to the plane of the two dimensional discrete Fourier transform. by sines and cosines of various frequencies The domain (values of u) of F(u) is appropriately called frequency domain because u determines the frequency of the components of the transform θθ θ sincos