0% found this document useful (0 votes)
114 views

Digital Image Processing: Lect # 4

This document discusses image topology, specifically pixel neighborhood and connectivity. It defines 4-adjacency, 8-adjacency, and mixed or m-adjacency between pixels. Connected components and regions in an image are defined based on connectivity. Pixel distances including Euclidean, city-block, and chessboard distances are covered. Steps for finding the number of objects and pixels in each object using 4, 8, and mixed connectivity in a sample binary image are provided. Finally, determining the boundary length of each object using 8-connectivity is described.

Uploaded by

nnehasingh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
114 views

Digital Image Processing: Lect # 4

This document discusses image topology, specifically pixel neighborhood and connectivity. It defines 4-adjacency, 8-adjacency, and mixed or m-adjacency between pixels. Connected components and regions in an image are defined based on connectivity. Pixel distances including Euclidean, city-block, and chessboard distances are covered. Steps for finding the number of objects and pixels in each object using 4, 8, and mixed connectivity in a sample binary image are provided. Finally, determining the boundary length of each object using 8-connectivity is described.

Uploaded by

nnehasingh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 17

Lect # 4

Digital Image Processing


Topic:
Image Topology: neighborhood and connectivity
Pixel neighborhood

(x,y)
Pixel adjacency or
connectivity
Pixels: p(x,y) and q(s,t)

• V = {1} – set of intensity values used to define
adjacency
• 4-adjacency: p and q with values from V, are 4-
adjacent if they are 4 neighbors
• 8-adjacency: p and q with values from V, are 8-
adjacent if they are 8 neighbors
• m-adjacency (mixed adjacency): p and q with values
from V, are m-adjacent if:
• q is 4-neighbor of p, or
• Q is diagonal neighbor of p and there is no common 4-
neighbor fro p and q, that is, N4(p)⋂ N4(q) = Φ
Question:
• For the binary image [1 1 1 0 1 1; 0 1 1 0 0 1;1 1 0 0 0
1;1 1 0 0 1 1; 1 1 0 1 1 1], if objects are identified as
V={0}
• Determine the number of objects in the image.
• Determine the number of pixels in each object.
• Determine the pixel length of the boundary of each object.
• Steps:
1. Start reading row wise.
2. For each white pixel
a. label it
b. find the connected neighbours and give them same label
c. if not connected with any previous label but belongs to
foreground, give the next label.
Connectivity, Regions & Boundaries

• 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 all elements of S
form one connected component, then set S is called a
connected set.
• A subset of pixels in an image, R is a region of the image if R is
a connected set. The boundary (also called border or contour)
of a region R is the set of pixels in the region that have one or
more neighbors that are not in R.
Boundary and Edge

• Boundary of finite regions form a closed


path and edges may be open.

• Boundaries are based on connectivities


and edges on a measure of gray-level
discontinuties.
Pixel distances
• For pixels p, q, and z, with coordinates (x, y), (s, t), and (v, w),
respectively, D is a distance function or metric if

• Euclidean distance

the points with distance ‘d’ are contained in a disk of radius ‘d’ centered
at (x, y).
Pixel Distances (Contd.)
• TheD4 distance (also called city-block distance) between p and q is

• TheD8 distance (also called chessboard distance) between p and q is

Note that the D4 and D8 distances


between p and q are independent
of any paths that might exist
between the points because these
distances involve only the
coordinates of the points
Pixel Distances (Contd.)

• Dm distance: shortest m-path between the points.


• Dm distance between two pixels will depend on the values of the pixels
along the path, as well as the values of their neighbors.

0 1 0 1 1 1
0 1 1 1 1 1
1 1 1

Dm = 2 Dm = 3 Dm = 4
Find the number of objects in the
given image using (i) 4-connectivity
(ii) 8-connectivity and (iii) m-
connectivity
Find the number of objects in the
given image using (i) 4-connectivity
(ii) 8-connectivity and (iii) m-
connectivity
Find the number of objects in the
given image using (i) 4-connectivity
(ii) 8-connectivity and (iii) m-
connectivity
Find the boundary length( in terms of
number of pixels) for each object with 8-
connectivity used.
Boundary with 8-connectivity Boundary with 4-connectivity
Find the boundary length( in terms of
number of pixels) for each object with 8-
connectivity used.
Boundary with 8-connectivity Boundary with 4-connectivity

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy