Objectives
Numericals problems on:
  Path between pixels
  Ajacencey between pixels
  Distance between pixels
According to the following intensity values of a 5*5 image, show the paths by drawing
dashed lines for 4-adjacency,8-adjacency and m-adjaceny.
                                        58342
                                        48713
                                        36183
 Let V={1,2,3}                          82361
                                        24693
For a given 6*6 matrix show the shortest 4-
path, 8-path, m-path between the shaded
pixels.
Let V={0,1}
Consider two image subset S1 and S2. For V={0}, determine whether the regions are
  4-adjacent
  8-adjacent
  m-adjacent
                   S1                  S2
          1    1    1   1     1    1        0   0
          1    1    0   1     1    0        1   1       The S1 and S2 are 8-adjacent
          1    1    0   1     0    0        1   1
                                                        and m-adjacent.
          1    0    0   0     1    1        1   1
An image segment is shown below. Let V be the set of gray levels values used to define
connectivity in the image. Compute D4 (city block) , D8 (chess bord) , and Dm distances
  V = {2,3}
  V = {2,6}
                                     The D4 and D8 distances between p and q are
                                     independent of any paths that might exist between
  2 (p) 3     2   6   1              the points because these distances involve only the
                                     coordinates of the points.
  6     2     3   6   2              D4 (p,q)= 8 units
  5     3     2   3   5              D8 (p,q)= 4 units
  2     4     3   5   2
                                      Dm(p,q):
  4     5     2   3   6 (q)           First find the m-path.
                                      For V={2,3}, there is no m-path exist between p and
                                      q. Dm is not possible.
                                      For V={2,6}, there is no m-path exist between p and
                                      q. Dm is not possible.
An image segment is shown below. Let V be the set of gray levels values used to define
connectivity in the image. Compute De(Euclidean), D4, D8, and Dm distances between
    V = {0,1}
    V = {1,2}
3       1    2    1 (q)             D4 (p,q)= 6 units
0       2    0    2
                                    D8 (p,q)= 3 units
1       2    1    1
1 (p) 0      1    2
                                     Dm(p,q):
                                     First find the m-path.
    De (p,q)= 3   units
                                     For V={0,1}, Dm(p,q)=5 units
                                     For V={1,2}, Dm(p,q)=6 units