Академический Документы
Профессиональный Документы
Культура Документы
Electrical & Computer Engineering Dr. D. J. Jackson Lecture 3-1 Electrical & Computer Engineering Dr. D. J. Jackson Lecture 3-2
• The D4 distance (also called the city block distance) • The D8 distance (also called the chessboard distance)
between p and q is given by: between p and q is given by:
D4 ( p, q ) = x − s + y − t D8 ( p, q ) = max( x − s , y − t )
• The pixels having a D4 distance less than some r from (x,y) • The pixels having a D8 distance less than some r from (x,y)
form a diamond centered at (x,y) form a square centered at (x,y)
• Example: pixels where D4 ≤ 2 • Example: pixels where D8 ≤ 2
2 22222
2 1 2 Note: Pixels with D4=1 21112 Note: Pixels with D8=1
2 1 0 1 2 are the 4-neighbors 21012 are the 8-neighbors
2 1 2 of (x,y) 21112 of (x,y)
2 22222
Electrical & Computer Engineering Dr. D. J. Jackson Lecture 3-3 Electrical & Computer Engineering Dr. D. J. Jackson Lecture 3-4
Electrical & Computer Engineering Dr. D. J. Jackson Lecture 3-5 Electrical & Computer Engineering Dr. D. J. Jackson Lecture 3-6
M-connectivity example Arithmetic & logic operations
Electrical & Computer Engineering Dr. D. J. Jackson Lecture 3-7 Electrical & Computer Engineering Dr. D. J. Jackson Lecture 3-8
Electrical & Computer Engineering Dr. D. J. Jackson Lecture 3-9 Electrical & Computer Engineering Dr. D. J. Jackson Lecture 3-10
Electrical & Computer Engineering Dr. D. J. Jackson Lecture 3-11 Electrical & Computer Engineering Dr. D. J. Jackson Lecture 3-12
Neighborhood-oriented operations Neighborhood-oriented operations
(continued) (continued)
Electrical & Computer Engineering Dr. D. J. Jackson Lecture 3-13 Electrical & Computer Engineering Dr. D. J. Jackson Lecture 3-14
Electrical & Computer Engineering Dr. D. J. Jackson Lecture 3-15 Electrical & Computer Engineering Dr. D. J. Jackson Lecture 3-16