Yinghua He
School of Computer Science and Technology
Tianjin University
Elements of Visual perception
Image Sensing and Acquisition
Image Sampling and Quantization
Some basic relationships between pixels
Elements of Visual perception
Image Sensing and Acquisition
Image Sampling and Quantization
Some basic relationships between pixels
A simple Image Formation Model
f(x,y)
The amount of source illumination incident on the scene being viewed
• Illumination components: i(x,y)
The amount of illumination reflected by the objects in the scene
• reflectance components: r(x,y)
f(x,y)=i(x,y)r(x,y)
Gray level (l)
The interval[L min
, L max
] is called the gray scale.
The intensity of a monochrome image at any coordinates (x
0
,y
0
) the gray level(l) of the image at that point.
Elements of Visual perception
Image Sensing and Acquisition
Image Sampling and Quantization
Some basic relationships between pixels
Sampling:
Digitizing the coordinate values is called sampling.
Quantization
Digitizing the amplitude values is called quantization.
Representing digital images
f ( x , y )
=
⎢
⎢
⎡
⎢
⎢
⎣ f f f
( M
⋅
( 0 , 0 )
( 1 , 0 )
−
⋅⋅
1 , 0 ) f ( 0 , 1 ) f ( f ( 1 , 1 )
M
⋅ ⋅⋅
−
1 , 1 )
⋅
⋅
⋅
⋅
⋅⋅
⋅⋅
⋅⋅
⋅⋅ f f f
( M
( 0 ,
( 1 ,
⋅
N
N
−
1 ,
⋅⋅
−
−
N
1
1 )
)
−
1 ) ⎦
⎥
⎥
⎤
⎥
⎥
The number of gray levels typically is an integer power of 2:
L=2 k
The number,b, of bits required to store a digitized image is: b=M*N*k
Elements of Visual perception
Image Sensing and Acquisition
Image Sampling and Quantization
Some basic relationships between pixels
4-neighbors of p, N
4
(p)
(x+1,y), (x-1,y), (x,y+1), (x,y-1)
8-neighbors of p, N
8
(p)
Add N
D
(p)
(x+1,y+1), (x+1,y-1), (x-1,y+1),(x-1,y-1)
Three types of adjacency
4-adjacency.
Two pixels p and q with values from V are 4adjacent if q is in the set N
4
(p).
8-adjacency.
Two pixels p and q with values from V are 8adjacent if q is in the set N
8
(p).
m-adjacency(mixed adjacency).
Two pixels p and q with values from V are madjacent if
(i) q is in N
4
(p) , or
(ii) q is in N
D
(p) and the set has no
4 pixels whose values are from V.
4 q
A path from pixel p with coordinates (x,y) to pixel q with coordinates (s,t) is a sequence of distinct pixels with coordinates:
(x
0
,y
0
), (x
1
,y
1
), …., (x n
,y n
)
N is the length of the path.
Region: We call R a region of the image if
R is a connected set.
Boundary: The boundary of a region R is the set of pixels in the region that have one or more neighbors that are not in R.
Distance Measures
For pixels p,q, and z, with coordinates(x,y),
(s,t), and (v,w), respectively, D is a distance function or metric if
(a) D(p,q)>=0 (D(p,q)=0 iff p=q),
(b) D(p,q)=D(q,p), and
(c) D(p,z)<=D(p,q)+D(q,z).
The Euclidean distance between p and q is defined as
D e
( p , q )
=
[
( x
− s
) ( y
− t
)
2
1
]
2
The D4 distance between p and q is defined as
D
4
( p , q )
= x
− s
+ y
− t
The D8 distance between p and q is defined as
D
8
( p , q )
= max( x
− s , y
− t )
The pixels with D
4 distance <=2 from (x,y) from the following contours of constant distance:
2
2 1 2
2 1 0 1 2
2 1 2
2
The pixels with D
8 distance <=2 from (x,y) from the following contours of constant distance:
2 2 2 2 2
2 1 1 1 2
2 1 0 1 2
2 1 1 1 2
2 2 2 2 2