Professional Documents
Culture Documents
Domain
Lecture # 3
Topics for Today
• Image Enhancement
• Types of Image Enhancement
• Spatial Domain Operations
• Gray-Level Transformations (Identity , negative, log, power-law transform)
• Contrast Stretching
• Gray-Level slicing https://www.tutorialspoint.com/dip/gray_level_transfor
mations.htm
• Bit-Plane Slicing
• Image Histogram
What is purpose of image
enhancement
• Image enhancement is applied to process an image in a
way that it is more suitable than the original image for a
specific application.
g(x,y)= T[ f(x,y)]
1. Point Processing
2. Mask Processing
Point Processing/Single Point
Processing
S= c*log (1+r)
Where c= constant and r≥0
The dynamic range of an image can be compressed by replacing each pixel value with
its logarithm. This has the effect that low intensity pixel values are enhanced. Applying
a pixel logarithm operator to an image can be useful in applications where the
dynamic range may too large to be displayed on a screen (that cannot handle a wider
range)
Power Law Transformation
S=C*R^γ
For GAMMA <1 for lower intensity values, it expands the dynamic range of very small
intensity of the input image while the higher intensity is mapped to the lower range of
intensity values in the processed image and reverse is applicable for the values of GAMMA
>1
GAMMA Correction
• Gamma correction is used in display devices
such as monitors, printers and capturing
devices etc and it is represented as
S=C*R ^1/γ
Input image is converted into power law
transform before it is produced so if a reverse
operation (gamma correction) is applied on
the image before its projection and as a
result it will be displayed properly.
GAMMA Correction
• Cathode Ray Tube (CRT) have an intensity to voltage response
that is in power transformation the value of GAMMA is varied
from 1.8-2.5 and it results in a darker image as shown below
• s=r^2.5= (Please refer to previous Fig for GAMMA=2.5)
• If we apply a gamma correction here then we will get
s=r ^ 1/2.5= r^0.4 (please refer to Fig for GAMMA=0.4)
GAMMA correction
Summary of Power Law
Transformation
• Power law transformation is not only used in display
technology, it is also used for image enhancement.
The advantage is
• The transformation curve get various shapes
depending on values of gamma.
• Gamma<1 on the darker side lower range of intensity
values are mapped to the larger (brighter) range of
intensity values while brighter intensity values are
mapped to the lower range of intensity values and
reverse is true for gamma>1
Example of Power law transformation
(Decrease in value of gamma)
Example of Power law transformation
(Increase in value of gamma)
Contrast Stretching
• Contrast stretching (often called
normalization) is a simple image enhancement
technique that attempts to improve the
contrast in an image by `stretching' the range
of intensity values it contains to span a
desired range of values, e.g. the full range
of pixel values that the image type concerned
allows.
Contrast Stretching
• Why contrast stretching?
• Image created from camera can be very dark as
illumination of scene or object can be poor.
• The dynamic range of camera senor can be very small
even if scene is properly illuminated
• Aperture (that allows light to pass through lens to
image) of the camera was small at the time of taking
snap.
The points (r1,s1) and (r2,s2) are used to control the shape of this transformation
a) If r1=s1 and r2=s2 then it will be linear function indicating no change in gray values
with a slope value of 45 degree.
b) In this case for image enhancement using contrast stretching we need that following
r1≤r2 and s1 ≤s2
The condition preserve the order of gray scale values (a darker point in original image
will remain darker in the transformed image and vice versa) and it creates a difference
in intensities values.
Example of contrast stretching
Example of contrast stretching
Gray Level Slicing
no min or max value
• Highlight a specific range of gray scale levels
(instead of selecting the whole image) such as
enhancing flaws in X-Ray image or masses of
water in satellite imagery.
Example of Gray Level Slicing
Definition of Gray Level Slicing
Grey level slicing is the spatial domain
equivalent to band-pass filtering. A grey level
slicing function can either emphasize a group
of intensities and diminish all others or it can
emphasize a group of grey levels and leave the
rest alone.
what is difference between contrast stretching and gray
level slicing?
Digital negative is used to enhance white details in a dark background for medical
imaging applications. Thresholding and Contrast stretching techniques are applied
by stretching the grey levels of an image. Grey level slicing technique is applied to
some specified region in an image.
Bit-plane Slicing
• Instead of highlighting gray level images, highlighting
the contribution made to total image appearance by
specific bits might be desired.
• Suppose that each pixel in an image is represented
by 8 bits. Imagine the image is composed of 8, 1-bit
planes ranging from bit plane1-0 (LSB)to bit plane 7
(MSB).
• In terms of 8-bits, plane 0 contains all lowest order
bits in the bytes comprising the pixels in the image
and plane 7 contains all high order bits.
Bit-plane Slicing
Bit-plane Slicing
Bit-plane Slicing
Question
• How binary bits/ bit plane slicing are used to
enhance an image?
Example of Image divided into bit plane
Example of Image divided into bit
plane
General Concepts about Histogram
no of occurrence for a particular pixels
A histogram is a display of statistical
information that uses rectangles to show the
frequency of data items in successive
numerical intervals of equal size.
Image Histogram
• An image histogram is used to represent
the graphical representation of the intensities
in a digital image. It plots the number
of pixels for each value. By looking at the
histogram for a specific image a viewer will be
able to judge the entire tonal distribution at a
glance.
Comments about this image?
Comments about this image?
Comments about this image?
Comments about this image?
Examples of Image Histograms
Examples of Image Histograms