Wednesday, 25 February 2015

Pixels

Neighbors of a Pixel

  •  Any pixel p(x, y) has two vertical and two horizontal neighbors, given by (x+1, y), (x-1, y), (x, y+1), (x, y-1)
  •  This set of pixels are called the 4-neighbors of P, and is denoted by N 4 (P). Each of them are at a unit distance from P.
  •  The four diagonal neighbors of p(x,y) are given by, (x+1, y+1), (x+1, y-1), (x-1, y+1), (x-1 ,y-1).This set is denoted by N D (P).
  • The points N D (P) and N 4 (P) are together known as 8-neighbors of the point P, denoted by N 8 (P).
  • Some of the points in the N 4 , N D and N 8 may fall outside image when P lies on the border of image.

  • (a) 4-adjacency. Two pixels p and q with values from V are 4-adjacent if q is in the set N 4 (p).
  • (b) 8-adjacency. Two pixels p and q with values from V are 8-adjacent if q is in the set N 8 (p). 
  • (c) m-adjacency (mixed adjacency). Two pixels p and q with values from V are m-adjacent if (i) q is in N 4 (p), or (ii) q is in N D (p) and the set N 4 (p)  ̈ N 4 (q) has no pixels whose values are from V.

No comments:

Post a Comment