SlideShare a Scribd company logo
1
UNIT-II
55
IMAGE ENHANCEMENT
56
Spatial domain: Image Enhancement
Three basic type of functions are used for image enhancement. image
enhancement point processing techniques:
Linear ( Negative image and Identity transformations) Logarithmic transformation
(log and inverse log transformations) Power law transforms (nth power and nth
root transformations) Grey level slicing
Bit plane slicing
We are dealing now with image processing methods that are based only on the
intensity of single pixels.
Intensity transformations (Gray level transformations)
Linear function Negative and identity Transformations
Logarithm function
Log and inverse-log transformation Power-law
function
nth power and nth root transformations
Image Negatives
Here, we consider that the digital image that we are considering
that will have capital L number of intensity levels represented
from 0 to capital L minus 1 in steps of 1.
The negative of a digital image is obtained by the transformation
function
sT(r)L1r
57
Logarithmic Transformations
The general form of the log transformation is s
= c * log (1 + r)
C is a constant and r is assumed to be ≥ 0
The log transformation maps a narrow range of low input grey level
values I nto a wider range of output values. The inverse log
transformation
performs the opposite transformation s = log(1 + r)
We usually set c to 1. Grey levels must be in the range [0.0, 1.0]
Identity Function
Output intensities are identical to input intensities.
Is included in the graph only for completeness
Power Law Transformations Why power laws are popular?
58
Viewing images properly on monitors requires γ‐
correction
Power law transformations have the following form s =
c
* r γ c and γ are positive constants
s = r γ
We usually set c to 1. Grey levels must be in the range [0.0,
1.0]
improvements
s = c (r+ ϵ) γ , and this offset is to provide a
measurable
Gamma correction is used for
display Some times it is also
written as output even when
input values are zero
59
Effect of decreasing gamma
When the γ is reduced too much, the image begins to reduce contrast to the point where the image
started to have very slight “wash-out” look, especially in the background
a) image has a
washed-
out
appearance, it needs
a
61
of
gray
compressio
n levels
needs γ > 1
(b)result
after
transformati
on 3.0
(suitable)
power-
law with
γ =
(c)transformation with γ
= 4.0
(suitable)
(d)transformation with
γ
= 5.0
(high contrast, the
image has areas
that are too
dark,
some detail is lost)
62
63
Piecewise Linear Transformation Functions
Piecewise functions can be arbitrarily complex
•A disadvantage is that their specification requires significant user input
•Example functions :
–Contrast stretching
–Intensity-level slicing
–Bit-plane slicing
Contrast Stretching
Low contrast images occur often due to poor or non uniform lighting conditions, or due to
nonlinearity,
or small dynamic range of the imaging sensor.
Purpose of contrast stretching is to process such images so that the dynamic range of the
image will be very high, so that different details in the objects present in the image will be
clearly visible. Contrast stretching process expands dynamic range of intensity levels in an
image so that it spans the full intensity range of the recording medium or display devices.
Control points (r1,s1) and (r2,s2) control the shape of the transform T(r)
•if r1=s1 and r2=s2, the transformation is linear and produce no
changes in
intensity levels
•r1=r2, s1=0 and s2=L-1 yields a thresholding function that creates a
binary image
•Intermediate values of (r1,s1) and (r2,s2) produce various degrees of
spread in the intensity levels
In general, r1 r2
≤ and s1≤ s2 is assumed so that the junction is
single
valued and monotonically increasing.
If (r1,s1)=(rmin,0) and (r2,s2)=(rmax,L-1), where rmin and r max
are minimum and maximum levels in the image. The
transformation stretches the levels linearly from their original range to
the full range (0,L-1)
64
Two common approaches
– Set all pixel values within a range of
interest to one value (white) and all
others to another value (black)
•Produces a binary image
That means, Display high value for
range of interest, else low value
(„discard background )
‟
– Brighten (or darken) pixel values in a
range of interest and leave all others
Unchanged. That means , Display high
value for range of interest, else original
value („preserve background )
‟
65
Bit Plane Slicing
Only by isolating particular bits of the pixel values in a image we can highlight interesting aspects
of that image.
High order bits contain most of the significant visual information Lower bits contain subtle details
Reconstruction is obtained
by:
N
66
I (i, j) 2
In(i,
j)
n1
n0t1o127 can be
mapped
a0s, 128 to 256 can
be
mapped as 1
For an 8 bit image,
the above forms a binary
image. This occupies
less storage space.
Image Dynamic Range, Brightness and Control
The dynamic range of an image is the exact subset of gray values ( 0,1,2, L-1) that are present
in the image. The image histogram gives a clear indication on its dynamic range.
When the dynamic range of the image is concentrated on the lower side of the gray scale, the
image will be dark image.
When the dynamic range of an image is biased towards the high side of the gray scale,
the
image will be bright or light image
An image with a low contrast has a dynamic range that will be narrow and
concentrated
to the
middle of the gray scale. The images will have dull or washed out look.
When the dynamic range of the
image is
contrast and the distribution of pixels will
be ne
significantly broad, the image will have a
high
ar un
ifor
m.
67
Histogram equalization Histogram
Linearisation requires construction
of a transformation function sk
68
69
HISTOGRAM EQUALISATION IS NOT ALWAYS DESIRED.
Some applications need a specified histogram to their
requirements This is called histogram specification or histogram
matching
. two-step process
- perform histogram equalization on the image
- perform a gray-level mapping using the inverse of the desired cumulative
histogram
70
Arithmetic operations
71
Addition:
Image averaging will reduce the noise. Images are to be registered before adding.
An important application of image averaging is in the field of astronomy, where
imaging with very low light levels is routine, causing sensor noise frequently to
render single images virtually useless for analysis
g(x, y) = f(x, y)
+
η (x, y)
As K increases, indicate that the variability (noise) of the pixel values at
each location (x, y) decreases
In practice, the images gi(x, y) must be registered (aligned) in order to avoid
the
introduction of blurring and other artifacts in the output image.
72
Subtraction
A frequent application of image subtraction is in the enhancement of differences
between images. Black (0 values) in difference image indicate the location
where
there is no difference between the images.
One of the most commercially successful and beneficial uses of image subtraction
is in the area of medical imaging called mask mode radiography
g(x, y) = f(x, y) - h (x, y)
mage of a digital angiography. Live image and mask image with fluid
injected.
Difference will be useful to identify the blocked fine blood vessels.
The difference of two 8 bit images can range from -255 to 255, and the sum of two
mages can range from 0 to 510.
Given and f(x,y) image, f m = f - min (f) which creates an image whose min value is
ero.
s = k [fm / max ( fm) ],
s is a scaled image whose values
of k are 0 to 255. For 8 bit
image
=255,
mask
imag
e
73
an image (taken
after injection of a
contrast medium
(iodine) into the
bloodstream) with
mask
AND operation is the set of
coordinates common to
A and B
74
The output pixels belong
to either A or B or Both
Exclusive or: The output pixels
belong to either A or B but not
to Both
The output pixels are set of
elements not in A.All elements in A
become zero and the others to 1All
75
g(x,
y)
f(x, y)
An image multiplication and Division
An image multiplication and Division method is used in shading
correction.
g(x, y) = f(x, y) x h (x, y)
is sensed
image
is perfect
image
h (x, y) is shading function.
If h(x,y) is known, the sensed image can be multiplied with inverse of h(x,y) to
get
f(x,y) that is dividing g(x,y) by h(x,y)
Another use of multiplication is Region Of Interest
(ROI).
Multiplication of a given
There can be
more
image by mask image that has 1s in the ROI and 0s
elsewhere.
than one ROI in the mask image.

More Related Content

PDF
DIP Lecture 7-9.pdf
PPT
Digital Image through Scanner, Digital Camera. Concept of Gray Levels.
PPT
image enhancement
PPT
Image Enhancement in the Spatial Domain1.ppt
PPT
Image enhancement in the spatial domain1
PPTX
Module 2.pptxwwwwwwwwwwwwwwwwwwwwwwwwwww
PPTX
IMAGE ENHANCEMENT IN THE SPATIAL DOMAIN.pptx
PPTX
Image Enhancement in Spatial Domain and Frequency Domain
DIP Lecture 7-9.pdf
Digital Image through Scanner, Digital Camera. Concept of Gray Levels.
image enhancement
Image Enhancement in the Spatial Domain1.ppt
Image enhancement in the spatial domain1
Module 2.pptxwwwwwwwwwwwwwwwwwwwwwwwwwww
IMAGE ENHANCEMENT IN THE SPATIAL DOMAIN.pptx
Image Enhancement in Spatial Domain and Frequency Domain

Similar to Image Processing - Unit II - Image Enhancement discussed (20)

PPT
Image enhancement
PPTX
Digital Image Processing Unit -2 Notes complete
PPT
Chap5 imange enhancemet
PPT
Digital Image Processing_ ch2 enhancement spatial-domain
PPTX
Unit 2. Image Enhancement in Spatial Domain.pptx
PDF
UNIT-2 image enhancement.pdf Image Processing Unit 2 AKTU
PPT
Image Enhancement in the Spatial Domain U2.ppt
PPTX
Chapter 3 Image Enhanvement_ComputerVision.pptx
PPTX
Digital Image Processing - Image Enhancement.pptx
PDF
Lec_2_Digital Image Fundamentals.pdf
PPTX
COM2304: Intensity Transformation and Spatial Filtering – I (Intensity Transf...
PPTX
Module 2
PPTX
Image Enhancement research document.pptx
PDF
Image enhancement
PPTX
Lect 03 - first portion
PPTX
UNIT-2-PPT1-Image Enhancement in Spatial Domain.pptx
PPTX
image enhancement-POINT AND HISTOGRAM PROCESSING.pptx
PPTX
Image enhancement
PPTX
Chapter 3 image enhancement (spatial domain)
Image enhancement
Digital Image Processing Unit -2 Notes complete
Chap5 imange enhancemet
Digital Image Processing_ ch2 enhancement spatial-domain
Unit 2. Image Enhancement in Spatial Domain.pptx
UNIT-2 image enhancement.pdf Image Processing Unit 2 AKTU
Image Enhancement in the Spatial Domain U2.ppt
Chapter 3 Image Enhanvement_ComputerVision.pptx
Digital Image Processing - Image Enhancement.pptx
Lec_2_Digital Image Fundamentals.pdf
COM2304: Intensity Transformation and Spatial Filtering – I (Intensity Transf...
Module 2
Image Enhancement research document.pptx
Image enhancement
Lect 03 - first portion
UNIT-2-PPT1-Image Enhancement in Spatial Domain.pptx
image enhancement-POINT AND HISTOGRAM PROCESSING.pptx
Image enhancement
Chapter 3 image enhancement (spatial domain)
Ad

Recently uploaded (20)

PDF
Operating System & Kernel Study Guide-1 - converted.pdf
PPT
Mechanical Engineering MATERIALS Selection
PPTX
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
PDF
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
PPTX
UNIT 4 Total Quality Management .pptx
PPT
CRASH COURSE IN ALTERNATIVE PLUMBING CLASS
PDF
Embodied AI: Ushering in the Next Era of Intelligent Systems
PPTX
Welding lecture in detail for understanding
PDF
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
PDF
PPT on Performance Review to get promotions
PDF
TFEC-4-2020-Design-Guide-for-Timber-Roof-Trusses.pdf
PPT
Project quality management in manufacturing
PDF
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
PPTX
Construction Project Organization Group 2.pptx
PPTX
OOP with Java - Java Introduction (Basics)
PPTX
additive manufacturing of ss316l using mig welding
PDF
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
PPTX
CYBER-CRIMES AND SECURITY A guide to understanding
PDF
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
PPTX
Internet of Things (IOT) - A guide to understanding
Operating System & Kernel Study Guide-1 - converted.pdf
Mechanical Engineering MATERIALS Selection
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
UNIT 4 Total Quality Management .pptx
CRASH COURSE IN ALTERNATIVE PLUMBING CLASS
Embodied AI: Ushering in the Next Era of Intelligent Systems
Welding lecture in detail for understanding
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
PPT on Performance Review to get promotions
TFEC-4-2020-Design-Guide-for-Timber-Roof-Trusses.pdf
Project quality management in manufacturing
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
Construction Project Organization Group 2.pptx
OOP with Java - Java Introduction (Basics)
additive manufacturing of ss316l using mig welding
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
CYBER-CRIMES AND SECURITY A guide to understanding
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
Internet of Things (IOT) - A guide to understanding
Ad

Image Processing - Unit II - Image Enhancement discussed

  • 2. 56 Spatial domain: Image Enhancement Three basic type of functions are used for image enhancement. image enhancement point processing techniques: Linear ( Negative image and Identity transformations) Logarithmic transformation (log and inverse log transformations) Power law transforms (nth power and nth root transformations) Grey level slicing Bit plane slicing We are dealing now with image processing methods that are based only on the intensity of single pixels. Intensity transformations (Gray level transformations) Linear function Negative and identity Transformations Logarithm function Log and inverse-log transformation Power-law function nth power and nth root transformations
  • 3. Image Negatives Here, we consider that the digital image that we are considering that will have capital L number of intensity levels represented from 0 to capital L minus 1 in steps of 1. The negative of a digital image is obtained by the transformation function sT(r)L1r 57
  • 4. Logarithmic Transformations The general form of the log transformation is s = c * log (1 + r) C is a constant and r is assumed to be ≥ 0 The log transformation maps a narrow range of low input grey level values I nto a wider range of output values. The inverse log transformation performs the opposite transformation s = log(1 + r) We usually set c to 1. Grey levels must be in the range [0.0, 1.0] Identity Function Output intensities are identical to input intensities. Is included in the graph only for completeness Power Law Transformations Why power laws are popular? 58 Viewing images properly on monitors requires γ‐ correction Power law transformations have the following form s = c * r γ c and γ are positive constants s = r γ We usually set c to 1. Grey levels must be in the range [0.0, 1.0] improvements s = c (r+ ϵ) γ , and this offset is to provide a measurable Gamma correction is used for display Some times it is also written as output even when input values are zero
  • 5. 59
  • 6. Effect of decreasing gamma When the γ is reduced too much, the image begins to reduce contrast to the point where the image started to have very slight “wash-out” look, especially in the background a) image has a washed- out appearance, it needs a 61 of gray compressio n levels needs γ > 1 (b)result after transformati on 3.0 (suitable) power- law with γ = (c)transformation with γ = 4.0 (suitable) (d)transformation with γ = 5.0 (high contrast, the image has areas that are too dark, some detail is lost)
  • 7. 62
  • 8. 63 Piecewise Linear Transformation Functions Piecewise functions can be arbitrarily complex •A disadvantage is that their specification requires significant user input •Example functions : –Contrast stretching –Intensity-level slicing –Bit-plane slicing Contrast Stretching Low contrast images occur often due to poor or non uniform lighting conditions, or due to nonlinearity, or small dynamic range of the imaging sensor. Purpose of contrast stretching is to process such images so that the dynamic range of the image will be very high, so that different details in the objects present in the image will be clearly visible. Contrast stretching process expands dynamic range of intensity levels in an image so that it spans the full intensity range of the recording medium or display devices.
  • 9. Control points (r1,s1) and (r2,s2) control the shape of the transform T(r) •if r1=s1 and r2=s2, the transformation is linear and produce no changes in intensity levels •r1=r2, s1=0 and s2=L-1 yields a thresholding function that creates a binary image •Intermediate values of (r1,s1) and (r2,s2) produce various degrees of spread in the intensity levels In general, r1 r2 ≤ and s1≤ s2 is assumed so that the junction is single valued and monotonically increasing. If (r1,s1)=(rmin,0) and (r2,s2)=(rmax,L-1), where rmin and r max are minimum and maximum levels in the image. The transformation stretches the levels linearly from their original range to the full range (0,L-1) 64
  • 10. Two common approaches – Set all pixel values within a range of interest to one value (white) and all others to another value (black) •Produces a binary image That means, Display high value for range of interest, else low value („discard background ) ‟ – Brighten (or darken) pixel values in a range of interest and leave all others Unchanged. That means , Display high value for range of interest, else original value („preserve background ) ‟ 65
  • 11. Bit Plane Slicing Only by isolating particular bits of the pixel values in a image we can highlight interesting aspects of that image. High order bits contain most of the significant visual information Lower bits contain subtle details Reconstruction is obtained by: N 66 I (i, j) 2 In(i, j) n1 n0t1o127 can be mapped a0s, 128 to 256 can be mapped as 1 For an 8 bit image, the above forms a binary image. This occupies less storage space.
  • 12. Image Dynamic Range, Brightness and Control The dynamic range of an image is the exact subset of gray values ( 0,1,2, L-1) that are present in the image. The image histogram gives a clear indication on its dynamic range. When the dynamic range of the image is concentrated on the lower side of the gray scale, the image will be dark image. When the dynamic range of an image is biased towards the high side of the gray scale, the image will be bright or light image An image with a low contrast has a dynamic range that will be narrow and concentrated to the middle of the gray scale. The images will have dull or washed out look. When the dynamic range of the image is contrast and the distribution of pixels will be ne significantly broad, the image will have a high ar un ifor m. 67
  • 13. Histogram equalization Histogram Linearisation requires construction of a transformation function sk 68
  • 14. 69
  • 15. HISTOGRAM EQUALISATION IS NOT ALWAYS DESIRED. Some applications need a specified histogram to their requirements This is called histogram specification or histogram matching . two-step process - perform histogram equalization on the image - perform a gray-level mapping using the inverse of the desired cumulative histogram 70
  • 17. Addition: Image averaging will reduce the noise. Images are to be registered before adding. An important application of image averaging is in the field of astronomy, where imaging with very low light levels is routine, causing sensor noise frequently to render single images virtually useless for analysis g(x, y) = f(x, y) + η (x, y) As K increases, indicate that the variability (noise) of the pixel values at each location (x, y) decreases In practice, the images gi(x, y) must be registered (aligned) in order to avoid the introduction of blurring and other artifacts in the output image. 72
  • 18. Subtraction A frequent application of image subtraction is in the enhancement of differences between images. Black (0 values) in difference image indicate the location where there is no difference between the images. One of the most commercially successful and beneficial uses of image subtraction is in the area of medical imaging called mask mode radiography g(x, y) = f(x, y) - h (x, y) mage of a digital angiography. Live image and mask image with fluid injected. Difference will be useful to identify the blocked fine blood vessels. The difference of two 8 bit images can range from -255 to 255, and the sum of two mages can range from 0 to 510. Given and f(x,y) image, f m = f - min (f) which creates an image whose min value is ero. s = k [fm / max ( fm) ], s is a scaled image whose values of k are 0 to 255. For 8 bit image =255, mask imag e 73 an image (taken after injection of a contrast medium (iodine) into the bloodstream) with mask
  • 19. AND operation is the set of coordinates common to A and B 74 The output pixels belong to either A or B or Both Exclusive or: The output pixels belong to either A or B but not to Both The output pixels are set of elements not in A.All elements in A become zero and the others to 1All
  • 20. 75 g(x, y) f(x, y) An image multiplication and Division An image multiplication and Division method is used in shading correction. g(x, y) = f(x, y) x h (x, y) is sensed image is perfect image h (x, y) is shading function. If h(x,y) is known, the sensed image can be multiplied with inverse of h(x,y) to get f(x,y) that is dividing g(x,y) by h(x,y) Another use of multiplication is Region Of Interest (ROI). Multiplication of a given There can be more image by mask image that has 1s in the ROI and 0s elsewhere. than one ROI in the mask image.