You are on page 1of 19

Computer Vision

Chapter 3
Image Enhancement in Spatial Domain
Speaker
Dr. Divya BS
Assistant Professor In CSE
Ramaiah University of Applied Sciences, Bengaluru
Email: divya.cs.et@msruas.ac.in Tel: +91-804-536-6666 Ext:2213
1
Faculty of Engineering & Technology © Ramaiah University of Applied Sciences
Todays Class

• Image Enhancement in the Spatial Domain


• Gray-level transformation function
• Contrast stretching
• Thresholding function
• Linear Transformations
• Log Transformations
• Power Law Transformations
2
Faculty of Engineering & Technology © Ramaiah University of Applied Sciences
Spatial domain
• Spatial domain methods are procedures that
operate directly on these pixels.
• Spatial domain processes will be denoted by the
expression

• where f(x, y) is the input image, g(x, y) is the


processed image, and T is an operator on f,
defined over some neighborhood of (x, y).
3
Faculty of Engineering & Technology © Ramaiah University of Applied Sciences
Gray-level transformation function
• A gray-level (also called an intensity or mapping)
transformation function of the form

where, for simplicity in notation, r and s are


variables denoting, respectively, the gray level of
f(x, y) and g(x, y) at any point (x, y).

4
Faculty of Engineering & Technology © Ramaiah University of Applied Sciences
Contrast stretching
• The effect of this transformation would be to produce an image of
higher contrast than the original by darkening the levels below m
and brightening the levels above m in the original image
• Techniques in this category often are referred to as point
processing.

5
Faculty of Engineering & Technology © Ramaiah University of Applied Sciences
Cont...

6
Faculty of Engineering & Technology © Ramaiah University of Applied Sciences
Thresholding function

7
Faculty of Engineering & Technology © Ramaiah University of Applied Sciences
Cont...

8
Faculty of Engineering & Technology © Ramaiah University of Applied Sciences
Some Basic Gray Level Transformations
• Image Negatives
The negative of an image with gray levels in the range [0, L-
1] is obtained by using the negative transformation shown
in Figure, which is given by the expression

9
Faculty of Engineering & Technology © Ramaiah University of Applied Sciences
Cont...

Three basic types of functions


used frequently for image
enhancement:
1) Linear (negative and
identity transformations),
2) Logarithmic (log and inverse-
log transformations)
3) Power-law (nth power and
nth root transformations).

10
Faculty of Engineering & Technology © Ramaiah University of Applied Sciences
Log Transformations
• The general form of the log transformation shown
in Figure is
s= c log2 (1+r)
• Where r and s are pixel values of the output and
the input image respectively.
• C is a constant.

11
Faculty of Engineering & Technology © Ramaiah University of Applied Sciences
Examle of Log transformation

12
Faculty of Engineering & Technology © Ramaiah University of Applied Sciences
Power Law Transformations
• Power-law transformations have the basic form

13
Faculty of Engineering & Technology © Ramaiah University of Applied Sciences
(a) Linear-wedge gray-scale image.
(b) Response of monitor to linear
wedge.
(c) Gamma corrected wedge.
(d) Output of monitor.

14
Faculty of Engineering & Technology © Ramaiah University of Applied Sciences
Cont...

(a) Magnetic resonance (MR) image of a fractured human spine. (b)–(d) Results of applying the
transformation in Eq. (3.2-3) with c=1 and gamma=0.6, 0.4, and 0.3, respectively. (Original
image
for this example courtesy of Dr.David R. Pickens,Department of Radiology
and Radiological Sciences, Vanderbilt University Medical Center.)
15
Faculty of Engineering & Technology © Ramaiah University of Applied Sciences
(a) Aerial image. (b)–(d) Results of applying the gamma transformation with c=1 and
gamma=3.0, 4.0, and 5.0, respectively. (Original image for this example courtesy of NASA.)
16
Faculty of Engineering & Technology © Ramaiah University of Applied Sciences
(a) Aerial image. (b)–(d) Results of applying the gamma transformation with c=1 and
gamma=3.0, 4.0, and 5.0, respectively. (Original image for this example courtesy of NASA.)

17
Faculty of Engineering & Technology © Ramaiah University of Applied Sciences
Learning out comes
• Image Enhancement in the Spatial Domain
• Gray-level transformation function
• Contrast stretching
• Thresholding function
• Linear Transformations
• Log Transformations
• Power Law Transformations

18
Faculty of Engineering & Technology © Ramaiah University of Applied Sciences
Thank you

19
Faculty of Engineering & Technology © Ramaiah University of Applied Sciences

You might also like