Professional Documents
Culture Documents
U1 L06 Basic Relationship Between Pixels
U1 L06 Basic Relationship Between Pixels
by
Dr.R.Hemalatha, Associate Professor, ECE
SSN College of Engineering
1
Neighbourhood & Adjacency
2 Path, Connectivity
• 4-, 8-, and m-paths can be defined based on the type of adjacency
used.
V = {1, 2}
0 1 1 0 1 1 0 1 1
0 2 0 0 2 0 0 2 0
0 0 1 0 0 1 0 0 1
V = {1, 2}
0 1 1 0 1 1 0 1 1
0 2 0 0 2 0 0 2 0
0 0 1 0 0 1 0 0 1
8-adjacent
V = {1, 2}
0 1 1 0 1 1 0 1 1
0 2 0 0 2 0 0 2 0
0 0 1 0 0 1 0 0 1
8-adjacent m-adjacent
V = {1, 2}
0 1 1 0 1 1 0 1 1
0 2 0 0 2 0 0 2 0
0 0 1 0 0 1 0 0 1
8-adjacent m-adjacent
V = {1, 2}
0 1 1 0 1 1 0 1 1
0 2 0 0 2 0 0 2 0
0 0 1 0 0 1 0 0 1
8-adjacent m-adjacent
0 0 1 1 1 0 0 1 1 1 0 0 1 1 1 0 0 1 1 1
0 1 1 0 1 0 1 1 0 1 0 1 1 0 1 0 1 1 0 1
0 1 0 0 1 0 1 0 0 1 0 1 0 0 1 0 1 0 0 1
0 1 0 0 1 0 1 0 0 1 0 1 0 0 1 0 1 0 0 1
0 1 1 1 0 0 1 1 1 0 0 1 1 1 0 0 1 1 1 0
S S→ Connected set
c.c. 1 c.c.
Set S
1 1 1
1 0 1
0 1 0
0 0 1
1 1 1
1 1 1
Set S
1 1 1
1 0 1
0 1 0
0 0 1 One Connected Component →
1 1 1 Connected Set
1 1 1
1 1 1
Region 1
1 0 1
0 1 0
0 0 1 Region 2
1 1 1
1 1 1
1 1 1
Part 1
1 0 1
0 1 0
0 0 1 Part 2
1 1 1
1 1 1
0 0 0 0 0
0 1 1 0 0
0 1 1 0 0
0 1 1 1 0
0 1 1 1 0
0 0 0 0 0
1 1 1
foreground
1 0 1
0 1 0
0 0 1 background
1 1 1
1 1 1
• Given three pixels p, q, and z with coordinates (x, y), (s, t),
(u, v) respectively, D is a distance function or metric, if
0 0 0 0 0
0 0 1 1 0
0 1 1 0 0
0 1 0 0 0
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
(1,3)→(3,1)
0 0 1 1 0 D4 = │1-3│+│3-1│
0 1 1 0 0 = 4
0 1 0 0 0
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
0 0 1 1 0
0 1 1 0 0
0 1 0 0 0
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
(1,3)→(3,1)
0 0 1 1 0 D8 = max(│1-3│,│3-1│)
0 1 1 0 0 = 2
0 1 0 0 0
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
0 0 1 1 0
0 1 1 0 0
0 1 0 0 0
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
0 0 1 1 0
0 1 1 0 0 (1,3)→(1,2) →(2,2) →(2,1) →(3,1)
Dm = 1+1+1+1
0 1 0 0 0 = 4
0 0 0 0 0
0 0 0 0 0
Additional Reading:
• http://www.cse.iitm.ac.in/~vplab/courses/CV_DIP/PDF/NEIG
H_CONN.pdf