Chapter 2 Digital Image Fundamentals. 2.1 Human Visual System Purpose of study : Improvement of...
-
Upload
lynette-roxanne-watts -
Category
Documents
-
view
217 -
download
2
Transcript of Chapter 2 Digital Image Fundamentals. 2.1 Human Visual System Purpose of study : Improvement of...
Chapter 2
Digital Image Fundamentals
2.1 Human Visual System
Purpose of study : Improvement of images for use by a human observer
(1)Physical Structure of the Eye
Cornea : convex lens, refracting the rays
Aqueous humor
Iris : a variable aperture to control the amount of light
Lens : Controls the focal length to focus at retina
Vitreous humor
Retina : Composed of photoreceptors to convert the intensity and color of light to neural signal
s ( 108 elements)
Types of photo Receptors
Rods : to respond to broad-spectrum color light for low-light vision, and therefore cannot discriminate color.
Cones : for day-light vision. Three different types of cones for color vision (trichromacy)
Distribution of rods and cones
- Color perception is best for the objects that we are viewing directly forward
-Relative insensitivity of cones also accounts for our inability to perceive color under low-light conditions
Optic nerve and visual cortex
2.2 Image Processing in the Eye
Weber’s law
Rods/ConesVisual Cortex Processing
Optic Nervelights
decisionneuralimpulses
(brain)
-The difference in perceived brightness of the steps does not Appear equal-The eye cannot see the same intensity increments in the bright
regions that it sees in the dark regions
Note) In DIP, simple darkening of bright regions can make undetectably minute intensity changes perceptible
Lateral Inhibitions
Simultaneous ContrastThe square in the left side is brighter than that in the right side
② Match band effectVisual system accentuates sharp intensity changes Human eye is sensitive to the changes of intensities (edges)
Note : Second–Order System
Frequency Response of HVS
Size of image : M x M
fmax = M/2/ = M/2(Cycles / degree)
= 2tan-1(0.5x/6H) (degree)
Sensitivity curve
Other Properties of HVS : Digital Picture Processing, volume 1, Chapter3, Azriel Rosenfeld and Avinash C. kak
2.3 Sampling and Quantization
Uniform sampling and quantization
F(x,y) = f(0,0) f(0,1) …………… f(0,M-1) f(1,0) f(1,1) …………… f(1,M-1)
f(N-1,0) f(N-1,1) ….. f(N-1,M-1) N x M
Size of DIN = 2n , M = 2k
Gray levelG = 2m
# of bits = N x M x m
Effect of Image Resolution
(a)1024 x 1024
(b) 512 x 512 (c) 256 x 256
(d) 128 x 128 (e) 64 x 64 (f) 32 x 32
Effect of Quantization Levels
(a) 8 bit (b) 7 bit (c) 6 bit (d) 5 bit
(e) 4 bit (f) 3 bit (g) 2 bit (h) 1 bit
Isopreference curves
Figure 2.12 Isopreference curves for (a) face (b) cameraman, and (c) crowd. (From Huang [1965]
-The quality of the images tends to increase as N and m are increased Note : Exceptional Case
For fixed N, the quality is improved by decreasing m.(contrast)
-The curves tend to become more vertical Note : For images with a large amount of detail only a few
gray levels are needed
-The curves depart markedly from the curves of constant b = N2m
Non-uniform Sampling / Quantization
- Fine sampling is the neighborhood of sharp gray-level transitions whereas coarse sampling in relatively smooth regions-Quantization according to the sensitivity of HVS. (Subband Coding)
2.4 Some Basic Relationships Between Pixel
Neighbor of a pixel
N8(p) = N4(p) ND(p)
xpx xx
N4(p)
ND(p) pxx
x x
N8(p)x
xx
xp xx
xx
Connectivity
V = Set of gray- level values used to define connectivity
qpq qq
p and one of q V
- 4-connectivity
q
qp qq
qqp and one of q V
- 8-connectivity
- m-connectivity① q is in N4(p) or
② q is in ND(p) and the set N4(p) N4(q) is empty
- A pixel p is adjacent to a pixel q if they are connected- Path / length (x0, y0)(x1,y1)…(xn, yn)
- ConnectedIf p and q pixels of an image subset S , then p is connected to q in S if there is a path from p to q consisting entire of pixels in S
- Connected component SFor any pixel p in S , the set of pixels in S that are connected to p
Labeling of Connected Components
- With 4-Connected Components :
r p
t
If p = 0, move to next scanning position Otherwise (p=1),
if r = t = 0, then assign a new labelif , then assign the label that is equal to 1
if r = t = 1 , and they have the same label, then assign the label
if r = t= 1 , and they have the different labels, then assign one of the labels and make a notethey are equivalent
merge the equivalent labels
0
1or
0
1
r
t
t
r
- With 8-connected components
r pts q
If p=0 then move to next positionIf p=1 then
If only one of neighbors is equal to 1 , thenassign the label.
If none of neighbors is equal to 1, thenassign a new label.
If two or more neighbor are equal to 1, andthey have different labels, then assign are of thenand make note that they are equivalent label.
Merge the equivalent labels
Relations, Equivalence, and Transitive Closure
- Binary Relation R on set A
Ex.
R = relation of 4-connected
Definitions : Equivalence Relations (a) reflexive if for each a ∈ A , aRa (b) symmetric if for each a and b ∈ A, aRb → bRa (c) transitive if for a, b, and c ∈ A, aRb and bRc → aRc
Property : If R is an equivalence relation on a set A, then A can be divided into disjoint subsets, called equivalence classes.
4321 ,,, ppppA
4
3
21
p
p
pp
13311221 ,,,,,,, ppppppppR
AAaRb
Ex.
00000
00010
10000
01000
00011
e
d
c
b
a
B
edcba
Note : reflexive relation every diagonal element = 1 symmetric relation symmetric matrix
ecbddbbaaaR ,,,,,,,,
Adjacent Matrix
- Transitive Closure of R : R+
Ex.
00000
01010
10000
01010
01011
e
d
c
b
a
B
edcba
Note : 1) bRd and dRb bRb dRb and bRd dRd2) B+ = B + BB + BBB + + (B)n
multiplication ANDaddition OR
Distance Measures
D is a distance function or metric if
2
212
21012
212
2
||||),(
distance)Block (city distance
4
4
2122
tysxqpD
D
s,t, qx,y p
tysxp,qD/
e
D(q,z)D(p,q)D(p,z)
D(p,q),D(p,q)
q) p (D(p,q)qpD
and
iff00),(
Ex) Euclidean Distance
length of the shortest path = distance in D4 and D8
length of path in m-connectivity not unique
Ex)
p
pp
pp
21
43
)1(
)1()0(
)1()0(
21
43
p
pp
pp
m-distance from p to p4 = 2
)1(
)1()0(
)1()1(
21
43
p
pp
pp
)1(
)1()1(
)1()0(
21
43
p
pp
pp
or
m-distance from p to p4 = 3
22222
21112
21012
21112
22222
t||ys||x(p,q)D
D
, max
distance) board-(chess distance
8
8
Relations, Equivalence, and Transitive Closure
- Binary Relation R on set A
AA b R a
)}p ,(p ),p,(p ),p ,(p ),p ,(p {R
p
p
pp
connected-4 ofrelation R
} p ,p ,p ,p { A
13311221
4
3
21
4321
Ex.
c R a a R b and b R a ,A c and b, a,for if ve transiti(c)
a R b b R a A, b and aeach for if symmetric (b)
a R a A, aeach for if reflexive (a)
Relations eEquivalenc : sDefinition
Property : If R is an equivalence relation on a set A , then A can be divided into & disjoint subsets, called equivalence classes
00000
00010
10000
01000
00011
e
d
c
b
a
β
edcba
MatrixAdjacent
e)}(c, b),(d, d),(b, b),(a, a),(a, { R
Note : reflexive relation every diagonal element = 1
symmetric relation symmetric matrix
Ex.
- Transitive Closure of R : R+
00000
01010
10000
01010
01011
e
d
c
b
a
β
edcba
Note : 1)
n(B) BB B B
d R d d R b and b R d
b R b b R d and d R b
2)
multiplication ANDaddition OR
Arithmetic and Logic Operations
-pixel by pixel operation :p + q p AND qp – q p OR qp * qp / q
Multiplicationpixel
Binary image
Note : Quantization of Gray-level image <pixel wise>
3} 2, 1, 0, { 255} , 1, ,0{
Ex. Some Examples of Logic Operations on Binary Images
- neighborhood oriented operation : mask operation
a
iii zwzwzwzwzw
199332211 z
w1 w2 w3
w4 w5 w6
w7 w8 w9
Computationally expensive operation 512 × 512 3 × 3 maskMultiplication 9 × 512 × 512 operationAddition 8 × 512 × 512parallel operation is needed.
- object oriented operation
Note : The complexity and parallel architecture that depends onthe operation look-up Table / SIMD / MIMD
Imaging Geometry
Some basic Transform
- Translation
0*
0*
0*
Z ZZ
Y YY
XXX
ZYX
000 ZYX *** ZYX
11000
100
010
001
1
1100
010
001
0
0
0
*
*
*
0
0
0
*
*
*
Z
Y
X
Z
Y
X
Z
Y
X
Z
Y
X
Z
Y
X
Z
Y
X
V* = T · V
X
000 ZYX
Z
Y
z
x
y
World coordinate system (X,Y,Z)
Note : Movement of object point in the same coordinate systems
Ex. ),,( )0,0,0( 000 ZYX
Change of coordinate systems for on object point
1000
100
010
001
),,(),,()0,0,0(),,(
0
0
0
1
000***
Z
Y
X
T
ZYXZYXZYX
Ex.)0,0,0(),,( )0,0,0( 1000T
TZYX
- Scaling By factors Sx, Sy, Sz along X, Y, Z axis
1000
000
000
000
z
y
x
S
S
S
S
- Rotation
Y
Z
X
rotation about z-axis
1000
0100
00cossin
00sincos
Rβ
θα
θ
θ
rotation about x-axis
1000
0cossin0
0sincos0
0001
R
rotation about y-axis
1000
0cos0sin
0010
0sin0cos
R
- Concatenation and inverse transform
AvTvSRv ))((* , where STRA
For m-points,
AVV *
V
m
- Inverse Transform
1000
100
010
001
0
0
0
1
Z
Y
X
T
1000
0100
00cossin
00sincos
1
R
Perspective Transform
y,Y
Image plane
x,X
z,Z
(X,Y,Z)
(x,y)
Lens center
Z
X
Z
Xx
Z
Y
Z
Yy
Z
Yy
Z
Xx
- Homogeneous coordinates
Z
Y
X
w h
Z
Y
X
w
11
00
0100
0010
0001
P
ZZ
Y
X
Z
Y
X
ch
11
00
0100
0010
0001
Pw h
Z
ZZ
YZ
X
Z
Y
X
c
- Inverse perspective transform
hh cw -1P
11
00
0100
0010
0001
1
P
0
y
x
c
0
0
0
h0
0
y
x
c
0
0
y
x
0
00
0
y
x
wwh
ZX
0x ZY
0y
Note : It is a useless result. It should be as follows.
z
y
x
c 0
0
0
0
0
h
z
y
x
c
Free variable
z
zz
yz
x
wz
z
y
x
cw hh
0
0
0
0
0
1-
Z
Y
X
P
z
zZ
z
yY
z
xX
0
0
0
zyY
zx
X
0
0
Note : Inverse does not uniquely exist. Therefore we introduce the free variable z
Camera Model
W in world coordinates (X,Y,Z) w in camera coordinate (x,y,z) c is image coordinate (x,y,0)
The world coordinate should be aligned with the camera coordinates (X,Y,Z)
- displacement of gimbal center form the origin
1000
100
010
001
0
0
0
Z
Y
X
G
Fig 2.18 Imaging geometry with two coordinate systems
- Pan the x-axis with respect to z-axis : θR
- Tilt the z-axis with respect to x-axis : αR
Note : and are the positive angle with respect to CCW direction α θ
- Displacement of the image plane with respect to the gimbal center
1000
100
010
001
3
2
1
r
r
r
Ch
hh
GwRPCR
PCRGwc
λrα)Z(Zθ)Y(Yαθ)X(X
rθ)Y(Yθ)X(Xλx
3000
100
cossincossinsin
sincos
3000
2000
cossincossinsin
sin)(coscoscossin
r)Z(Zθ)Y(Yαθ)X(X
rZZθ)Y(Yθ)X(Xλy
Example :
m.y
m.x.λ
λ.
.λy
λ.
.λx
0090
00070 0350
531
420531
030
(1,1,0.2)Z)Y,(X,
0.035m35mmλ 0.02mrr 0.03mr
135θ 135α
1m Zm 0Y m 0X
321
000
Fig 2.19 Camera viewing a 3-D scene
Camera Calibration
hh Awc
PCRGA
Lettering k=1 is the homogeneous representation yields
Eq.(2) 0aaaaaaaa
0aaaaaaaa
Eq.(1)
/
/
1
2444434241232221
1444434241131211
444342414
242322214
141312114
42
41
44434241
14131211
4
3
2
1
yyZxYyXZYX
xxZxYxXZYX
aZaYaXac
aZaYaXayc
aZaYaXaxc
ccy
ccx
Z
Y
X
aaaa
aaaa
c
c
c
c
h
h
h
hh
hh
h
h
h
h
Note : There are 12 unknown parameters in Eq(1) and two equation as Eq(2).
That means we need more than 6 world points and 6 imagepoints to solve the 12-parameters.
Stereo Imaging
Fig 2.21 Model of the stereo imaging process.
12
11
21
1221
22
2
11
1
x
x
XX and Z
:
:
xx
BZZXZBX
BZZ
Zx
X
Zx
X
When the first camera is coincide with the world coordinate system
When the second camera is coincide with the world coordinate system
Fig 2.22 Top view of Fig 2.21 with the first camera brought into coincidence with the world coordinate system.
Note : 1. Correspondence Problem to find Depth-Map. Area Based Matching Feature Based Matching 2. Constraints to find the Correspond- -ing points. Epipolar Constraints Ordering Constraints
Photographic Film
- Film Structure and Exposure
(ⅰ) Supercoat for protection.(ⅱ) Emulsion layer of minute silver halide crystals.(ⅲ) Substrate layer to promote adhesion of the emulsion to the film base.(ⅳ) Film base made of cellulose triacetate.(ⅴ) Backing layer to prevent curling.
Light energy the grain containing tiny patches of metallic silver (development centers)Developing : The single development center in a silver halide
grain can participate the change of the entire grain to metallic silver.
Chemical removal of the remaining silver halide grains(opaque)Negative Film.
Light energy negative filmpaper coated silver halide(positive image)
- Film Characteristics
Contrast
Exposal : E = IT ( Energy per unit area) I = Incident Intensity T = Duration of Exposal
Note : As the slope of linear region increases, the contrast of film is increased.
2.0
1.0
0.0
Toe
Linearregion
Shoulder
Densi
ty
Grossfog
tan α = γ
α
log EFig 2.24 A typical H & D curve.
Speed : (감광도 )
To determine how much light is needed to produce a certain of silver on development.The lower the speed, the longer the film must be exposed to record a given image.
Note : ASA scale ASA 200 is twice as fast (and for a given subject requires
half as much exposure) as a film of ASA 100.
ASA PURPOSE
ASA 80~160 General purpose outdoor and some indoor photography
ASA 20~64 Fine grain film for maximum image definition
ASA 200~600
High speed films for poor light and indoor photography
ASA 650~ Ultra-speed films for very poor light
Graininess
-Fast film (large ASA number) has the large graininess.-Slow film (small ASA number) is preferable where fine detail is desired or where enlargement of the negatives is necessary.
Resolving power
-Depends on the graininess, on the light scattering properties of the emulsion, and on the contrast with which the film reproduces fine details.
Note : Fine-grain films with thin emulsions yields the highest resolving power.
Diaphragm ( 조리개 ) and Sutter Speed
Diaphragm : f-number or stop number
32} 22, 16, 11, 8, 5.6, 4, 2.8, 2, {1.4,
Note : ⅰ) f-number is inversely proportional to the amount of light admitted.
ⅱ) Each setting admits twice as much light as the next higher f-number (this giving twice as much exposure)
Speed : } sec 10001,500
1,1251 ,60
1 ,301 ,15
1 ,81 ,4
1 ,21 {1,
Note : ⅰ) The faster the shutter speed, the shorter the exposure time obtained.
ⅱ) For the same exposure,
601 with 5.6
f 1251 with 4
f 2501 with 2.8
f
Field of View
cf d
w
d
wf c
d
w
f
c
Ex.
pixelCm
3
1 m
300
1
103
cellm 10
1001
1 w'
cells, 100100 hasarray CCD If
m 3
1
103
10 1
f
cd w
m 1 d
m10 3 3Cm f
m10 m10 cc
2
2
2-
2-
2-
-2-2
FOV
Depth of Field
z′ -z
Optical Origin
DOFImage plane
Object
LensFocal length = f
z′: camera constant
Lens equation :
fzz
111
(distance from the optical origin to image plane)
i)
ii)
fz z then ,
1
or )(
)(
111
zf
fz
fz
zfz
z)f(
fz)(
fz
fz
zfz
iii) If an object is focused at distance (-z), then the other lights from other distance of objects may not be focused at They will make several pixels to be sensitized. DOF is defined the margin of the distance in (-z) that limits the sensitized pixel within one CCD element.
Note :
z
View Volume
Homework : 2.4, 2.5, 2.10, 2.13, 2.16, 2.17
Due :
imageplane
lens
DOF
FOV
View volume = DOF FOVx