Image Enhancement

rrr


Original image


Hasil lowpass filtering dengan cutoff 0.1 dan n 1


Lowpass filter pada domain frekuensi dan spasial


Hasil highpass filtering dengan cutoff 0.1 dan n 1


Highpass filter pada domain frekuensi dan spasial

Hasil highboost filtering dengan cutoff 0.05, n 50, boost 0.5

Highboost filter pada domain frekuensi dan spasial

low order pada highboost filter dengan n 1 high order pada highboost filter dengan n 100
Perbandingan nilai boost pada highboost filtering
hasil filtering dengan boost 10 hasil filtering dengan boost 50

highboost filter dengan boost 10

highboost filter dengan boost 50

hasil filtering dengan boost 100

hasil filtering dengan boost 1000

highboost filter dengan boost 100

highboost filter dengan boost 1000

Listing program

input = imread(‘citra.jpg’);
gray = rgb2gray(input);
bw = im2bw(gray);

% lowpass filter di domain spasial, cutoff 0.1, n 1
Flowpass = fftshift(lowpassfilter(size(gray),0.05,1));

% highpass filter di domain spasial, cutoff 0.5, n 25
Fhighpass = fftshift(highpassfilter(size(gray),0.05,1));

% highboost filter di domain spasial, cutoff 0.05, n 50, boost 0.5
Fhighboost = fftshift(highboostfilter(size(gray),0.05,50,10));

fftImage = fft2(gray);

% lowpass filter di domain spasial, cutoff 0.1, n 70
Slowpass = fftshift(real(ifft2(Flowpass)));

% highpass filter di domain spasial, cutoff 0.5, n 25
Shighpass = fftshift(real(ifft2(Fhighpass)));

% highboost filter di domain spasial, cutoff 0.1, n 10, boost 3
Shighboost = fftshift(real(ifft2(Fhighboost)));

% filtering
lowresult = Flowpass .* fftImage; highresult = Fhighpass .* fftImage;
boostresult = Fhighboost .* fftImage;

% convert kembali ke grayscale
Lresult = ifft2(lowresult);
Hresult = ifft2(highresult);
Bresult = ifft2(boostresult);

subplot(3,3,1),surfl(Slowpass), shading interp ;
subplot(3,3,2),surfl(Flowpass), shading interp ;
subplot(3,3,3), imagesc(Lresult), colormap gray;
subplot(3,3,4),surfl(Shighpass), shading interp ;
subplot(3,3,5),surfl(Fhighpass), shading interp ;
subplot(3,3,6), imagesc(Hresult), colormap gray;
subplot(3,3,7),surfl(Shighboost), shading interp ;
subplot(3,3,8),surfl(Fhighboost), shading interp ;
subplot(3,3,9), imagesc(Bresult), colormap gray;

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s