Digital Image Processing, 2nd ed. www.imageprocessingbook.com
© 2002 R. C. Gonzalez & R. E. Woods
Chapter 3
Digital Image Processing, 2nd ed. www.imageprocessingbook.com
© 2002 R. C. Gonzalez & R. E. Woods
Digital Image Processing, 2nd ed. www.imageprocessingbook.com
© 2002 R. C. Gonzalez & R. E. Woods
Digital Image Processing, 2nd ed. www.imageprocessingbook.com
© 2002 R. C. Gonzalez & R. E. Woods
Digital Image Processing, 2nd ed. www.imageprocessingbook.com
© 2002 R. C. Gonzalez & R. E. Woods
Digital Image Processing, 2nd ed. www.imageprocessingbook.com
© 2002 R. C. Gonzalez & R. E. Woods
Image Enhancement in the
Spatial Domain
Digital Image Processing, 2nd ed. www.imageprocessingbook.com
© 2002 R. C. Gonzalez & R. E. Woods
Gray-level Transformation
Digital Image Processing, 2nd ed. www.imageprocessingbook.com
© 2002 R. C. Gonzalez & R. E. Woods
Histogram Processing
• The histogram of a digital image with intensity levels in the
range [0,L-1] is a discrete function h(rk) = nk, where rk is
the kth intensity value and nk is the number of pixels in the
image with intensity rk.
• A normalized histogram is given by p(rk) = nk/MN for
k=0,1,2,….,L-1.
Digital Image Processing, 2nd ed. www.imageprocessingbook.com
© 2002 R. C. Gonzalez & R. E. Woods
Histogram Processing
Digital Image Processing, 2nd ed. www.imageprocessingbook.com
© 2002 R. C. Gonzalez & R. E. Woods
Histogram Processing
Digital Image Processing, 2nd ed. www.imageprocessingbook.com
© 2002 R. C. Gonzalez & R. E. Woods
Histogram Equalization
• Histogram equalization:
– To improve the contrast of an image
– To transform an image in such a way that the transformed image has a
nearly uniform distribution of pixel values
• Transformation:
– Assume r has been normalized to the interval [0,1], with r = 0
representing black and r = 1 representing white
– The transformation function satisfies the following conditions:
• T(r) is single-valued and monotonically increasing in the interval
•
1
0 
r
1
0
for
1
)
(
0 


 r
r
T
1
0
)
( 

 r
r
T
s
Digital Image Processing, 2nd ed. www.imageprocessingbook.com
© 2002 R. C. Gonzalez & R. E. Woods
Histogram Equalization
Digital Image Processing, 2nd ed. www.imageprocessingbook.com
© 2002 R. C. Gonzalez & R. E. Woods
Histogram Equalization
• Histogram equalization is based on a transformation of the
probability density function of a random variable.
• Let pr(r) and ps(s) denote the probability density function of
random variable r and s, respectively.
• If pr(r) and T(r) are known, then the probability density
function ps(s) of the transformed variable s can be obtained
• Define a transformation function
where w is a dummy variable of integration and the right side
of this equation is the cumulative distribution function of
random variable r.



r
r dw
w
p
r
T
s
0
)
(
)
(
ds
dr
r
p
s
p r
s )
(
)
( 
Digital Image Processing, 2nd ed. www.imageprocessingbook.com
© 2002 R. C. Gonzalez & R. E. Woods
Histogram Equalization
• Given transformation function T(r), 

r
r dw
w
p
r
T
0
)
(
)
(
1
)
(
1
)
(
)
(
1
)
(
1
)
(
)
(
)
(
0

















r
p
r
p
dr
dw
w
p
d
r
p
dr
ds
r
p
ds
dr
r
p
s
p
r
r
r
r
r
r
r
s
Digital Image Processing, 2nd ed. www.imageprocessingbook.com
© 2002 R. C. Gonzalez & R. E. Woods
Histogram Equalization
 ps(s) now is a uniform probability density function.
 T(r) depends on pr(r), but the resulting ps(s) always is uniform.
Digital Image Processing, 2nd ed. www.imageprocessingbook.com
© 2002 R. C. Gonzalez & R. E. Woods
Histogram Equalization
• In discrete version:
– The probability of occurrence of gray level rk in an image is
n : the total number of pixels in the image
nk : the number of pixels that have gray level rk
L : the total number of possible gray levels in the image
– The transformation function is
–
1
,...,
2
,
1
,
0
)
(
)
(
0 0




  
 
L
k
n
n
r
p
r
T
s
k
j
k
j
j
j
r
k
k
1
,...,
2
,
1
,
0
)
( 

 L
k
n
n
r
p k
r
Digital Image Processing, 2nd ed. www.imageprocessingbook.com
© 2002 R. C. Gonzalez & R. E. Woods
Histogram Equalization Example
Intensity # pixels
0 20
1 5
2 25
3 10
4 15
5 5
6 10
7 10
Total 100
Accumulative Sum of Pr
20/100 = 0.2
(20+5)/100 = 0.25
(20+5+25)/100 = 0.5
(20+5+25+10)/100 = 0.6
(20+5+25+10+15)/100 = 0.75
(20+5+25+10+15+5)/100 = 0.8
(20+5+25+10+15+5+10)/100 = 0.9
(20+5+25+10+15+5+10+10)/100 = 1.0
1.0
Digital Image Processing, 2nd ed. www.imageprocessingbook.com
© 2002 R. C. Gonzalez & R. E. Woods
Histogram Equalization Example (cont.)
Intensity
(r)
No. of Pixels
(nj)
Acc Sum
of Pr
Output value Quantized
Output (s)
0 20 0.2 0.2x7 = 1.4 1
1 5 0.25 0.25*7 = 1.75 2
2 25 0.5 0.5*7 = 3.5 3
3 10 0.6 0.6*7 = 4.2 4
4 15 0.75 0.75*7 = 5.25 5
5 5 0.8 0.8*7 = 5.6 6
6 10 0.9 0.9*7 = 6.3 6
7 10 1.0 1.0x7 = 7 7
Total 100
Digital Image Processing, 2nd ed. www.imageprocessingbook.com
© 2002 R. C. Gonzalez & R. E. Woods
Histogram Equalization
(Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd
Edition.
Digital Image Processing, 2nd ed. www.imageprocessingbook.com
© 2002 R. C. Gonzalez & R. E. Woods
Histogram Equalization (cont.)
(Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd
Edition.
Digital Image Processing, 2nd ed. www.imageprocessingbook.com
© 2002 R. C. Gonzalez & R. E. Woods
Histogram Equalization (cont.)
(Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd
Edition.
Digital Image Processing, 2nd ed. www.imageprocessingbook.com
© 2002 R. C. Gonzalez & R. E. Woods
Histogram Equalization (cont.)
(Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd
Edition.
Digital Image Processing, 2nd ed. www.imageprocessingbook.com
© 2002 R. C. Gonzalez & R. E. Woods
Histogram Equalization (cont.)
Original
image
After histogram equalization, the image
become a low contrast image
(Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd
Edition.
Digital Image Processing, 2nd ed. www.imageprocessingbook.com
© 2002 R. C. Gonzalez & R. E. Woods
Histogram Matching
Digital Image Processing, 2nd ed. www.imageprocessingbook.com
© 2002 R. C. Gonzalez & R. E. Woods
Histogram Matching : Algorithm



r
r dw
w
p
r
T
s
0
)
(
)
(
Concept : from Histogram equalization, we have
We get ps(s) = 1
We want an output image to have PDF pz(z)
Apply histogram equalization to pz(z), we get



z
z du
u
p
z
G
v
0
)
(
)
(
We get pv(v) = 1
Since ps(s) = pv(v) = 1 therefore s and v are equivalent
Therefore, we can transform r to z by
r T( ) s G-1
( ) z
Digital Image Processing, 2nd ed. www.imageprocessingbook.com
© 2002 R. C. Gonzalez & R. E. Woods
Histogram Matching : Algorithm (cont.)
s = T(r) v = G(z)
z = G-1
(v)
1
2
3
4
(Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd
Edition.
Digital Image Processing, 2nd ed. www.imageprocessingbook.com
© 2002 R. C. Gonzalez & R. E. Woods
Histogram Matching Example
Intensity
(r)
# pixels
0 20
1 5
2 25
3 10
4 15
5 5
6 10
7 10
Total 100
Input image histogram
Intensity
( z )
# pixels
0 5
1 10
2 15
3 20
4 20
5 15
6 10
7 5
Total 100
Desired Histogram
Example
User define
Original
data
Digital Image Processing, 2nd ed. www.imageprocessingbook.com
© 2002 R. C. Gonzalez & R. E. Woods
r (nj) SPr s
0 20 0.2 1
1 5 0.25 2
2 25 0.5 3
3 10 0.6 4
4 15 0.75 5
5 5 0.8 6
6 10 0.9 6
7 10 1.0 7
Histogram Matching Example (cont.)
1. Apply Histogram Equalization to both tables
z (nj) SPz v
0 5 0.05 0
1 10 0.15 1
2 15 0.3 2
3 20 0.5 4
4 20 0.7 5
5 15 0.85 6
6 10 0.95 7
7 5 1.0 7
sk = T(rk) vk = G(zk)
Digital Image Processing, 2nd ed. www.imageprocessingbook.com
© 2002 R. C. Gonzalez & R. E. Woods
r s
0 1
1 2
2 3
3 4
4 5
5 6
6 6
7 7
Histogram Matching Example (cont.)
2. Get a map
v z
0 0
1 1
2 2
4 3
5 4
6 5
7 6
7 7
sk = T(rk) zk = G-1
(vk)
r  s v  z
s  v
We get
r z
0 1
1 2
2 2
3 3
4 4
5 5
6 5
7 6
z # Pixels
0 0
1 20
2 30
3 10
4 15
5 15
6 10
7 0
Actual Output
Histogram
Digital Image Processing, 2nd ed. www.imageprocessingbook.com
© 2002 R. C. Gonzalez & R. E. Woods
z # Pixels
0 0
1 20
2 30
3 10
4 15
5 15
6 10
7 0
Intensity
(r)
# pixels
0 20
1 5
2 25
3 10
4 15
5 5
6 10
7 10
Total 100
Intensity
( z )
# pixels
0 5
1 10
2 15
3 20
4 20
5 15
6 10
7 5
Total 100
r z
0 1
1 2
2 2
3 3
4 4
5 5
6 5
7 6
Digital Image Processing, 2nd ed. www.imageprocessingbook.com
© 2002 R. C. Gonzalez & R. E. Woods
Histogram Matching Example (cont.)
Desired histogram
Transfer function
Actual histogram
(Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd
Edition.
Digital Image Processing, 2nd ed. www.imageprocessingbook.com
© 2002 R. C. Gonzalez & R. E. Woods
Histogram Matching Example (cont.)
Original
image
After
histogram
equalization
After
histogram
matching
Digital Image Processing, 2nd ed. www.imageprocessingbook.com
© 2002 R. C. Gonzalez & R. E. Woods
Try Yourself
Intensity
(r)
# pixels
0 25
1 5
2 20
3 10
4 5
5 5
6 20
7 10
Total 100
Input image histogram
Intensity
( z )
# pixels
0 5
1 15
2 15
3 20
4 20
5 10
6 10
7 5
Total 100
Desired Histogram
Example
User define
Original
data
Digital Image Processing, 2nd ed. www.imageprocessingbook.com
© 2002 R. C. Gonzalez & R. E. Woods
Local Enhancement : Local Histogram Equalization
Concept: Perform histogram equalization in a small neighborhood
Orignal image After Hist Eq.
After Local Hist Eq.
In 7x7 neighborhood
(Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd
Edition.
Digital Image Processing, 2nd ed. www.imageprocessingbook.com
© 2002 R. C. Gonzalez & R. E. Woods
Quiz
Digital Image Processing, 2nd ed. www.imageprocessingbook.com
© 2002 R. C. Gonzalez & R. E. Woods
• Who was awarded the 2014 PEN Pinter prize?
 PEN International is a worldwide association of writers, founded in London in
1921 to promote friendship and intellectual co-operation among writers
everywhere. The association has autonomous International PEN centers in over 100
countries.
 English PEN is the founding centre of PEN International, the worldwide writers’
association.
 The PEN Pinter Prize comprise an annual literary award launched in 2009 by
English PEN in honour of the late Nobel Literature Prize-winning playwright
Harold Pinter.
 The award is given to "a British writer or a writer resident in Britain.
Digital Image Processing, 2nd ed. www.imageprocessingbook.com
© 2002 R. C. Gonzalez & R. E. Woods
Digital Image Processing, 2nd ed. www.imageprocessingbook.com
© 2002 R. C. Gonzalez & R. E. Woods
Digital Image Processing, 2nd ed. www.imageprocessingbook.com
© 2002 R. C. Gonzalez & R. E. Woods
Isamu Akasaki Hiroshi Amano Shuji Nakamura
Digital Image Processing, 2nd ed. www.imageprocessingbook.com
© 2002 R. C. Gonzalez & R. E. Woods
Digital Image Processing, 2nd ed. www.imageprocessingbook.com
© 2002 R. C. Gonzalez & R. E. Woods
Digital Image Processing, 2nd ed. www.imageprocessingbook.com
© 2002 R. C. Gonzalez & R. E. Woods
• Digital Image Processing”, C.Rafeal Gonzalez
and E.Richard Woods, , Pearson Education
2007, Page 120-138
Digital Image Processing, 2nd ed. www.imageprocessingbook.com
© 2002 R. C. Gonzalez & R. E. Woods
Assessment
• Define histogram.
• What is histogram equalization?
• Consider an image matrix given below:
Perform histogram equalization.
• Explain the histogram specification technique
with an example.
Digital Image Processing, 2nd ed. www.imageprocessingbook.com
© 2002 R. C. Gonzalez & R. E. Woods

Histogram equalization and matching - Digital Image Processing

  • 1.
    Digital Image Processing,2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Chapter 3
  • 2.
    Digital Image Processing,2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods
  • 3.
    Digital Image Processing,2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods
  • 4.
    Digital Image Processing,2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods
  • 5.
    Digital Image Processing,2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods
  • 6.
    Digital Image Processing,2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Image Enhancement in the Spatial Domain
  • 7.
    Digital Image Processing,2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Gray-level Transformation
  • 8.
    Digital Image Processing,2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Histogram Processing • The histogram of a digital image with intensity levels in the range [0,L-1] is a discrete function h(rk) = nk, where rk is the kth intensity value and nk is the number of pixels in the image with intensity rk. • A normalized histogram is given by p(rk) = nk/MN for k=0,1,2,….,L-1.
  • 9.
    Digital Image Processing,2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Histogram Processing
  • 10.
    Digital Image Processing,2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Histogram Processing
  • 11.
    Digital Image Processing,2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Histogram Equalization • Histogram equalization: – To improve the contrast of an image – To transform an image in such a way that the transformed image has a nearly uniform distribution of pixel values • Transformation: – Assume r has been normalized to the interval [0,1], with r = 0 representing black and r = 1 representing white – The transformation function satisfies the following conditions: • T(r) is single-valued and monotonically increasing in the interval • 1 0  r 1 0 for 1 ) ( 0     r r T 1 0 ) (    r r T s
  • 12.
    Digital Image Processing,2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Histogram Equalization
  • 13.
    Digital Image Processing,2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Histogram Equalization • Histogram equalization is based on a transformation of the probability density function of a random variable. • Let pr(r) and ps(s) denote the probability density function of random variable r and s, respectively. • If pr(r) and T(r) are known, then the probability density function ps(s) of the transformed variable s can be obtained • Define a transformation function where w is a dummy variable of integration and the right side of this equation is the cumulative distribution function of random variable r.    r r dw w p r T s 0 ) ( ) ( ds dr r p s p r s ) ( ) ( 
  • 14.
    Digital Image Processing,2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Histogram Equalization • Given transformation function T(r),   r r dw w p r T 0 ) ( ) ( 1 ) ( 1 ) ( ) ( 1 ) ( 1 ) ( ) ( ) ( 0                  r p r p dr dw w p d r p dr ds r p ds dr r p s p r r r r r r r s
  • 15.
    Digital Image Processing,2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Histogram Equalization  ps(s) now is a uniform probability density function.  T(r) depends on pr(r), but the resulting ps(s) always is uniform.
  • 16.
    Digital Image Processing,2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Histogram Equalization • In discrete version: – The probability of occurrence of gray level rk in an image is n : the total number of pixels in the image nk : the number of pixels that have gray level rk L : the total number of possible gray levels in the image – The transformation function is – 1 ,..., 2 , 1 , 0 ) ( ) ( 0 0          L k n n r p r T s k j k j j j r k k 1 ,..., 2 , 1 , 0 ) (    L k n n r p k r
  • 17.
    Digital Image Processing,2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Histogram Equalization Example Intensity # pixels 0 20 1 5 2 25 3 10 4 15 5 5 6 10 7 10 Total 100 Accumulative Sum of Pr 20/100 = 0.2 (20+5)/100 = 0.25 (20+5+25)/100 = 0.5 (20+5+25+10)/100 = 0.6 (20+5+25+10+15)/100 = 0.75 (20+5+25+10+15+5)/100 = 0.8 (20+5+25+10+15+5+10)/100 = 0.9 (20+5+25+10+15+5+10+10)/100 = 1.0 1.0
  • 18.
    Digital Image Processing,2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Histogram Equalization Example (cont.) Intensity (r) No. of Pixels (nj) Acc Sum of Pr Output value Quantized Output (s) 0 20 0.2 0.2x7 = 1.4 1 1 5 0.25 0.25*7 = 1.75 2 2 25 0.5 0.5*7 = 3.5 3 3 10 0.6 0.6*7 = 4.2 4 4 15 0.75 0.75*7 = 5.25 5 5 5 0.8 0.8*7 = 5.6 6 6 10 0.9 0.9*7 = 6.3 6 7 10 1.0 1.0x7 = 7 7 Total 100
  • 19.
    Digital Image Processing,2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Histogram Equalization (Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.
  • 20.
    Digital Image Processing,2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Histogram Equalization (cont.) (Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.
  • 21.
    Digital Image Processing,2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Histogram Equalization (cont.) (Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.
  • 22.
    Digital Image Processing,2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Histogram Equalization (cont.) (Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.
  • 23.
    Digital Image Processing,2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Histogram Equalization (cont.) Original image After histogram equalization, the image become a low contrast image (Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.
  • 24.
    Digital Image Processing,2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Histogram Matching
  • 25.
    Digital Image Processing,2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Histogram Matching : Algorithm    r r dw w p r T s 0 ) ( ) ( Concept : from Histogram equalization, we have We get ps(s) = 1 We want an output image to have PDF pz(z) Apply histogram equalization to pz(z), we get    z z du u p z G v 0 ) ( ) ( We get pv(v) = 1 Since ps(s) = pv(v) = 1 therefore s and v are equivalent Therefore, we can transform r to z by r T( ) s G-1 ( ) z
  • 26.
    Digital Image Processing,2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Histogram Matching : Algorithm (cont.) s = T(r) v = G(z) z = G-1 (v) 1 2 3 4 (Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.
  • 27.
    Digital Image Processing,2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Histogram Matching Example Intensity (r) # pixels 0 20 1 5 2 25 3 10 4 15 5 5 6 10 7 10 Total 100 Input image histogram Intensity ( z ) # pixels 0 5 1 10 2 15 3 20 4 20 5 15 6 10 7 5 Total 100 Desired Histogram Example User define Original data
  • 28.
    Digital Image Processing,2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods r (nj) SPr s 0 20 0.2 1 1 5 0.25 2 2 25 0.5 3 3 10 0.6 4 4 15 0.75 5 5 5 0.8 6 6 10 0.9 6 7 10 1.0 7 Histogram Matching Example (cont.) 1. Apply Histogram Equalization to both tables z (nj) SPz v 0 5 0.05 0 1 10 0.15 1 2 15 0.3 2 3 20 0.5 4 4 20 0.7 5 5 15 0.85 6 6 10 0.95 7 7 5 1.0 7 sk = T(rk) vk = G(zk)
  • 29.
    Digital Image Processing,2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods r s 0 1 1 2 2 3 3 4 4 5 5 6 6 6 7 7 Histogram Matching Example (cont.) 2. Get a map v z 0 0 1 1 2 2 4 3 5 4 6 5 7 6 7 7 sk = T(rk) zk = G-1 (vk) r  s v  z s  v We get r z 0 1 1 2 2 2 3 3 4 4 5 5 6 5 7 6 z # Pixels 0 0 1 20 2 30 3 10 4 15 5 15 6 10 7 0 Actual Output Histogram
  • 30.
    Digital Image Processing,2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods z # Pixels 0 0 1 20 2 30 3 10 4 15 5 15 6 10 7 0 Intensity (r) # pixels 0 20 1 5 2 25 3 10 4 15 5 5 6 10 7 10 Total 100 Intensity ( z ) # pixels 0 5 1 10 2 15 3 20 4 20 5 15 6 10 7 5 Total 100 r z 0 1 1 2 2 2 3 3 4 4 5 5 6 5 7 6
  • 31.
    Digital Image Processing,2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Histogram Matching Example (cont.) Desired histogram Transfer function Actual histogram (Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.
  • 32.
    Digital Image Processing,2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Histogram Matching Example (cont.) Original image After histogram equalization After histogram matching
  • 33.
    Digital Image Processing,2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Try Yourself Intensity (r) # pixels 0 25 1 5 2 20 3 10 4 5 5 5 6 20 7 10 Total 100 Input image histogram Intensity ( z ) # pixels 0 5 1 15 2 15 3 20 4 20 5 10 6 10 7 5 Total 100 Desired Histogram Example User define Original data
  • 34.
    Digital Image Processing,2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Local Enhancement : Local Histogram Equalization Concept: Perform histogram equalization in a small neighborhood Orignal image After Hist Eq. After Local Hist Eq. In 7x7 neighborhood (Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.
  • 35.
    Digital Image Processing,2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Quiz
  • 36.
    Digital Image Processing,2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods • Who was awarded the 2014 PEN Pinter prize?  PEN International is a worldwide association of writers, founded in London in 1921 to promote friendship and intellectual co-operation among writers everywhere. The association has autonomous International PEN centers in over 100 countries.  English PEN is the founding centre of PEN International, the worldwide writers’ association.  The PEN Pinter Prize comprise an annual literary award launched in 2009 by English PEN in honour of the late Nobel Literature Prize-winning playwright Harold Pinter.  The award is given to "a British writer or a writer resident in Britain.
  • 37.
    Digital Image Processing,2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods
  • 38.
    Digital Image Processing,2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods
  • 39.
    Digital Image Processing,2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Isamu Akasaki Hiroshi Amano Shuji Nakamura
  • 40.
    Digital Image Processing,2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods
  • 41.
    Digital Image Processing,2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods
  • 42.
    Digital Image Processing,2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods • Digital Image Processing”, C.Rafeal Gonzalez and E.Richard Woods, , Pearson Education 2007, Page 120-138
  • 43.
    Digital Image Processing,2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Assessment • Define histogram. • What is histogram equalization? • Consider an image matrix given below: Perform histogram equalization. • Explain the histogram specification technique with an example.
  • 44.
    Digital Image Processing,2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods