Mata kliah Digital Image Processing Image Enhancement in the Freqency Domain Perteman ke-5 Dr. Hary Bdiarto Pasca Sarjana STMIK Eresha
Freqency Domain Methods Spatial Domain Freqency Domain
Basics of Enhancement in the Freqency Domain
Example for Freqency Domain Method
Filter Fnction Original signal Low-pass filtered High-pass filtered Band-pass filtered Band-stop filtered
Introdction to the Forier Transform and the Freqency Domain The one-dimensional Forier transform and its inverse Forier transform continos case F Inverse Forier transform: f x f x e F e jx d The two-dimensional Forier transform and its inverse Forier transform continos case F, v f x, y e Inverse Forier transform: f x, y jx dx F, v e where j j xvy j xvy e j 1 dxdy ddv cos j sin
Introdction to the Forier Transform and the Freqency Domain The one-dimensional Forier transform and its inverse Forier transform discrete case DTC F 1 M M 1 x0 f x e jx/ M Inverse Forier transform: M f x 1 0 F e jx/ M for for 0,1,,..., M x 0,1,,..., M 1 1
Since Introdction to the Forier Transform and the Freqency Domain and the fact then discrete Forier transform can be redefined F e j cos j sin 1 M M 1 x0 f x[cos x / M for 0,1,,..., M Freqency time domain: the domain vales of over which the vales of F range; becase determines the freqency of the components of the transform. Freqency time component: each of the M terms of F. j sin x / M ] cos cos 1
Introdction to the Forier Transform and the Freqency Domain F can be expressed in polar coordinates: R: the real part of F I: the imaginary part of F Power spectrm: I R F P or phasespectrm phaseangle tan or spectrm magnitde where 1 1 R I I R F e F F j
The One-Dimensional Forier Transform Example
Program Matlab ntk Transformasi Forier Langkah ntk transformasi Forier 1 dan Dimensi : Transformasi Forier dimensi : F = fftf; Transformasi Forier dimensi : F = fftf, P, Q; P, Q adalah kran matriks, misalkan M x N kran dari gambar yg akan diinptkan maka f adalah psat dari kran matriks PxQ. Gambar signalnya dapat ditnjkan dengan : imshowf Fngsi absolt ntk fngsi f : absf Mengembalikan nilai bilangan kompleks ntk f Memindahkan signal forier ke tengah periode : fftshiftf Melihat nilai Real ata imaginary dengan fngsi : realf; imagf;
Contoh Transformasi Forier 1 Dimensi Gambarkan sinyal ntk transformasi Forier 1 dimensi spectrm dan phase angle response. M = 1000; f = zeros1, M; l = 0; fm/-l:m/+l = 1; F = fftf; Fc = fftshiftf; rfc = realfc; ifc = imagfc; Sbplot,1,1,plotabsFc; Sbplot,1,,plotataniFc./rFc;
Contoh Transformasi Forier Dimensi Program ntk Transformasi forier Dimensi f = ones10,0; F = fftf, 500,500; f1 = zeros500,500; f140:60,30:70 = 1; sbplot,,1;imshowf1,[]; S = absf; sbplot,,; imshows,[]; Fc = fftshiftf; S1 = absfc; sbplot,,3; imshows1,[]; S = log1+s1; sbplot,,4;imshows,[];
Transformasi Forier ntk citra : i = imread image-.jpg ; f=i:,:,1; sbplot1,,1, imshowf; f = doblef; F = fftf; Fc = fftshiftf; S = log1+absfc; Sbplot1,,,imshowS,[];
Sharpening Freqency Domain Filter Filter Penajaman pada domain Frekensi,, v H v H lp hp Ideal highpass filter Btterworth highpass filter Gassian highpass filter, if 1, if 0, 0 0 D v D D v D v H n v D D v H 0, / 1 1, 0 /, 1, D v D e v H
Highpass Filters Spatial Representations
Ideal Highpass Filters H, v 0 1 if if D, v D, v D D 0 0
Btterworth Highpass Filters H, v D D v 1 n 1 /, 0
Gassian Highpass Filters H, v 1 e D, v/ D 0
Ideal Lowpass Filters ILPFs The transfer fnction of an ideal lowpass filter 1 if D, v D0 H, v 0 if D, v D0 where D,v : the distance from point,v to the center of ther freqency rectangle 1 M / v / D, v N
Btterworth Lowpass Filters BLPFs With order n H, v D v D 1, / n 0 1
Btterworth Lowpass Filters BLPFs n= D 0 =5,15,30,80,and 30
Gassian Lowpass Filters FLPFs H, v e D, v/ D 0
Gassian Lowpass Filters FLPFs D 0 =5,15,30,80,and 30
Program Matlab Gassian Lowpass Filters i = imread'image-.jpg'; f=i:,:,1; [m,n] = sizef; % cek nilai kran gambar ifmodm, == 0; cm = floorm/ + 0.5; else; cm = floorm/ + 1; end; ifmodn, == 0; cn = floorn/ + 0.5; else; cn = floorn/ + 1; end F = fftshiftfftdoblef; dnol = 10; H= zerosm,n; for i = 1:n; G = H.*F; g = absifftg; sbplot1,,1, imshowf; sbplot1,,,imshowg,[]; for j = 1:n; dis = i - cm^ + j - cn^; Hi,j = exp-dis//dnol^; end; end; D0=10 D0=0 D0=45