Mod 4-part 3
RELATIONSHIP BETWEEN PIXELS:
• A pixel p at coordinates (x,y) has four
horizontal and vertical neighbors whose
coordinates are given by:
(x+1,y), (x-1, y), (x, y+1), (x,y-1)
• This set of pixels, called the 4-neighbors or p,
is denoted by N4(p).
• Each pixel is one unit distance from (x,y) and
some of the neighbors of p lie outside the
digital image if (x,y) is on the border of the
image.
The four diagonal neighbors of p have
coordinates and are denoted by ND (p).
(x+1, y+1), (x+1, y-1), (x-1, y+1), (x-1, y-1)
These points, together with the 4-neighbors, are called the
8-neighbors of p, denoted by N8 (p).
As before, some of the points in ND (p) and N8 (p) fall
outside the image if (x,y) is on the border of the image.
ADJACENCY AND CONNECTIVITY
• Let v be the set of gray –level values used to
define adjacency, in a binary image, v={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 – 255, V set can
be any subset of these 256 values. if we are
reference to adjacency of pixel with value.
• Three types of adjacency
• 4- Adjacency – two pixel P and Q with value
from V are 4 –adjacent if A is in the set N4(P)
• 8- Adjacency – two pixel P and Q with value
from V are 8 –adjacent if A is in the set N8(P)
• M-adjacency –two pixel P and Q with value
from V are m – adjacency if (i) Q is in N4(p) or
(ii) Q is in ND(q) and the set N4(p) ∩ N4(q) has
no pixel whose values are from V.
• Mixed adjacency is a modification of
8-adjacency. It is introduced to eliminate the
ambiguities that often arise when 8-adjacency
is used.
• For example:
Fig:1.8(a) Arrangement of pixels; (b) pixels that are 8-adjacent
(shown dashed) to the center pixel; (c) m-adjacency.
Types of Adjacency:
• In this example, we can note that to connect between
two pixels (finding a path between two pixels):
– In 8-adjacency way, you can find multiple paths between
two pixels
– While, in m-adjacency, you can find only one path between
two pixels
• So, m-adjacency has eliminated the multiple path
connection that has been generated by the
8-adjacency.
• Two subsets S1 and S2 are adjacent, if some pixel in S1 is
adjacent to some pixel in S2. Adjacent means, either 4-,
8- or m-adjacency.
Connectivity:Let S represent a subset of pixels in an
image, two pixels p and q are said to be connected
in S if there exists a path between them consisting
entirely of pixels in S.
– For any pixel p in S, the set of pixels that are
connected to it in S is called a connected
component of S. If it only has one connected
component, then set S is called a connected set.