0% found this document useful (0 votes)
22 views9 pages

Problems (Part 2) - Some Basic Relationships Between Pixels

Uploaded by

biju.lukose70
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views9 pages

Problems (Part 2) - Some Basic Relationships Between Pixels

Uploaded by

biju.lukose70
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

CS401

COMPUTER GRAPHICS

Problems (Part 2) - Some Basic


Relationships Between Pixels
Module VI
Consider the image segment shown below.
a. Let V = {0,1}. Compute the lengths of the
shortest 4-, 8-, and m-path between p and q.

b. Repeat for V = {1,2}

3 1 2 1 (q)
0 2 0 2
1 2 1 1
(p) 1 0 1 2
2
(a) V = {0,1}

4-path between p and q :


A 4-path between p and q does not exist.

3 1 2 1 (q)
0 2 0 2
stuck stuck

1 2 1 1
(p) 1 0 1 2
3
(a) V = {0,1}
A 4-path from pixel p with coordinates (3, 0) to pixel
q with coordinates (0,3) does not exist as it is not
possible to determine a sequence of distinct pixels
with coordinates
(x0, y0), (x1, y1), . . . , (xn, yn)
where (x0, y0) = (3,0), (xn, yn) = (0,3) such that the
pixels (xi, yi) and (xi-1, yi-1) are 4-adjacent for 1 ≤ i ≤
n and that all pixels (xi, yi) have values from V ={0,1}
for 0 ≤ i ≤ n.

4
(a) V = {0,1}

8-path between p and q:


length of the shortest 8-path between p and q = 4

3 1 2 1 (q)
0 2 0 2
1 2 1 1
(p) 1 0 1 2
5

*All possible 8-paths are not shown.


(a) V = {0,1}

m-path between p and q:


length of the shortest m-path between p and q = 5

3 1 2 1 (q)
0 2 0 2
1 2 1 1
(p) 1 0 1 2
6
(b) V = {1,2}

4-path between p and q :


length of the shortest 4-path between p and q = 6

3 1 2 1 (q)
0 2 0 2
1 2 1 1
(p) 1 0 1 2
7

*All possible 4-paths are not shown.


(b) V = {1,2}

8-path between p and q:


length of the shortest 8-path between p and q = 4

3 1 2 1 (q)
0 2 0 2
1 2 1 1
(p) 1 0 1 2
8

*All possible 8-paths are not shown.


(b) V = {1,2}

m-path between p and q:


length of the shortest m-path between p and q = 6

3 1 2 1 (q)
0 2 0 2
1 2 1 1
(p) 1 0 1 2
9

*All possible m-paths are not shown.

You might also like