Relationship between pixels
Relationship between pixels
Relationship between pixels
Relationship between pixels
• Adjacency
• Two pixels are connected if they are neighbors and their
gray levels satisfy some specified criterion of similarity.
• For example, in a binary image two pixels are connected if
they are 4-neighbors and have same value (0/1)
• Let v: a set of intensity values used to define adjacency and
connectivity.
• In a binary Image v={1}, if we are referring to adjacency of
pixels with value 1.
• In a Gray scale image, the idea is the same, but v typically
contains more elements, for example v= {180, 181,
182,....,200}.
• If the possible intensity values 0 to 255, v set could be any
subset of these 256 values.
Relationship between pixels
• Types of adjacency
• 1. 4-adjacency: Two pixels p and q with values
from v are 4-adjacent if q is in the set N4 (p).
• 2. 8-adjacency: Two pixels p and q with values
from v are 8-adjacent if q is in the set N8 (p).
• 3. m-adjacency (mixed): two pixels p and q with
values from v are m-adjacent if:
– q is in N4 (p) or
– q is in ND (P) and
– The set N4 (p) ∩ N4 (q) has no pixel whose values are
from v (No intersection).
Relationship between pixels
• Mixed adjacency is a modification of 8-adjacency
''introduced to eliminate the ambiguities that often
arise when 8- adjacency is used. (eliminate multiple
path connection)
• Pixel arrangement as shown in figure for v= {1}
Relationship between pixels
• Path
• A digital path (or curve) from pixel p with
coordinate (x,y) to pixel q with coordinate (s,t) is
a sequence of distinct pixels with coordinates
(x0 , y0 ), (x1 , y1 ), ..., (xn , yn )
• where (x
where (x0
0 , y
, y0
0 ) = (x,y), (x
) = (x,y), (xn
n , y
, yn
n )= (s,t)
)= (s,t)
• (xi , yi ) is adjacent pixel (xi-1 , yi -1) for 1≤j≤n ,
• n- The length of the path.
• If (x0 , y0 ) = (xn , yn ):the path is closed path.
• We can define 4- ,8- , or m-paths depending on
the type of adjacency specified.
Relationship between pixels
Relationship between pixels
Relationship between pixels
Relationship between pixels
Relationship between pixels
Relationship between pixels
• D4 distance
Relationship between pixels

Relationship between adjacent pixels in an image

  • 1.
  • 2.
  • 3.
  • 4.
    Relationship between pixels •Adjacency • Two pixels are connected if they are neighbors and their gray levels satisfy some specified criterion of similarity. • For example, in a binary image two pixels are connected if they are 4-neighbors and have same value (0/1) • Let v: a set of intensity values used to define adjacency and connectivity. • In a binary Image v={1}, if we are referring to adjacency of pixels with value 1. • In a Gray scale image, the idea is the same, but v typically contains more elements, for example v= {180, 181, 182,....,200}. • If the possible intensity values 0 to 255, v set could be any subset of these 256 values.
  • 5.
    Relationship between pixels •Types of adjacency • 1. 4-adjacency: Two pixels p and q with values from v are 4-adjacent if q is in the set N4 (p). • 2. 8-adjacency: Two pixels p and q with values from v are 8-adjacent if q is in the set N8 (p). • 3. m-adjacency (mixed): two pixels p and q with values from v are m-adjacent if: – q is in N4 (p) or – q is in ND (P) and – The set N4 (p) ∩ N4 (q) has no pixel whose values are from v (No intersection).
  • 6.
    Relationship between pixels •Mixed adjacency is a modification of 8-adjacency ''introduced to eliminate the ambiguities that often arise when 8- adjacency is used. (eliminate multiple path connection) • Pixel arrangement as shown in figure for v= {1}
  • 7.
    Relationship between pixels •Path • A digital path (or curve) from pixel p with coordinate (x,y) to pixel q with coordinate (s,t) is a sequence of distinct pixels with coordinates (x0 , y0 ), (x1 , y1 ), ..., (xn , yn ) • where (x where (x0 0 , y , y0 0 ) = (x,y), (x ) = (x,y), (xn n , y , yn n )= (s,t) )= (s,t) • (xi , yi ) is adjacent pixel (xi-1 , yi -1) for 1≤j≤n , • n- The length of the path. • If (x0 , y0 ) = (xn , yn ):the path is closed path. • We can define 4- ,8- , or m-paths depending on the type of adjacency specified.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.