Digital Image Processing - Image Enhancement
Digital Image Processing - Image Enhancement
Dr S Govindaraju
Associate Professor
Department of Computer Science
Sri Ramakrishna College of Arts & Science
Coimbatore - 641 006
Tamil Nadu, India
1
UNIT-3
IMAGE ENHANCEMENT
INTRODUCTION
Point Operation
Mask Operation
Global Operation
In global operation, all pixel values in the image are taken into
consideration. Usually, frequency domain operations are global
operations.
g[m.n] = f[m.n]+k
The original and the brightness-enhanced image.
The original image [mm] is shown Fig. 5.4 (a).
The enhanced image g[m, n] is shown in Fig. 5.4
(b).
Here, the value of k is chosen to be 50. Each
pixel in/[m. n] is increased by a factor of fifty.
The
corresponding MATLAB code is shown in Fig.
55
.
]
HISTOGRAM EQUALISATION:
Linear Transformation T
5.7.1 Thresholding
g(m, n)
g(m, n) = 0
for f(m, n)<1 otherwise
255
.
This program performs gray level slicing
without background
Clc;
clear all;
Close all;
X=imread('goldfish.tif');
X=imread(x,[256 256]);
Y=double (x);
(m,n)-size(y);
L=double (255);
a=double
(round
(L/1.25));
B=double
(round (2*L/2));
for 1=1;m
for j=l;n
Z(I,j)=0;
end
end
end
imshow(uint8(y));
Figure, imshow(uint8(z));
5.7.3 Logarithmic Transformation
by g(m,n)=clog(f(m, n)+1)
This program performs gray level slicing
without background
Clc;
clear all;
Close all;
X=imrea
d('goldfis
h.tif');
X=imread(x,[256 256]);
Y=double (x);
(m,n)-size(y);
L=double (255);
a=double (round (L/1.25));
B=double (round (2*L/2));
for 1=1;m
for j=l;n
Z(I,j)=0;
end
end
end
imshow(uint8(y));
Figure, imshow(uint8(z));
This type of mapping spreads out the lower gray
levels. For an 8-bit image, the lower gray level is
zero and the gher gray level is 255. It is desirable
to map 0 to 0 and 255 to 255. The function g(m, n)
= clogif(m, n) + 1) spreads out the lower gray
levels.
g(m,n)=[f(m,n)]
clc
clear all
close all
a=imread('myna.jpg');
a=rgb2gray (a):
gamma-1.1;
d-double(a) 、 "gamma;
inshow(a),title('original image')
2. Linear Filtering
11111
11111
11111
11111
11111
Barlett window=1/9* 1 1 1 1 1 1
1 1 1 *1/9* 1 1 1 =
1 1 1 1 1 1
1/8* 1 2 3 2 1
2 4 6 4 2
3 6 9 6 3
2 4 6 4 2
1 2 3 2 1
5.8.7 Gaussian Filter
𝑒
𝜎
h(m,n)= [1/√2𝜋 − 𝑚 2 /2𝜎 2 ]*
[1/√2𝑒 − 𝑛 2 /2𝜎 2 ]
121. 1
3 3
1/8*[ ]*1/8* [1 3 3 1 ] =1\64*[ ]* [ 1 3 3 ]
3 3
1
1 1
1 3 3 1
3 9 9 3
The 4*4 gaussian kernel is given by ]
3 9 9 3
1/64*[ 1 3 3 1