Computer and Information Engineering Department DIP Laboratory
Computer and Information Engineering Department DIP Laboratory
Computer and Information Engineering Department DIP Laboratory
DIP Laboratory
Objective :
To implement different types of gray level transformation functions
for grayscale image.
Introduction :
The term spatial domain refers to the image plane itself, and
methods in this category are based on direct manipulation of pixels in an
image. we focus attention on two important categories of spatial domain
processing :
g(x,y)=T[ f(x,y)]
Where
s =T (r)
The negative of an image with grey levels in the range [0, L-1] is obtained
by using the negative transformation function which is given by the
expression:
s=L-1-r
This type of processing is particularly suited for enhancing white or gray
details embedded in dark regions of an image, especially when the black
areas are dominant in size.
2. Log Transformations :
s=C log(1+r)
Where C is a constant
Gs=im2uint8(mat2gray(g));
Use mat2gray brings the values to the range [0,1] and im2uint8 brings
them to the range [0,255].
3. Power-law Transformations :
s= C rγ
A variety of devices used for image capture, printing and display respond
by convolution, the exponent in the power law equation is referred to as
gamma. The process used to correct this power law response phenomenon
is called gamma correction.
Function imadjust
abc
In fact, in the limiting case shown in Fig.2(b), the output is a binary image.
This limiting function is called a thresholding function, which is a simple
tool used for image segmentation.
ab
write a Matlab function called bitpl that extracts the bit plane
for a grayscale image.