2 Point Operations
-
Upload
nandakishorenalla -
Category
Documents
-
view
215 -
download
0
Transcript of 2 Point Operations
-
7/31/2019 2 Point Operations
1/36
Bernd Girod: EE368 Digital Image Processing! Point Operations no. 1
Chapter Overview: Point Operations
Relating gray values to brightness!
Gray value quantization!
Webers 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!
-
7/31/2019 2 Point Operations
2/36
Bernd Girod: EE368 Digital Image Processing! Point Operations no. 2
Quantization: how many bits per pixel?
8 bits 5 bits 4 bits
3 bits 2 bits 1 bit
Contouring
-
7/31/2019 2 Point Operations
3/36
Bernd Girod: EE368 Digital Image Processing! Point Operations no. 3
How many gray levels are required?
Contouring is most visible for a ramp!
Digital images typically are quantized to 256 gray levels. !
32 levels!
64 levels!
128 levels!
256 levels!
-
7/31/2019 2 Point Operations
4/36
Bernd Girod: EE368 Digital Image Processing! Point Operations no. 4
130!
129!
128!
127!
126!
125!
Brightness discrimination experiment
Can you see the circle?!
Visibility threshold!
I
I+ I
I I KWeber
12%Weber fraction!Webers Law!
Note: I is luminance,
measured in cd m2
-
7/31/2019 2 Point Operations
5/36
Bernd Girod: EE368 Digital Image Processing! Point Operations no. 5
Contrast ratio without contouring
Luminance ratio between two successive quantizationlevels at visibility threshold!
For!
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(Fechners Law)!
Imax
Imin
= 1+ KWeber( )
N1
K
Weber= 0.010.02 N= 256
Imax
Imin
= 13156
-
7/31/2019 2 Point Operations
6/36
Bernd Girod: EE368 Digital Image Processing! Point Operations no. 6
Cathode ray tubes (CRTs) are nonlinear!
Cameras contain -predistortion circuit!
Gamma characteristic
= 2.0 . . . 2.3!
Luminance!
I!
Voltage U!
I ~U
U~ I1
-
7/31/2019 2 Point Operations
7/36
Bernd Girod: EE368 Digital Image Processing! Point Operations no. 7
log vs. -predistortion
Similar enough for most practical applications!
U
I
U ~ I1
U ~ log(I)
Imax
Imin
=100
-
7/31/2019 2 Point Operations
8/36
Bernd Girod: EE368 Digital Image Processing! Point Operations no. 8
Photographic film
measures film contrast! General purpose films: = -0.7 . . . -1.0! High-contrast films: = -1.5 . . . -10!
Lower speed films tend to have higher absolute !
slope -!
logEEis exposure
densityd
shoulder!
toe!
linear region!
I = I0 10d
= I0 10 logE+d0( )
= I0 10d0
E
Luminance!
Hurter & Driffield curve (H&D curve)!for photographic negative!
d0
0
2.0
1.0
-
7/31/2019 2 Point Operations
9/36
Bernd Girod: EE368 Digital Image Processing! Point Operations no. 9
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
. . . same effect as adjusting camera exposure time.
I~ a f x,y[ ]( )
= a
f x,y[ ]( )
-
7/31/2019 2 Point Operations
10/36
Bernd Girod: EE368 Digital Image Processing! Point Operations no. 10
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 . . .!
-
7/31/2019 2 Point Operations
11/36
Bernd Girod: EE368 Digital Image Processing! Point Operations no. 11
Contrast adjustment by changing
Original ramp 0!
Scaled ramp 20!
Scaled ramp 0.50!
Scaling chosen to!
approximately preserve!brightness of mid-gray!
-
7/31/2019 2 Point Operations
12/36
Bernd Girod: EE368 Digital Image Processing! Point Operations no. 12
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 pixelsx,y!
When encountering gray levelf[x,y]=i, increment counter #
Normalized histogram may be thought of as anempirical probability distribution.!
You can also use fewer, larger bins to trade off amplitude
resolution against sample size.!
-
7/31/2019 2 Point Operations
13/36
Bernd Girod: EE368 Digital Image Processing! Point Operations no. 13
Example histogram
gray level!
#pixels
Cameramanimage
-
7/31/2019 2 Point Operations
14/36
Bernd Girod: EE368 Digital Image Processing! Point Operations no. 14
Example histogram
gray level!
#pixels
Poutimage
-
7/31/2019 2 Point Operations
15/36
Bernd Girod: EE368 Digital Image Processing! Point Operations no. 15
Histogram equalization
Idea: find a non-linear transformation!
!to be applied to each pixel of the input imagef[x,y], suchthat a uniform distribution of gray levels in the entire range
results for the output image g[x,y]. Analyse ideal, continuous case first, assuming!
T(f)is strictly monotonically increasing, hence, there
exists!
Goal: pdfpg(g)= 1 over the range !
0 f 1
f = T1
g( )
g = T f( )
0 g 1
0 g 1
0 g 1
-
7/31/2019 2 Point Operations
16/36
Bernd Girod: EE368 Digital Image Processing! Point Operations no. 16
Histogram equalization for continuous case
From basic probability theory!
Consider the transformation function!
Then . . . !
pg g( ) = pf f( )df
dg
f=T1 g( )
g = T f( ) = pf ( )0
f
d 0 f 1
dg
df= pf f( )
pg g( ) = pf f( )df
dg
f=T
1 g( )
= pf f( )1
pf f( )
f=T
1 g( )
=1 0 g 1
-
7/31/2019 2 Point Operations
17/36
Bernd Girod: EE368 Digital Image Processing! Point Operations no. 17
Histogram equalization for discrete case
Now,fonly assumes discrete amplitude values !!with empirical probabilities!
Discrete approximation of!
The resulting values gkare in the range [0,1] and need tobe scaled and rounded appropriately. !
f0 , f1,, fL1
P0 =n0
n P
1=
n1
n P
L1 =nL1
nwhere n = n
l
l=0
L1
g = T f( ) = pf ( )0
f
d
gk =
T fk( ) = Pi
i=0
k
for k= 0,1...,L 1
-
7/31/2019 2 Point Operations
18/36
Bernd Girod: EE368 Digital Image Processing! Point Operations no. 18
Histogram equalization example
Original image Pout Poutafter histogram equalization
-
7/31/2019 2 Point Operations
19/36
Bernd Girod: EE368 Digital Image Processing! Point Operations no. 19
Histogram equalization example
Original image Pout . . . after histogram equalization
gray level!
#pixels
gray level!
#pixels
-
7/31/2019 2 Point Operations
20/36
Bernd Girod: EE368 Digital Image Processing! Point Operations no. 20
Histogram equalization example
Original image
CameramanCameraman
after histogram equalization
-
7/31/2019 2 Point Operations
21/36
Bernd Girod: EE368 Digital Image Processing! Point Operations no. 21
Histogram equalization example
Original image Cameraman . . . after histogram equalization
gray level!
#pixels
gray level!
#pixels
-
7/31/2019 2 Point Operations
22/36
Bernd Girod: EE368 Digital Image Processing! Point Operations no. 22
Histogram equalization example
Original image Moon Moon
after histogram equalization
-
7/31/2019 2 Point Operations
23/36
Bernd Girod: EE368 Digital Image Processing! Point Operations no. 23
Histogram equalization example
Original image Moon . . . after histogram equalization
gray level!
#
pixels
gray level!
#
pixels
-
7/31/2019 2 Point Operations
24/36
Bernd Girod: EE368 Digital Image Processing! Point Operations no. 24
Contrast-limited histogram equalization
gray level!
Histogram Clipping!
Input gray level!
Output
graylevel!
Equalization with!
clipped histogram!
Equalization with!original histogram!
Input gray level!
#
pixels
-
7/31/2019 2 Point Operations
25/36
Bernd Girod: EE368 Digital Image Processing! Point Operations no. 25
Adaptive histogram equalization
Apply histogram equalization based on a histogram obtainedfrom a portion of the image!
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)!
Sliding window approach:different histogram (and mapping)
for every pixel!
Tiling approach:subdivide into overlapping regions,
mitigate blocking effect by smooth blending
between neighboring tiles!
[Pizer, Amburn et al. 1987]!
-
7/31/2019 2 Point Operations
26/36
Bernd Girod: EE368 Digital Image Processing! Point Operations no. 26
Adaptive histogram equalization
Original! Global histogram! Tiling
8x8 histograms!
Tiling
32x32 histograms!
-
7/31/2019 2 Point Operations
27/36
Bernd Girod: EE368 Digital Image Processing! Point Operations no. 27
Adaptive histogram equalization
Original image Dental Xray
Dental Xrayafterequalization ofglobal histogram!
Adaptive histogram equalization, 16x16 tiles
-
7/31/2019 2 Point Operations
28/36
Bernd Girod: EE368 Digital Image Processing! Point Operations no. 28
Adaptive histogram equalization
Original image Globalhistogram
equalization
Adaptive histogramequalization
8x8 tiles
-
7/31/2019 2 Point Operations
29/36
Bernd Girod: EE368 Digital Image Processing! Point Operations no. 29
Point operations for combining images
Image averaging for noise reduction!
Combination of different exposures forhigh-dynamic range imaging!
Image subtraction for change detection!
Accurate alignment is always a requirement!
-
7/31/2019 2 Point Operations
30/36
Bernd Girod: EE368 Digital Image Processing! Point Operations no. 30
Image averaging for noise reduction
http://www.cambridgeincolour.com/tutorials/image-averaging-noise.htm!
1 image 2 images 4 images!
-
7/31/2019 2 Point Operations
31/36
Bernd Girod: EE368 Digital Image Processing! Point Operations no. 31
High-dynamic range imaging
16 exposures, one f-stop (2X) apart!
Combined image![Debevec, Malik, 1997]!
-
7/31/2019 2 Point Operations
32/36
Bernd Girod: EE368 Digital Image Processing! Point Operations no. 32
Image subtraction
Find differences/changes between 2 mostly identical images!
Example: digital subtraction angiography!
- +
Contrastenhancement
http://www.isi.uu.nl/Research/Gallery/DSA/!
-
7/31/2019 2 Point Operations
33/36
Bernd Girod: EE368 Digital Image Processing! Point Operations no. 33
Video background subtraction
New Frame Background Frame
-!
+!
Abs(.) > ?
-!
+!
Abs(.) > ?
New Frame Background Frame
Update: Background[t] := Background[t-1] + (1- ) New[t]
-
7/31/2019 2 Point Operations
34/36
Bernd Girod: EE368 Digital Image Processing! Point Operations no. 34
Image subtraction example from IC manufacturing:
die-to-die comparison of photomasks
-
7/31/2019 2 Point Operations
35/36
Bernd Girod: EE368 Digital Image Processing! Point Operations no. 35
Where is the defect?
Image A (no defect)! Image B (w/ defect)!
-
7/31/2019 2 Point Operations
36/36
Bernd Girod: EE368 Digital Image Processing! Point Operations no. 36
Absolute difference between two images
w/o alignment! w/ alignment and thresholding!