Digital Image Processing3
Digital Image Processing3
Code : CSE7001
Piyush Vashistha
Assistant Professor
f(x, y)
Basic Relationship between Pixels
A pixel p at location (x,y) has two horizontal and two
vertical neighbors.
V = {1}
Fig (b) shows the ambiguity in 8-adjacency
Path
A (digital) path (or curve) from pixel p with coordinates
(x0, y0) to pixel q with coordinates (xn, yn) is a sequence of
distinct pixels with coordinates
(x0, y0), (x1, y1), …, (xn, yn)
Where (xi, yi) and (xi-1, yi-1) are adjacent for 1 ≤ i ≤ n.
Here n is the length of the path.
If (x0, y0) = (xn, yn), the path is closed path.
We can define 4-, 8-, and m-paths based on the type of
adjacency used.
Connectivity
Connected in S
Let S represent a subset of pixels in an image. Two pixels
p with coordinates (x0, y0) and q with coordinates (xn, yn)
are said to be connected in S if there exists a path
2. D(p, q) = D(q, p)
3 1 2 1 (q)
2 2 0 2
1 2 1 1
(p) 1 0 1 2
3 1 2 1 (q)
2 2 0 2
Problems … 1 2 1 1
(p) 1 0 1 2
3. Consider the image segment shown
a) When V = {0,1}, 4-path does not exist between p and q
because it is impossible to get from p to q by traveling along
points that are both 4-adjacent and also have values from V .