Download presentation
Presentation is loading. Please wait.
Published byCameron Melton Modified over 9 years ago
1
image enhancement using MATLAB Digital Image Processing 2014 Fall NTU 1
2
Outline Spatial domain – gray-level transformation – histogram processing – linear filter – non-linear filter Frequency domain – Gaussian low-pass filter (smoothing filter) – Gaussian high-pass filter (sharpening filter) – high-frequency emphasis filtering 2
3
Outline Spatial domain – gray-level transformation gamma transformation image negatives contrast stretching log transformation – histogram processing – linear filter – non-linear filter Frequency domain 3
4
gray-level transformation gray-level transformation is a pixel by pixel operation to change the contrast of an overall image 4
5
gamma transformation g = imadjust(f, [low_in high_in], [low_out high_out], gamma); 5
6
gamma transformation g = imadjust(f, [0.5 0.75], [0 1]); 6
7
gamma transformation g = imadjust(f, [0.5 0.75], [0 1]); 7
8
gamma transformation g = imadjust(f, [], [], 2); 8
9
gamma transformation g = imadjust(f, [], [], 2); 9
10
image negatives g = imadjust(f, [0 1], [1 0]); g = imcomplement(f); 10
11
contrast stretching Low_High = stretchlim(f); g = imadjust(f, Low_High, []); 11
12
contrast stretching Low_High = stretchlim(f); g = imadjust(f, Low_High, [1 0]); 12
13
contrast stretching Low_High = stretchlim(f); g = imadjust(f, Low_High, [1 0]); 13
14
log transformation g = log(1 + double(f)); 14
15
Outline Spatial domain – gray-level transformation – histogram processing histogram equalization histogram matching contrast-limited adaptive histogram equalization – linear filter – non-linear filter Frequency domain 15
16
histogram equalization g = histeq(f, 256); 16
17
histogram equalization g = histeq(f, 256); 17
18
histogram matching p = twomodegauss(0.15, 0.05, 0.75, 0.05, 1, 0.07, 0.002); g = histeq(f, p); 18
19
histogram matching p = twomodegauss(0.15, 0.05, 0.75, 0.05, 1, 0.07, 0.002); g = histeq(f, p); 19
20
contrast-limited adaptive histogram equalization g = adapthisteq(f); 20
21
contrast-limited adaptive histogram equalization g = adapthisteq(f, 'NumTiles', [25 25]); 21
22
contrast-limited adaptive histogram equalization g = adapthisteq(f, 'NumTiles', [25 25], 'ClipLimit', 0.05); 22
23
Outline Spatial domain – gray-level transformation – histogram processing – linear filter mean filter Laplacian filter – non-linear filter Frequency domain 23
24
mean filter mean filter is windowed filter of linear class, that smoothes image 24
25
Laplacian filter f2 = tofloat(f); g2 = imfilter(f2, w, 'replicate'); 25
26
Laplacian filter Image enhanced using the Laplacian filter 26
27
Outline Spatial domain – gray-level transformation – histogram processing – linear filter – non-linear filter median filter Frequency domain 27
28
median filter salt and pepper noise : – fn = imnoise(f, 'salt & pepper', 0.2); 28
29
median filter gm = medfilt2(fn); 29
30
median filter gms = medfilt2(fn, 'symmetric'); 30
31
Outline Spatial domain – gray-level transformation – histogram processing – linear filtering – non-linear filtering Frequency domain – Gaussian low-pass filter (smoothing filter) – Gaussian high-pass filter (sharpening filter) – high-frequency emphasis filtering 31
32
Gaussian low-pass filter F = fft2(f); H = lpfilter('gaussian', M, N, sig); G = H.* F; g = ifft2(G); 32
33
Outline Spatial domain – gray-level transformation – histogram processing – linear filtering – non-linear filtering Frequency domain – Gaussian low-pass filter (smoothing filter) – Gaussian high-pass filter (sharpening filter) – high-frequency emphasis filtering 33
34
Gaussian high-pass filter H = hpfilter('gaussian', PQ(1), PQ(2), D0); g = dftfilt(f, H); 34
35
Outline Spatial domain – gray-level transformation – histogram processing – linear filtering – non-linear filtering Frequency domain – Gaussian low-pass filter (smoothing filter) – Gaussian high-pass filter (sharpening filter) – high-frequency emphasis filtering 35
36
high-frequency emphasis filtering HBW = hpfilter('btw', PQ(1), PQ(2), D0, 2); gbw = dftfilt(f, HBW, 'fltpoint'); gbw = gscale(gbw); 36
37
high-frequency emphasis filtering H = 0.5 + 2*HBW; ghf = dftfilt(f, H, 'fltpoint'); ghf = gscale(ghf); 37
38
high-frequency emphasis filtering ghe = histeq(ghf); figure, imshow(ghe); 38
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.