Chapter-4
PART-2
Basic Pixel Relationships
Connectivity
• Two pixels are connected if:
• They are neighbors (i.e. adjacent in some sense -- e.g. N4(p), N8(p), …)
• Their gray levels satisfy a specified criterion of similarity (e.g. equality, …)
• V is the set of gray-level values used to define adjacency (e.g. V={1}
for adjacency of pixels of value 1)
Adjacency
• We consider three types of adjacency:
• V is the set of gray-level values used to define adjacency (e.g. V={1}
for adjacency of pixels of value 1)( the matrix considered for binary
image so it has 0 and 1)
• 4-adjacency: two pixels p and q with values from V are 4-adjacent if q is in the
set N4(p)
• 8-adjacency : p & q are 8- adjacent if q is in the set N8(p)
1
0
0
0
1
0
1
1
0
1
0
0
0
1
0
1
1
0
4-Adjacency 8-Adjacency
p
q
Adjacency
• The third type of adjacency:
• m-adjacency: p & q with values from V are m-adjacent if
• q should be in N4(p) or
• q should be in ND(p) and the set N4(p)N4(q) has no pixels with values from V
1
0
0
0
1
0
1
1
0
m-Adjacency
Adjacency
• Mixed adjacency is a modification of 8-adjacency and is used to
eliminate the multiple path connections that often arise when 8-
adjacency is used.
1
0
0
0
1
0
1
1
0
1
0
0
0
1
0
1
1
0
4-Adjacency 8-Adjacency m-Adjacency
1
0
0
0
1
0
1
1
0
Digital path
• Line connecting the pixel is called digital path
1
0
0
0
1
0
1
1
0
Digital path
Connectivity
• For any pixel p and q in in a set of pixels ,S(subset of pixels) , the set of
pixels in S that are connected to p and q through digital path is called
connectivity.
• If S has only one connected component then S is called a connected
set.
Digital path
• Connectivity in a subset S of an image
• – Two pixels are connected if there is a path between them that lies
completely within S
• Connected Component
• – The set of all pixels in S that are connected to a given pixel
• Connected Set
• – If S has only one connected component
Region
• The connectivity gives rise to another concept of
region (R ).
• Region is nothing but a subset of pixels which are
connected. Or connected set of pixels is called
region.
• Ri and Rj are two joint sets and they are adjacent
to each other. They are connected by 8-
adjacency marked(both diagonals are 1) in red
(fig-1). The joint set gives rise to back ground of
image.
• Ri and Rj are not connected marked in red arrow
(as there is 0 and 1 in diagonal )are called the
disjoint sets, This disjoint sets gives rise to fore
ground of image.
1
0
0
0
1
0
1
1
0
1
0
0
0
1
0
1
1
0
Ri
Rj
Boundary
• It is defined as that the boundary will be having at least one set of
pixels from back ground of the image or edge.
• Edge can be the region boundary (in binary images)
• Its boundary (border, contour) is the set of pixels in R that have at
least one neighbor not in R.
Back ground
Foreground
Edge boundary
• If a region corresponds to the whole image, 1st and last rows &
columns are treated as boundary
• Difference
• – Edges Intensity Discontinuities
• – Boundaries Closed Path
Distance Measures
• For pixels p,q,z with coordinates (x,y), (s,t), (u,v), D is a distance
function or metric if the three conditions satisfies:
• D(p,q) ≥ 0 [D(p,q)=0 iff p=q( if p and q are located at same position)]
• D(p,q) = D(q,p) (if distance between p and q are equal) and
• D(p,z) ≤ D(p,q) + D(q,z)
Distance Measures
• Euclidean distance:
• De(p,q) = [(x-s)2 + (y-t)2]1/2
• Points (pixels) having a distance less than or equal to r from (x,y) are
contained in a disk of radius r centered at (x,y).
Distance Measures
• D4 distance (city-block distance):
• D4(p,q) = |x-s| + |y-t|
• forms a diamond centered at (x,y)
• e.g. pixels with D4≤2 from p
2
2
1
2
2
1
0
1
2
2
1
2
2
D4 = 1 are the 4-neighbors of p
Distance Measures
• D8 distance (chessboard distance): ( Like a king moves 8-ways in chess
board)
• D8(p,q) = max(|x-s|,|y-t|)
• Forms a square centered at p
• e.g. pixels with D8≤2 from p
2
2
2
2
2
2
1
1
1
2
2
1
0
1
2
2
1
1
1
2
2
2
2
2
2
D8 = 1 are the 8-neighbors of p
Distance Measures
• D4 and D8 distances between p and q are independent of any paths
that exist between the points because these distances involve only
the coordinates of the points (regardless of whether a connected path
exists between them).
Distance Measures
• However, for m-connectivity the value of the distance (length of path)
between two pixels depends on the values of the pixels along the
path and those of their neighbors.
Interpolation
• Required in image resizing such as shrinking
and zooming
• Using known data to estimate data at
unknown points
Morphing
Images
Image formation
Electromagnetic (EM) energy spectrum
Weeks 1 & 2
Major uses
Gamma-ray imaging: nuclear medicine and astronomical observations
X-rays: medical diagnostics, industry, and astronomy, etc.
Ultraviolet: lithography, industrial inspection, microscopy, lasers, biological imaging,
and astronomical observations
Visible and infrared bands: light microscopy, astronomy, remote sensing, industry,
and law enforcement
Microwave band: radar
Radio band: medicine (such as MRI) and astronomy
First photograph
• First photograph due to Niepce,
• First on record shown - 1822
• Basic abstraction is the pinhole camera
• First successful commercial
photograph due to Eastman in late
19th
First digital picture
chapter_4_1ST_PART_BASIC_RELATION_OF_PIXELSchapter_2_dip_5th_sem.pdf

chapter_4_1ST_PART_BASIC_RELATION_OF_PIXELSchapter_2_dip_5th_sem.pdf

  • 1.
  • 2.
  • 3.
    Connectivity • Two pixelsare connected if: • They are neighbors (i.e. adjacent in some sense -- e.g. N4(p), N8(p), …) • Their gray levels satisfy a specified criterion of similarity (e.g. equality, …) • V is the set of gray-level values used to define adjacency (e.g. V={1} for adjacency of pixels of value 1)
  • 4.
    Adjacency • We considerthree types of adjacency: • V is the set of gray-level values used to define adjacency (e.g. V={1} for adjacency of pixels of value 1)( the matrix considered for binary image so it has 0 and 1) • 4-adjacency: two pixels p and q with values from V are 4-adjacent if q is in the set N4(p) • 8-adjacency : p & q are 8- adjacent if q is in the set N8(p) 1 0 0 0 1 0 1 1 0 1 0 0 0 1 0 1 1 0 4-Adjacency 8-Adjacency p q
  • 5.
    Adjacency • The thirdtype of adjacency: • m-adjacency: p & q with values from V are m-adjacent if • q should be in N4(p) or • q should be in ND(p) and the set N4(p)N4(q) has no pixels with values from V 1 0 0 0 1 0 1 1 0 m-Adjacency
  • 6.
    Adjacency • Mixed adjacencyis a modification of 8-adjacency and is used to eliminate the multiple path connections that often arise when 8- adjacency is used. 1 0 0 0 1 0 1 1 0 1 0 0 0 1 0 1 1 0 4-Adjacency 8-Adjacency m-Adjacency 1 0 0 0 1 0 1 1 0
  • 7.
    Digital path • Lineconnecting the pixel is called digital path 1 0 0 0 1 0 1 1 0 Digital path
  • 8.
    Connectivity • For anypixel p and q in in a set of pixels ,S(subset of pixels) , the set of pixels in S that are connected to p and q through digital path is called connectivity. • If S has only one connected component then S is called a connected set. Digital path
  • 9.
    • Connectivity ina subset S of an image • – Two pixels are connected if there is a path between them that lies completely within S • Connected Component • – The set of all pixels in S that are connected to a given pixel • Connected Set • – If S has only one connected component
  • 10.
    Region • The connectivitygives rise to another concept of region (R ). • Region is nothing but a subset of pixels which are connected. Or connected set of pixels is called region. • Ri and Rj are two joint sets and they are adjacent to each other. They are connected by 8- adjacency marked(both diagonals are 1) in red (fig-1). The joint set gives rise to back ground of image. • Ri and Rj are not connected marked in red arrow (as there is 0 and 1 in diagonal )are called the disjoint sets, This disjoint sets gives rise to fore ground of image. 1 0 0 0 1 0 1 1 0 1 0 0 0 1 0 1 1 0 Ri Rj
  • 11.
    Boundary • It isdefined as that the boundary will be having at least one set of pixels from back ground of the image or edge. • Edge can be the region boundary (in binary images) • Its boundary (border, contour) is the set of pixels in R that have at least one neighbor not in R. Back ground Foreground Edge boundary
  • 13.
    • If aregion corresponds to the whole image, 1st and last rows & columns are treated as boundary • Difference • – Edges Intensity Discontinuities • – Boundaries Closed Path
  • 14.
    Distance Measures • Forpixels p,q,z with coordinates (x,y), (s,t), (u,v), D is a distance function or metric if the three conditions satisfies: • D(p,q) ≥ 0 [D(p,q)=0 iff p=q( if p and q are located at same position)] • D(p,q) = D(q,p) (if distance between p and q are equal) and • D(p,z) ≤ D(p,q) + D(q,z)
  • 15.
    Distance Measures • Euclideandistance: • De(p,q) = [(x-s)2 + (y-t)2]1/2 • Points (pixels) having a distance less than or equal to r from (x,y) are contained in a disk of radius r centered at (x,y).
  • 16.
    Distance Measures • D4distance (city-block distance): • D4(p,q) = |x-s| + |y-t| • forms a diamond centered at (x,y) • e.g. pixels with D4≤2 from p 2 2 1 2 2 1 0 1 2 2 1 2 2 D4 = 1 are the 4-neighbors of p
  • 17.
    Distance Measures • D8distance (chessboard distance): ( Like a king moves 8-ways in chess board) • D8(p,q) = max(|x-s|,|y-t|) • Forms a square centered at p • e.g. pixels with D8≤2 from p 2 2 2 2 2 2 1 1 1 2 2 1 0 1 2 2 1 1 1 2 2 2 2 2 2 D8 = 1 are the 8-neighbors of p
  • 18.
    Distance Measures • D4and D8 distances between p and q are independent of any paths that exist between the points because these distances involve only the coordinates of the points (regardless of whether a connected path exists between them).
  • 19.
    Distance Measures • However,for m-connectivity the value of the distance (length of path) between two pixels depends on the values of the pixels along the path and those of their neighbors.
  • 20.
    Interpolation • Required inimage resizing such as shrinking and zooming • Using known data to estimate data at unknown points
  • 22.
  • 23.
  • 24.
  • 26.
    Electromagnetic (EM) energyspectrum Weeks 1 & 2 Major uses Gamma-ray imaging: nuclear medicine and astronomical observations X-rays: medical diagnostics, industry, and astronomy, etc. Ultraviolet: lithography, industrial inspection, microscopy, lasers, biological imaging, and astronomical observations Visible and infrared bands: light microscopy, astronomy, remote sensing, industry, and law enforcement Microwave band: radar Radio band: medicine (such as MRI) and astronomy
  • 27.
    First photograph • Firstphotograph due to Niepce, • First on record shown - 1822 • Basic abstraction is the pinhole camera • First successful commercial photograph due to Eastman in late 19th
  • 28.