0% found this document useful (0 votes)
11 views

Chapter 3.2 - Image Enhancement Histogram

Uploaded by

melesew mossie
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views

Chapter 3.2 - Image Enhancement Histogram

Uploaded by

melesew mossie
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 67

1

of
32

Intensity Transformation and


Spatial Filtering
2
of Spatial Domain vs. Transform Domain
32

• Spatial domain
image plane itself, directly process the intensity values of
the image plane

• Transform domain
process the transform coefficients, not directly process
the intensity values of the image plane
3
of Spatial Domain Process
32

g ( x, y )  T [ f ( x, y )])
f ( x, y ) : input image
g ( x, y ) : output image
T : an operator on f defined over
a neighborhood of point ( x, y )
4
of Spatial Domain Process
32
5
of Spatial Domain Process
32

Intensity transformation function


s  T (r )
6
of
Some Basic Intensity Transformation
32 Functions
7
of Image Negatives
32

Image negatives
s  L 1  r
8
of Example: Image Negatives
32

Small
lesion
9
of Log Transformations
32

Log Transformations
s  c log(1  r )
10
of Example: Log Transformations
32
11
of Power-Law (Gamma) Transformations
32


s  cr
12
of Example: Gamma Transformations
32
13
of Example: Gamma Transformations
32

Cathode ray tube


(CRT) devices have an
intensity-to-voltage
response that is a
power function, with
exponents varying
from approximately
1.8 to 2.5

sr 1/2.5
14
of Example: Gamma Transformations
32
15
of Example: Gamma Transformations
32
16
of Piecewise-Linear Transformations
32

• Contrast Stretching
— Expands the range of intensity levels in an image so that it spans
the full intensity range of the recording medium or display device.

• Intensity-level Slicing
— Highlighting a specific range of intensities in an image often is of
interest.
17
of
32
18
of
Highlight the major
32
blood vessels and
study the shape of the
flow of the contrast
medium (to detect
blockages, etc.)

Measuring the actual


flow of the contrast
medium as a function of
time in a series of
images
19
of Bit-plane Slicing
32
20
of Bit-plane Slicing
32
21
of Bit-plane Slicing
32
22
of
32

Image Enhancement

(Histogram Processing)
23
of
32
Contents
We will look at image enhancement
techniques working in the spatial domain:
– What is image enhancement?
– Different kinds of image enhancement
– Histogram processing
– Point processing
– Neighbourhood operations
24
of
32
25 Poor image enhance image
of
32
26 Poor image enhance image
of
32
27
of Enhancement
32 techniques
Spatial
domain Enhance
Poor image image E(r , c)
I(r , c)
Frequency
domain

applications

Block diagram of image enhancement

Direct manipulation of image pixels


Manipulation of Fourier ,wavelet, DCT , haar
transforms of an image
28
of
32
29
of
32

(in spatial domain)

(in spatial & frequency


domain )
30
of
32
The histogram of an image is a plot of the gray-level values versus the
number of pixels at that value(shows us the distribution of grey levels in
the image). A histogram appear as a graph with ‘brightness‘ on the
horizontal axis from 0 to 255 (for an 8-bit intensity scale) and ‘number of
pixels’ on the vertical axis. To find the number of pixels having a
particular brightness within an image, we simply look up the brightness
on the horizontal axis .
31
of
32 For each colored image three histogram are computed, one
for each component (RGB, HSL).The histogram gives us a
convenient -easy -to -read representation of the
concentration of pixels versus brightness of an image, using
this graph we able to see immediately:
1. Whether an image is basically dark or light and high or
low contrast.
2. Give us our first clues about what contrast enhancement
would be appropriately applied to make the image more
subjectively pleasing to an observer, or easier to interpret
by succeeding image analysis operations.
32
of
32

So the shape of histogram provide us with information about


nature of the image or sub image if we considering an object
within the image. For example:
1. Very narrow histogram implies a low-contrast image.
2. Histogram skewed to word the high end implies a bright
image.
3. Histogram with two major peaks , called bimodal, implies
an object that is in contrast with the background.
23
22
21
20
19
18

Gray levels
17
16
15
14
13
12
11
10

9
8
7
6
5
4
3
2
1
33 Number of pixels

32
of
34
of
32
35
of
32
36
of
32

The histogram can be modified or scaled by three


methods:
37
of
32
Grey Levels
• So far when we have spoken about image grey
level values we have said they are in the range
[0, 255]
– Where 0 is black and 255 is white
• There is no reason why we have to use this
range
– The range [0,255] stems from display
technologies
• For many of the image processing operations in
this lecture grey levels are assumed to be given
in the range [0.0, 1.0]
38
of
32
What Is Image Enhancement?
Image enhancement is the process of making
images more useful.
The reasons for doing this include:
– Highlighting interesting detail in images
– Removing noise from images
– Making images more visually appealing
Images taken from Gonzalez & Woods, Digital Image Processing (2002)

of
32
39
Image Enhancement Examples
Images taken from Gonzalez & Woods, Digital Image Processing (2002)

of
32
40
Image Enhancement Examples (cont…)
Images taken from Gonzalez & Woods, Digital Image Processing (2002)

of
32
41
Image Enhancement Examples (cont…)
Images taken from Gonzalez & Woods, Digital Image Processing (2002)

of
32
42
Image Enhancement Examples (cont…)
43
of
32
Spatial & Frequency Domains
 There are two broad categories of image
enhancement techniques
– Spatial domain techniques
• Direct manipulation of image pixels
– Frequency domain techniques
• Manipulation of Fourier transform or wavelet
transform of an image
 For the moment we will concentrate on
techniques that operate in the spatial
domain
44
of
32
Image Histograms
The histogram of an image shows us the
distribution of grey levels in the image.
Massively useful in image processing,
especially in segmentation
Frequencies

Grey Levels
Images taken from Gonzalez & Woods, Digital Image Processing (2002)

of
32
45
Histogram Examples
Images taken from Gonzalez & Woods, Digital Image Processing (2002)

of
32
46
Histogram Examples (cont…)
Images taken from Gonzalez & Woods, Digital Image Processing (2002)

of
32
47
Histogram Examples (cont…)
Images taken from Gonzalez & Woods, Digital Image Processing (2002)

of
32
48
Histogram Examples (cont…)
Images taken from Gonzalez & Woods, Digital Image Processing (2002)

of
32
49
Histogram Examples (cont…)
Images taken from Gonzalez & Woods, Digital Image Processing (2002)

of
32
50
Histogram Examples (cont…)
Images taken from Gonzalez & Woods, Digital Image Processing (2002)

of
32
51
Histogram Examples (cont…)
Images taken from Gonzalez & Woods, Digital Image Processing (2002)

of
32
52
Histogram Examples (cont…)
Images taken from Gonzalez & Woods, Digital Image Processing (2002)

of
32
53
Histogram Examples (cont…)
Images taken from Gonzalez & Woods, Digital Image Processing (2002)

of
32
54
Histogram Examples (cont…)
55
of
32
Histogram Examples (cont…)
A selection of images and
Images taken from Gonzalez & Woods, Digital Image Processing (2002)

their histograms
Notice the relationships
between the images and
their histograms
Note that the high contrast
image has the most
evenly spaced histogram
56
of
32
Contrast Stretching
We can fix images that have poor contrast
by applying a pretty simple contrast
specification
The interesting part is how do we decide on
this transformation function?
57
of
32
Histogram Equalization
Spreading out the frequencies in an image
(or equalising the image) is a simple way to
improve dark or washed out images
The formula for histogram
equalization is given where sk  T (rk )
– rk: input intensity k

– sk: processed intensity   pr ( r j )


j 1
– k: the intensity range
(e.g 0.0 – 1.0) k nj
– nj: the frequency of intensity j 
– n: the sum of all frequencies j 1 n
Images taken from Gonzalez & Woods, Digital Image Processing (2002)

of
32
58
Equalization Transformation Function
Images taken from Gonzalez & Woods, Digital Image Processing (2002)

of
32
59
Equalization Examples
1
60
of
32
Equalization Transformation Functions

The functions used to equalise the images in


Images taken from Gonzalez & Woods, Digital Image Processing (2002)

the previous example


Images taken from Gonzalez & Woods, Digital Image Processing (2002)

of
32
61
Equalization Examples
2
62
of
32
Equalization Transformation Functions

The functions used to equalise the images in


Images taken from Gonzalez & Woods, Digital Image Processing (2002)

the previous example


Images taken from Gonzalez & Woods, Digital Image Processing (2002)

of
32
63
Equalization Examples (cont…)

4
3
Images taken from Gonzalez & Woods, Digital Image Processing (2002)

of
32
64
Equalization Examples (cont…)

4
3
65
of
32
Equalization Transformation Functions

The functions used to equalise the images in


Images taken from Gonzalez & Woods, Digital Image Processing (2002)

the previous examples


66
of
32
Summary
We have looked at:
– Different kinds of image enhancement
– Histograms
– Histogram equalisation
In last lectures, we have discussed on point
processing and some neighbourhood
operations
67
of
32
Question
Is histogram equalization always good?

No

You might also like