Unit-I Pixel Connectivity
Unit-I Pixel Connectivity
Neighbors of a pixel
Adjacency
V: set of gray level values (L), (V is a subset of L.)
3 types of adjacency
A digital path
A digital path from pixel p with coordinates
(x,y) to pixel q with coordinates (s,t) is a
sequence of distinct pixels with coordinates
(x0,y0), (x1,y1), …, (xn,yn), where
(x0,y0)= (x,y) and (xn,yn)=(s,t), and
pixels (xi,yi) and (xi-1,yi-1) are adjacent
for 1 ≤ i ≤ n.
Connectivity
S: a subset of pixels in an image.
Two pixels p and q are said to be
connected in S if there exists a path
between them consisting entirely of
pixels in S.
For any pixel p in S, the set of pixels
that are connected to it in S is called a
connected component of S.
Ch3: Some basic Relationships between pixels
Distance measures
If we have 3 pixels: p,q,z respectively
p with (x,y)
q with (s,t)
z with (v,w)
Then:
A. D (p,q) ≥ 0 ,D(p,q) = 0 iff p = q
B. D(p,q) = D(q,p)
C. D(p,z) ≤ D(p,q) + D(q,z)
Ch3: Some basic Relationships between pixels
Distance measures
Euclidean distance between p and q:
De(p,q) = [(x-s)2 + (y-t)2]1/2
: Example
Use the city block distance to prove 4-
? neighbors 3 2 1
1
d
Pixel A : | 2-2| + |1-2| = 1 2
c p a
Pixel B: | 3-2|+|2-2|= 1
3 b
Pixel C: |2-2|+|2-3| =1
Pixel D: |1-2| + |2-2| = 1