610 likes | 628 Views
Chapter 4 Image Enhancement in the Frequency Domain. Chapter 4 Image Enhancement in the Frequency Domain. Chapter 4 Image Enhancement in the Frequency Domain. Chapter 4 Image Enhancement in the Frequency Domain. Chapter 4 Image Enhancement in the Frequency Domain. Chapter 4
E N D
Chapter 4 Image Enhancement in the Frequency Domain
Chapter 4 Image Enhancement in the Frequency Domain
Chapter 4 Image Enhancement in the Frequency Domain
Chapter 4 Image Enhancement in the Frequency Domain
Chapter 4 Image Enhancement in the Frequency Domain
Chapter 4 Image Enhancement in the Frequency Domain
Chapter 4 Image Enhancement in the Frequency Domain
Chapter 4 Image Enhancement in the Frequency Domain
Chapter 4 Image Enhancement in the Frequency Domain
Chapter 4 Image Enhancement in the Frequency Domain
Chapter 4 Image Enhancement in the Frequency Domain
Chapter 4 Image Enhancement in the Frequency Domain
Chapter 4 Image Enhancement in the Frequency Domain
Chapter 4 Image Enhancement in the Frequency Domain
Chapter 4 Image Enhancement in the Frequency Domain
Chapter 4 Image Enhancement in the Frequency Domain
Chapter 4 Image Enhancement in the Frequency Domain
Chapter 4 Image Enhancement in the Frequency Domain
DFT in Matlab Compute DFT: >> f = imread(’center_bump.tif’); >> F = fft2(f); >> S = abs(F); >>imshow(S,[])
Centering DFT • >> Fc=fftshift(F); • >> imshow(abs(Fc),[])
Sharpening by Log Transform >> S2=log(1+abs(Fc)); >> imshow(S2,[])
>> F=ifftshift(Fc); >> f=ifft2(F); >> f=real(ifft2(F)); From DFT back to signal
Basic Frequency Filtering >> f=imread(’square_original.tif’); >> [M,N]=size(f); >> F=fft2(f); >> sig=10; >> H=lpfilter(’gaussian’,M,N,sig); >> G=H.*F; >> g=real(ifft2(G)); >> imshow(g,[])
Chapter 4 Frequency Domain (the need for padding)
Chapter 4 Frequency Domain (the need for padding)
Chapter 4 Frequency Domain (why padding)
Chapter 4 Image Enhancement in the Frequency Domain
Chapter 4 Image Enhancement in the Frequency Domain
Chapter 4 Image Enhancement in the Frequency Domain
Chapter 4 Frequency Domain Processing
Chapter 4 Frequency Domain Processing
Chapter 4 Frequency Domain Processing
Chapter 4 Frequency Domain Processing
Assume images f(x,y) & h(x,y) of sizes A × B and C × D Form two padded functions of size P × Q by appending zeros to f and g. You can show that wraparound error is avoided by choosing P A + C − 1 and Y B + D − 1 For special case of f(x,y) & h(x,y) of the same size, M × N, we pad with P 2M − 1 and Q 2N − 1 Padding in Practice
Padding in Practice >> PQ=paddedsize(size(f)); %Compute the FFT with padding. >> Fp=fft2(f,PQ(1),PQ(2)); >> Hp=lpfilter(’gaussian’,PQ(1),PQ(2),2*sig); >> Gp=Hp.*Fp; >> gp=real(ifft2(Gp)); >> gpc=gp(1:size(f,1),1:size(f,2)); >> imshow(gp,[]) >> imshow(gpc,[])
Chapter 4 Image Enhancement in the Frequency Domain
Chapter 4 Image Enhancement in the Frequency Domain
Chapter 4 Image Enhancement in the Frequency Domain
Chapter 4 Image Enhancement in the Frequency Domain
Chapter 4 Image Enhancement in the Frequency Domain
Chapter 4 Image Enhancement in the Frequency Domain
Chapter 4 Image Enhancement in the Frequency Domain
Chapter 4 Image Enhancement in the Frequency Domain
Chapter 4 Image Enhancement in the Frequency Domain
Chapter 4 Image Enhancement in the Frequency Domain
Chapter 4 Image Enhancement in the Frequency Domain
Chapter 4 Image Enhancement in the Frequency Domain
Chapter 4 Image Enhancement in the Frequency Domain
Chapter 4 Image Enhancement in the Frequency Domain
Chapter 4 Image Enhancement in the Frequency Domain