1. There are different relationships between pixels including neighborhood, adjacency, connectivity, and paths.
2. Neighborhood refers to the pixels surrounding a given pixel. Adjacency means two pixels are connected based on a similarity criterion.
3. Connectivity determines if pixels are adjacent in a certain sense like 4-connected or 8-connected based on their neighborhoods.
3. 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 N4(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 ND(P).
• Each of them are at Euclidean distance of 1.414 from P.
4. The points ND(P) and N4(P) are together known as 8-
neighbors of the point P, denoted by N8(P).
Some of the points in the N4, ND and N8may fall outside
image when P lies on the border of image.
a. 4-neighborsof a pixel p are
its vertical and horizontal
neighbors denoted by N4(p)
b. 8-neighborsof a pixel p are
its vertical horizontal and
4 diagonal neighbors denoted by N8(p).
5. 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 be set of gray levels values used to define
adjacency.
4-adjacency: Two pixels pand qwith values from V are 4-
adjacent ifq is in the set N4(p).
8-adjacency: Two pixels pand qwith values from V are 8-
adjacent if q is in the set N8(p).
6. m-adjacency: Two pixels pand qwith values from V are m-
adjacent if,
–q is in N4(P).
–q is in ND(p) and the set [ ] is empty (has no pixels
whose values are from V).
Connectivity :
• To determine whether the pixels are adjacent in some
sense.
• Let V be the set of gray-level values used to define
connectivity; then Two pixels p, q that have values from
the set V are:
7. a. 4-connected,if q is in the set N4(p)
b. 8-connected,if q is in the set N8(p)
c. m-connected,iff
i. q is in N4(p) or
ii. q is in ND(p) and the set Is empty
8. Pixel p is adjacentto pixel q
if they are connected.
Two image subsetsS1and
S2 are adjacent if some pixel
in S1is adjacent to some pixel in S2.
Paths & Path lengths:
• A pathfrom pixel p with
coordinates (x, y)to pixel q
with coordinates (s, t)is a sequence of distinct pixels with
coordinates:
(x0, y0), (x1, y1), (x2, y2) ... (xn, yn),
where (x0, y0)=(x, y)and (xn, yn)=(s, t); (xi, yi)is
adjacentto(xi-1, yi-1) .
9. Here n is the length of the path .We can define 4-, 8-, and
m-paths based on type of adjacency used.
Connected Components:
• If p and q are pixels of an image subset S then p is
connected to q in S if there is a path from p to q
consisting entirely of pixels in S.
• For every pixel pin S, the set of pixels in S that are
connected to p is called a connected component of S.
• If S has only one connected component then S is
called Connected Set.
10. Regions and Boundaries:
A subset R of pixels in an image is called a Regionof the
image if R is a connected set.
The boundaryof the region R is the set of pixels in the
region that have one or more neighbors that are not in R.
If R happens to be entire Image?
Distance measures:
Given pixels p, q and z with coordinates (x, y), (s, t), (u,
v)respectively, the distance function D has following
properties:a.
11. a.D(p, q) 0 [D(p, q) = 0, iff p = q]
b. D(p, q) = D(q, p)
c. D(p, z) D(p, q) + D(q, z)
The following are the different Distance measures:
a.Euclidean Distance : De(p, q) = [(x-s)2 + (y-t)2]
b. City Block Distance: ÆD4(p, q) = |x-s| + |y-t|
c. Chess Board Distance: ÆD8(p, q) = max(|x-s|, |y-t|)
12. Color Fundamentals:
Colors are seen as variable combinations of the
primary colors of light :red (R), green (G), and blue (B).
The primary colors can be mixed to produce the secondary
colors: magenta (red+blue), cyan (green+blue), and
yellow (red+green).Mixing the three primaries, or a
secondary with its opposite primary color, produces white
light.
13. RGBcolors are used for color TV, monitors, and video
cameras.
However, the primary colors of pigments
arecyan(C),magenta(M),and yellow(Y), and the secondary
colors are red, green, and blue.A proper combination of
the three pigment primaries, or a secondary with its
opposite primary, produces black.
14. Color Models:
The purpose of a color model is to facilitate the
specification of colors in some standard way. A color
model is a specification of a coordinate system and a
subspace within that system where each color is
represented by a single point. Color models most
commonly used in image processing are:
RGB model for color monitors and video cameras.
CMY and CMYK (cyan, magenta, yellow, black)
models for color printing.
HSI (hue, saturation, intensity) model.
15. The RGB color model:
In this model, each color appears in its primary colors red,
green, and blue. This model is based on a Cartesian
coordinate system. The color subspace is the cube shown
in the figure below. The different colors in this model are
points on or inside the cube, and are defined by vectors
extending from the origin.
16. All color values R, G, and B have been normalized in the
range [0, 1].However, we can represent each of R, G, and
B from 0 to 255. Each RGB color image consists of three
component images, one for each primary color as shown
in the figure below. These three images are combined on
the screen to produce a color image.
17. The CMY and CMYK color model Cyan, magenta, and
yellow are the primary colors of pigments. Most printing
devices such as color printers and copiers require CMY
data input or perform an RGB to CMY conversion
internally.
18. The HIS color model:
The RGB and CMY color models are not suited for
describing colors in terms of human interpretation. When
we view a color object, we describe it by its hue,
saturation, and brightness(intensity). Hence the HSI color
model has been presented.
The HSI model decouples the intensity component from
the color-carrying information (hue and saturation) in a
color image. As a result, this model is an ideal tool for
developing color image processing algorithms.
19. The hue, saturation, and intensity values can be obtained
from the RGB color cube.
That is, we can convert any RGB point to a corresponding
point is the HSI color model by working out the
geometrical formulas.