Professional Documents
Culture Documents
Module 3
Image Enhancement
S6 EC KTU
KTUStudents.in
prepared by
Anjana Devi
KTUStudents.in
4)Providing `better' input for other automated image
processing techniques
Done through
1) modification of intensity fns -spatial transforms
2) modification of image spectral content – freq
transforms
3) combination of 1) and 2).
KTUStudents.in
The term spatial domain refers to the
aggregate of pixels composing an
image
spatial domain transformations operate
directly on pixels
2)Freq domain
operate on Fourier/Wavelet transform of an
image For more study materials: WWW.KTUSTUDENTS.IN
Spatial domain methods
1) Point operation or point processing
2) Mask/Area Processing/Spatial
filtering/neighbourhood operation
KTUStudents.in
3) Geometric Transformations
4} Frame Processing Transformation
KTUStudents.in
T is the operator on f, defined over a
neighbourhood of (x,y)
In addition,T can operate on a set of input
images, such as performing the pixel-by-
pixel sum of K images for noise
reduction.
KTUStudents.in
– also referred to as filters, kernels, templates,
or windows
Allows more flexibility in defining the
transformation functions
Eg. image sharpening.
Function used- filter
the values of the filter/mask coefficients
determine the o/p
For more study materials: WWW.KTUSTUDENTS.IN
Spatial Transformation- Area/Mask
processing
The principal approach in defining a neighborhood about a
point (x, y) is to use a square or rectangular sub image
area centered at (x, y)
KTUStudents.in
KTUStudents.in
Square and rectangular arrays are by far the most
predominant neighborhood shapes
because of their ease of implementation
Other neighborhood shapes, such as
approximations to a circle, are sometimes used
KTUStudents.in
In this case, g depends only on the value of f at (x, y)
T becomes a gray-level (also called an intensity/gray
level mapping) transformation function of the form
g = T(f)
• T independent of position (x,y)
ie, spatial information is completely lost
Point processing used mainly for contrast
enhancement For more study materials: WWW.KTUSTUDENTS.IN
Spatial domain methods
KTUStudents.in
KTUStudents.in
KTUStudents.in
1)Linear gray level transformation
• maps each pixel gray level into another gray level
• i/p image- Linear Transformation -o/p
image
–g = T(f)
–Eg: Image negative and Identity Transformation
KTUStudents.in
KTUStudents.in
KTUStudents.in
KTUStudents.in
KTUStudents.in
a practical implementation of some important
transformations can be formulated only as piecewise
functions.
The principal disadvantage of piecewise functions
their specification requires considerably more user input
KTUStudents.in
of the gray levels in the image being processed
The transformation function stretches the levels
linearly from their original range to the full range
[0,L-1].
KTUStudents.in
produce various degrees of spread in the gray levels
of the output image, thus affecting its contrast
3) If r1= r2, s1= 0 and s2 = L-1, the transformation
becomes a thresholding function that creates a binary
image
In general, r1 ≤ r2 and s1 ≤ s2 is assumed so that
the function is single valued and monotonically
increasing.
This condition preserves the order of gray levels,
thus preventing the creation of intensity artifacts in
For more study materials: WWW.KTUSTUDENTS.IN
the processed image
Contrast
Stretching/compression
KTUStudents.in
a) Graylevel transformation functions for contrast
enhancement
m- mean gray level
b) Threshold function to produce binary image
KTUStudents.in
KTUStudents.in
KTUStudents.in
KTUStudents.in
Thus, the transformation function stretched the levels
linearly from their original range to the full range [0,L-1].
Finally, Fig. 1.3 (d) shows the result of using the
thresholding function defined previously, with r1 < m,
the mean gray level in the image.
The original image on which these results are based is a
scanning electron microscope image of pollen,magnified
approximately 700 times.
KTUStudents.in
In this technique, the values of r below m are compressed
by the transformation function into a narrow range of s,
toward black.
The opposite effect takes place for values of r above m.
In the limiting case shown in Fig. (b), T(r) produces a two-
level (binary) image.
A mapping of this form is called a thresholding function.
For more study materials: WWW.KTUSTUDENTS.IN
Piecewise Linear Transformations-
Thresholding
One of the simplest operations we can perform on an image
is thresholding.
KTUStudents.in
we make all pixels >= T into 1,
and all pixels < T into 0.
KTUStudents.in
KTUStudents.in
KTUStudents.in
KTUStudents.in
Two basic approaches for gray level slicing
One approach is to display a high value for all
gray levels in the range of interest and a low
value for all other gray levels.
This transformation produces a binary
image.
The second approach brightens the desired range of
gray levels but preserves the background and gray-level
tonalities in the image.
For more study materials: WWW.KTUSTUDENTS.IN
Gray level /Intensity Level Slicing
KTUStudents.in
(a) This transformation highlights range [A, B] of gray levels and reduce
all others to a constant level (b) This transformation highlights range [A,
B] but preserves allFor
other levels (c) An image (d) Result of using the
more study materials: WWW.KTUSTUDENTS.IN
transformation in (a).
Spatial domain methods- Point
Processing
KTUStudents.in
KTUStudents.in
for the most significant bit.
plane 0 contains all the lowest order bits in the bytes
comprising the pixels in the image and plane 7
contains all the high-order bits
KTUStudents.in
KTUStudents.in
KTUStudents.in
The eight bit planes of the above image The number at the
bottom, rightForofmore
eachstudy image identifies the bit plane.
materials: WWW.KTUSTUDENTS.IN
Basic Non Linear Transformations in
point processing
Log Transformations
Log and inverse log
Power Law Transformations
KTUStudents.in
– nth power and nth root
Histogram Equalization
KTUStudents.in
where c is a constant, and it is assumed that
r ≥ 0.
KTUStudents.in
KTUStudents.in
spectrum.
While processing numbers such as these presents
no problems for a computer
But image display systems generally will not be able
to reproduce faithfully such a wide range of intensity
values.
The net effect is that a significant degree of detail
will be lost in the display of a typical Fourier
spectrum For more study materials: WWW.KTUSTUDENTS.IN
Log Transform
KTUStudents.in
KTUStudents.in
Log Transformation
Compresses the large variations in pixel intensities of 0
to 10^6
Compresses dynamic range
KTUStudents.in
Sometimes Eq. is written as
to account for an offset (that is, a measurable output
when the input is zero).
Offsets are typically an issue of display calibration and
as a result they are normally ignored in Eq.
KTUStudents.in
KTUStudents.in
KTUStudents.in
curves generated with values of γ >1
have exactly the opposite effect as those generated with
values of γ <1.
map a wider range of dark input values into a narrow
range of output values
Unlike the log function, here a family of possible
transformation curves are obtained simply by varying γ.
Note that Eq. reduces to the identity transformation when c = γ =
1. For more study materials: WWW.KTUSTUDENTS.IN
Gamma correction/Why power laws are
popular?
A variety of devices used for image capture, printing, and display respond according
to a power law.
For example, cathode ray tube (CRT) devices have an intensity-to-voltage response
that is a power function
Exponents of power function for display vary from approximately 1.8 to 2.5
• For a computer CRT, γ is about 2.2.
KTUStudents.in
With reference to the curve for γ = 2.5 in Fig. we see that such display systems would
tend to produce images that are darker than intended
By convention, the exponent γ in the power-law equation is referred to as gamma.
Viewing images properly on monitors requires γ-correction
The process used to correct the power-law response phenomena of display devices is
called gamma correction.
Adjusting the value of γ suitably and transforming the image as per power
law transform before applying to the display devices
• Apply power law transformation with γ = 1/2.2 and apply the transformed pixel values
to the monitor.
For more study materials: WWW.KTUSTUDENTS.IN
Gamma Correction
KTUStudents.in
KTUStudents.in
KTUStudents.in
KTUStudents.in
KTUStudents.in
In Statistics
A plot of freq of occurrence of an image.
Histogram is a graphical representation showing a visual
impression of the distribution of data.
KTUStudents.in
An Image Histogram
A type of histogram that acts as a graphical representation of
the intensity/gray values/color distribution in a digital image.
It plots the number of pixels for each gray /color value
ie, relative freq of occurrence of each value
KTUStudents.in
KTUStudents.in
KTUStudents.in