4 14755 CS213 20172018 1 2 1 Lecture 3

Download as pdf or txt
Download as pdf or txt
You are on page 1of 33

CS353 Digital Image Processing

Lecture 3
Image Enhancement

• Principle objective of Image enhancement is


to process an image so that result is more
suitable than original image for specific
application.
• Image enhancement is basically improving
the perception of information in images for
human viewers and providing `better' input
for other automated image processing
techniques.
Image Enhancement

• These enhancement operations are


performed in order to modify:
– The image brightness
– The image contrast
– The distribution of the grey levels.
• As a consequence the pixel value
(intensities) of the output image will be
modified according to the transformation
function applied on the input values.
Image Enhancement
• The image brightness
– refers to the absolute value of colors (intensities) lightness/darkness.
Increasing brightness of an image will light out all colors so the
original light ones will become up to white. And, vice versa

• The image contrast


– is the distinction between lighter and darker areas of an image, and it
rerefers to making more obvious the objects or details within an
image. Increasing contrast on an image will increase the difference
between light and dark areas so light areas will become lighter and
dark areas will become darker. And, vice versa.

• The distribution of the grey levels.


– Histrogram of pixel values
Examples
Increase

brightness

Decrease

contrast
Image Enhancement
2 domains
• Spatial Domain : (image plane)
– Techniques are based on direct manipulation of pixels in an image
• Frequency Domain :
– Techniques are based on modifying the Fourier transform of an
image. The Inverse Fourier transform is performed to get the
resultant image.
Spatial Domain
Mask/Filter
Point Processing
How is Histogram
Equalization/Matching
different ?
Examples of gray-level
transformation
functions
Stretching/Transformation
functions
• Linear Transformation
• Non-Linear Transformation
• Piecewise Linear Transformation
Linear Stretching

Input Output
image image
Consequences of The Choice of
‘A’ and ‘B’

• If a = 1 and b = 0 the image is simply copied


• If a>1 the contrast is increased and if a < 1 the
contrast is decreased.
• If a = 1 and b is non zero then the output image
has the gray levels moved up or down. Thus the
entire image becomes darker or lighter.
Image Negatives
• The pixel gray values are inverted to
compute the negative of an image.
• The negative N(r, c) of image I(r, c) can be
computed as
N(r, c) = 255 – I(r, c)
where,
0 <= r <= R and 0 <= c <= C
R and C are the dimensions of the image
Image Negatives
Non-linear Stretching
Logarithmic Transformation
s = c log ( 1 + r )
s is the pixel value of the output image and r is the pixel value of
the input image.
Logarithmic Transformation
• We use the transformation of this type to
expand the value of dark pixels in an
image while compressing the higher level
values. The opposite is true for inverse
log transformation function.
Power Law
(Gamma Correction/Transformation)
s= c rγ
s is the pixel value of the output image and r is the pixel value of
the input image. (γ ≥ 0 and 0 ≤ r ≤ 1)

• On of the most useful non-


linear functions is the
‘gamma’ correction.
• If gamma () < 1, the
mapping is weighted
towards higher (brighter)
output values and if it is >
1, it is weighted towards
lower (darker) values.
• See the imadjust function
in the IPT.
Power Law
(Gamma Correction/Transformation)
Gamma Correction Example

Original image Gamma corrected image


Too Dark images
() < 1
Too bright images
() > 1
Contrast Stretching
Contrast Stretching of Bone
Scan Image
Intensities centered
around middle range
Thresholding
Piecewise Linear
Stretching
Gray-level Slicing

An image Result of using the transformation in (a)


Bit-plane Slicing
• Bit-plane slicing:
– It can highlight the contribution made to total image appearance
by specific bits.
– Each pixel in an image represented by 8 bits.
– Image is composed of eight 1-bit planes, ranging from bit-plane
0 for the least significant bit to bit plane 7 for the most significant
bit.
Bit-plane Slicing: A Fractal
Image
Bit-plane Slicing: A Fractal
Image

You might also like