0% found this document useful (0 votes)
66 views36 pages

Chapter Overview: Point Operations!: Relating Gray Values To Brightness!

This document discusses point operations in digital image processing. It covers several key topics: 1) Relating pixel gray values to brightness perception and quantization of values; 2) Histograms and histogram equalization as a method to modify an image's contrast by transforming its pixel values to produce a uniform distribution; 3) Combining images through averaging, subtraction, and other point operations, which require image registration.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
66 views36 pages

Chapter Overview: Point Operations!: Relating Gray Values To Brightness!

This document discusses point operations in digital image processing. It covers several key topics: 1) Relating pixel gray values to brightness perception and quantization of values; 2) Histograms and histogram equalization as a method to modify an image's contrast by transforming its pixel values to produce a uniform distribution; 3) Combining images through averaging, subtraction, and other point operations, which require image registration.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 36

Chapter Overview: Point Operations!

  Relating gray values to brightness!


  Gray value quantization!
  Weberʼs Law!
  Gamma characteristic!
  Adjusting brightness and contrast!
  Gray-level histograms and histogram equalization!
  Point operations for combining images!
  Averaging!
  Subtraction!
  The need for image registration!

Bernd Girod: EE368 Digital Image Processing! Point Operations no. 1!


Quantization: how many bits per pixel?!
8 bits
5 bits
4 bits

„Contouring“

3 bits
2 bits
1 bit

Bernd Girod: EE368 Digital Image Processing! Point Operations no. 2!


How many gray levels are required?!

  Contouring is most visible for a ramp!

32 levels!

64 levels!

128 levels!

256 levels!

  Digital images typically are quantized to 256 gray levels. !

Bernd Girod: EE368 Digital Image Processing! Point Operations no. 3!


Brightness discrimination experiment!

  Can you see the circle?!

I + ΔI

Note: I is luminance,
125!
126!
128!
129!
130!
127!
I measured in cd m 2

  Visibility threshold!
„Weber fraction“!
ΔI I ≈ KWeber ≈ 1…2% „Weberʻs Law“!

Bernd Girod: EE368 Digital Image Processing! Point Operations no. 4!


Contrast ratio without contouring!
  Luminance ratio between two successive quantization
levels at visibility threshold!
I max N −1
= (1 + KWeber )
I min
I max
  For! KWeber = 0.010.02 N = 256 = 13156
I min
  Typical display contrast ratio!
  Modern flat panel display in dark room 1000:1!
  Cathode ray tube 100:1!
  Print on paper 10:1!
  Suggests uniform perception in the log(I) domain
(„Fechnerʻs Law“)!

Bernd Girod: EE368 Digital Image Processing! Point Operations no. 5!


Gamma characteristic!

  Cathode ray tubes (CRTs) are nonlinear!


Luminance!
I!
I ~ Uγ
γ = 2.0 . . . 2.3!

Voltage U!

  Cameras contain γ-predistortion circuit!


U ~ I1 γ

Bernd Girod: EE368 Digital Image Processing! Point Operations no. 6!


log vs. γ-predistortion!

U

U ~ log(I )

U ~ I1 γ

Imax
= 100
Imin

  Similar enough for most practical applications!

Bernd Girod: EE368 Digital Image Processing! Point Operations no. 7!


Photographic film!
Hurter & Driffield curve (H&D curve)!
for photographic negative!

slope -γ! Luminance!


2.0
shoulder!
I = I 0 ⋅10 − d
= I 0 ⋅10 −( − γ log E +d0 )
density d

„linear“ region!
1.0
= I 0 ⋅10 − d0 ⋅ E γ

toe! log E

0

d0
E is exposure

  γ measures film contrast!
  General purpose films: γ = -0.7 . . . -1.0!
  High-contrast films: γ = -1.5 . . . -10!
  Lower speed films tend to have higher absolute γ!

Bernd Girod: EE368 Digital Image Processing! Point Operations no. 8!


Brightness adjustment by intensity scaling!

Original image! Scaled image!

f [ x, y ] a ⋅ f [ x, y ]

Scaling in the γ-domain is equivalent to scaling in the linear luminance domain



γ γ
I ~ ( a ⋅ f [ x, y ]) = aγ ⋅ ( f [ x, y ])
. . . same effect as adjusting camera exposure time.!

Bernd Girod: EE368 Digital Image Processing! Point Operations no. 9!


Contrast adjustment by changing γ!

Original image! γ increased by 50%!

f [ x, y ] γ
a ⋅ ( f [ x, y ]) with γ = 1.5

. . . same effect as using a different photographic film . . .!

Bernd Girod: EE368 Digital Image Processing! Point Operations no. 10!
Contrast adjustment by changing γ!

Scaled ramp 2γ0!

Original ramp γ0!

Scaling chosen to!


approximately preserve!
brightness of mid-gray!
Scaled ramp 0.5γ0!

Bernd Girod: EE368 Digital Image Processing! Point Operations no. 11!
Gray level histograms!

  Distribution of gray levels can be judged by measuring a



histogram:!
  For B-bit image, initialize 2B counters with 0 !
  Loop over all pixels x,y!
  When encountering gray level f [x,y]=i, increment counter #ι

  Normalized histogram may be thought of as an

empirical probability distribution.!
  You can also use fewer, larger bins to trade off amplitude

resolution against sample size.!

Bernd Girod: EE368 Digital Image Processing! Point Operations no. 12!
#pixels! Example histogram!

Cameraman!
image!
gray level!

Bernd Girod: EE368 Digital Image Processing! Point Operations no. 13!
#pixels!
Example histogram!

Pout!
image!
gray level!

Bernd Girod: EE368 Digital Image Processing! Point Operations no. 14!
Histogram equalization!

  Idea: find a non-linear transformation!


g=T(f)
!to be applied to each pixel of the input image f [x,y], such

that a uniform distribution of gray levels in the entire range

results for the output image g[x,y].

  Analyse ideal, continuous case first, assuming!

  0
≤ f ≤ 1 0 ≤ g ≤1
  T(f) is strictly monotonically increasing, hence, there
exists!
f = T −1 ( g ) 0 ≤ g ≤1

  Goal: pdf pg(g) = 1 over the range !0 ≤ g ≤ 1

Bernd Girod: EE368 Digital Image Processing! Point Operations no. 15!
Histogram equalization for continuous case!

  From basic probability theory!


⎡ df ⎤
pg ( g ) = ⎢ p f ( f ) ⎥
⎣ dg ⎦ f =T −1 ( g )
  Consider the transformation function!
f
g = T ( f ) = ∫ p f (α ) dα 0 ≤ f ≤1
0

  Then . . . ! dg
= pf ( f )
df
⎡ df ⎤ ⎡ 1 ⎤
pg ( g ) = ⎢ p f ( f ) ⎥ = ⎢ p f ( f ) ⎥ =1 0 ≤ g ≤1
⎣ dg ⎦ f =T −1 ( g ) ⎢⎣ p f ( f ) ⎥⎦ −1
f =T ( g )

Bernd Girod: EE368 Digital Image Processing! Point Operations no. 16!
Histogram equalization for discrete case!

  Now, f only assumes discrete amplitude values f0 , f1 ,, fL−1!


!with empirical probabilities!
L−1
n0 n1 nL−1
P0 = P1 =  PL−1 = where n = ∑ nl
n n n l =0
f
  Discrete approximation of! g = T ( f ) = ∫ p f (α ) dα
0
k
gk = T ( fk ) = ∑ Pi for k = 0,1..., L − 1
i=0

  The resulting values gk are in the range [0,1] and need to


be scaled and rounded appropriately. !

Bernd Girod: EE368 Digital Image Processing! Point Operations no. 17!
Histogram equalization example!

Original image Pout! Pout!


after histogram equalization!

Bernd Girod: EE368 Digital Image Processing! Point Operations no. 18!
Histogram equalization example!
Original image Pout! . . . after histogram equalization!
#pixels!

#pixels!
gray level! gray level!

Bernd Girod: EE368 Digital Image Processing! Point Operations no. 19!
Histogram equalization example!

Original image Cameraman!


Cameraman! after histogram equalization!

Bernd Girod: EE368 Digital Image Processing! Point Operations no. 20!
Histogram equalization example!
Original image Cameraman! . . . after histogram equalization!
#pixels!

#pixels!
gray level! gray level!

Bernd Girod: EE368 Digital Image Processing! Point Operations no. 21!
Histogram equalization example!

Original image Moon! Moon!


after histogram equalization!

Bernd Girod: EE368 Digital Image Processing! Point Operations no. 22!
Histogram equalization example!
Original image Moon! . . . after histogram equalization!

#pixels!
#pixels!

gray level! gray level!

Bernd Girod: EE368 Digital Image Processing! Point Operations no. 23!
Contrast-limited histogram equalization!

Equalization with!
original histogram!

Output gray level!


#pixels!

Equalization with!
clipped histogram!

Histogram Clipping!

Input graylevel!
gray level! Input gray level!

Bernd Girod: EE368 Digital Image Processing! Point Operations no. 24!
Adaptive histogram equalization!
  Apply histogram equalization based on a histogram obtained
from a portion of the image!

Sliding window approach:
 Tiling approach:



different histogram (and mapping)
 subdivide into overlapping regions,

for every pixel! mitigate blocking effect by smooth blending

between neighboring tiles !

  Must limit contrast expansion in flat regions of the image,



e.g. by clipping individual histogram values to a maximum

(CLAHE - “Contrast-limited adaptive histogram equalization”)!
[Pizer, Amburn et al. 1987]!

Bernd Girod: EE368 Digital Image Processing! Point Operations no. 25!
Adaptive histogram equalization!

Original! Global histogram! Tiling
 Tiling



8x8 histograms! 32x32 histograms!

Bernd Girod: EE368 Digital Image Processing! Point Operations no. 26!
Adaptive histogram equalization!

Original image Dental Xray! Adaptive histogram equalization, 16x16 tiles!

Dental Xray after 



equalization of

global histogram!

Bernd Girod: EE368 Digital Image Processing! Point Operations no. 27!
Adaptive histogram equalization!

Original image! Global
 Adaptive histogram!


histogram equalization

equalization! 8x8 tiles!

Bernd Girod: EE368 Digital Image Processing! Point Operations no. 28!
Point operations for combining images!

  Image averaging for noise reduction!


  Combination of different exposures for

high-dynamic range imaging!
  Image subtraction for change detection!
  Accurate alignment is always a requirement!

Bernd Girod: EE368 Digital Image Processing! Point Operations no. 29!
Image averaging for noise reduction!
1 image 2 images 4 images!

http://www.cambridgeincolour.com/tutorials/image-averaging-noise.htm!

Bernd Girod: EE368 Digital Image Processing! Point Operations no. 30!
High-dynamic range imaging!

16 exposures, one f-stop (2X) apart!

[Debevec, Malik, 1997] ! Combined image!


Bernd Girod: EE368 Digital Image Processing! Point Operations no. 31!
Image subtraction!

  Find differences/changes between 2 mostly identical images!


  Example: digital subtraction angiography!

- +

Contrast!
enhancement!

http://www.isi.uu.nl/Research/Gallery/DSA/!

Bernd Girod: EE368 Digital Image Processing! Point Operations no. 32!
Video background subtraction!
New Frame! Background Frame! New Frame! Background Frame!

+! -! +! -!

Abs(.) > θ ?
Abs(.) > θ ?

Update: Background[t] := α Background[t-1] + (1- α) New[t]


Bernd Girod: EE368 Digital Image Processing! Point Operations no. 33!
Image subtraction example from IC manufacturing:

die-to-die comparison of photomasks!

Bernd Girod: EE368 Digital Image Processing! Point Operations no. 34!
Where is the defect?!

Image A (no defect)! Image B (w/ defect)!

Bernd Girod: EE368 Digital Image Processing! Point Operations no. 35!
Absolute difference between two images!

w/o alignment! w/ alignment and thresholding!

Bernd Girod: EE368 Digital Image Processing! Point Operations no. 36!

You might also like