Relationships between pixels (Neighbors
Adjacency andConnectivity)
An image is denoted by f(x,y) and p,q are used to represent individual pixels of the image.
Neighbours of a pixel
The Surrounding pixels of any pixel is called its Neighbour Pixels.
There are three types of Neighbour Pixels:
Adjacency between pixels
Let V be the set of intensity values used to define adjacency.
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 set V typically contains more elements.
For example, in the adjacency of pixels with a range of possible intensity values 0 to 255,
set V could be any subset of these 256 values.
We consider three types of adjacency:
a) 4-adjacency: Two pixels p and q with values from V are 4-adjacent if q is in the set
N4(p).
b) 8-adjacency: Two pixels p and q with values from V are 8-adjacent if q is in the set
N8(p).
c) m-adjacency (mixed adjacency): Two pixels p and q with values from V are
m-adjacent if
1. q is in N4(p), or
2. 2) q is in ND(p) and the set N4(p)∩N4(q) has no pixels whose values are from V.
Connectivity between pixels
It is an important concept in digital image processing.
It is used for establishing boundaries of objects and components of regions in an image.
Two pixels are said to be connected:
if they are adjacent in some sense (neighbor pixels,4/8/m-adjacency)
if their gray levels satisfy a specified criterion of similarity (equal intensity level)
There are three types of connectivity on the basis of adjacency. They are:
a) 4-connectivity: Two or more pixels are said to be 4-connected if they are 4-adjacent
with each other’s.
b) 8-connectivity: Two or more pixels are said to be 8-connected if they are 8-adjacent
with each other’s.
c) m-connectivity: Two or more pixels are said to be m-connected if they are m-adjacent
with each other’s.
Regions and Boundaries
• A subset R of pixels in an image is called a Region of the image if R is a
connected set.
• The boundary of the region R is the set of pixels in the region that have one or
more neighbors that are not in R.