Digital Image Processing, 2nd ed. www.imageprocessingbook.com
© 2002 R. C. Gonzalez & R. E. Woods
Chapter 2
Digital Image Fundamentals
Digital Image Processing, 2nd ed. www.imageprocessingbook.com
© 2002 R. C. Gonzalez & R. E. Woods
Elements of Visual Perception
中英名詞對照 :
Cornea: 角膜
Sclera: 鞏膜
Choroid: 脈絡膜
Retina: 視網膜
Iris: 虹彩
Lens: 晶體
Macula lutea: 黃斑
Fovea: 中央窩
Blind spot: 盲點
Rod: 桿狀細胞
Cone: 錐狀細胞
Digital Image Processing, 2nd ed. www.imageprocessingbook.com
© 2002 R. C. Gonzalez & R. E. Woods
Structure of the Human Eye
• Pattern vision is afforded by the distribution of discrete light
receptors over the surface of the retina.
• There are two classes of receptors: cones and rods.
– The number of cones in each eye: 6 to 7 millions
– The number of rods in each eye: 75 to 150 millions
– The cones is concentrated in the central portion of the retina (fovea).
– The rods are distributed over the retinal surface.
• Photopic (bright-light) vision: vision with cones
– color receptors, high resolution in the fovea, less sensitive to light
• Scotopic (dim-light) vision: vision with rods
– color blind, much more sensitive to light (night vision), lower
resolution
Digital Image Processing, 2nd ed. www.imageprocessingbook.com
© 2002 R. C. Gonzalez & R. E. Woods
Structure of the Human Eye
Digital Image Processing, 2nd ed. www.imageprocessingbook.com
© 2002 R. C. Gonzalez & R. E. Woods
Image Formation in the Eye
• Focal length of the eye: 17 to 14 mm
• Let h be the height in mm of that object in the retinal image,
then
15/100 = h / 17 , h = 2.55mm
• The retinal image is reflected primarily in the area of the
fovea.
Digital Image Processing, 2nd ed. www.imageprocessingbook.com
© 2002 R. C. Gonzalez & R. E. Woods
Brightness Adaptation and Discrimination
•The range of brightness that the eye can
adapt to is enormous, roughly around 1010
to 1.
•Photopic vision alone has a range of
around 106
to 1.
•Brightness adaptation: example “ Ba”
•mL: millilambert ( 亮度單位 )
Digital Image Processing, 2nd ed. www.imageprocessingbook.com
© 2002 R. C. Gonzalez & R. E. Woods
Brightness Adaptation and Discrimination
Example: Mach bands
Digital Image Processing, 2nd ed. www.imageprocessingbook.com
© 2002 R. C. Gonzalez & R. E. Woods
Brightness Adaptation and Discrimination
Example: Simultaneous Contrast
Digital Image Processing, 2nd ed. www.imageprocessingbook.com
© 2002 R. C. Gonzalez & R. E. Woods
Brightness Adaptation and Discrimination
Examples for Human Perception Phenomena
Digital Image Processing, 2nd ed. www.imageprocessingbook.com
© 2002 R. C. Gonzalez & R. E. Woods
Light and the Electromagnetic Spectrum
Digital Image Processing, 2nd ed. www.imageprocessingbook.com
© 2002 R. C. Gonzalez & R. E. Woods
Light and the Electromagnetic Spectrum
• Three basic quantities described the quality of
a chromatic ( 彩色的 ) light source:
– Radiance: the total amount energy that flow from
the light source (can be measured)
– Luminance: the amount of energy an observer
perceives from a light source (can be measured)
– Brightness: a subjective descriptor of light
perception; perceived quantity of light emitted
(cannot be measured)
Digital Image Processing, 2nd ed. www.imageprocessingbook.com
© 2002 R. C. Gonzalez & R. E. Woods
Light and the Electromagnetic Spectrum
• Relationship between frequency ( ) and wavelength ( )
, where c is the speed of light
• Energy of a photon
, where h is Planck’s constant




c


h
E 
Digital Image Processing, 2nd ed. www.imageprocessingbook.com
© 2002 R. C. Gonzalez & R. E. Woods
Image Sensing and Acquisition
• Nowadays most visible and near IR electromagnetic imaging is done with
2-dimensional charged-coupled devices (CCDs).
Digital Image Processing, 2nd ed. www.imageprocessingbook.com
© 2002 R. C. Gonzalez & R. E. Woods
A Simple Image Formation Model
• Binary images: images having only two possible brightness levels (black
and white)
• Gray scale images : “black and white” images
• Color images: can be described mathematically as three gray scale images
• Let f(x,y) be an image function, then
f(x,y) = i(x,y) r(x,y),
where i(x,y): the illumination function
r(x,y): the reflection function
Note: 0 < i(x,y)< ∞ and 0 <r(x,y)< 1.
• For digital images the minimum gray level is usually 0, but the maximum
depends on number of quantization levels used to digitize an image. The
most common is 256 levels, so that the maximum level is 255.
Digital Image Processing, 2nd ed. www.imageprocessingbook.com
© 2002 R. C. Gonzalez & R. E. Woods
Image Sampling and Quantization
Digital Image Processing, 2nd ed. www.imageprocessingbook.com
© 2002 R. C. Gonzalez & R. E. Woods
Image Sampling and Quantization
• Sampling: digitizing the 2-dimensional spatial coordinate values
• Quantization: digitizing the amplitude values (brightness level)
Digital Image Processing, 2nd ed. www.imageprocessingbook.com
© 2002 R. C. Gonzalez & R. E. Woods
Representing Digital Images
Digital Image Processing, 2nd ed. www.imageprocessingbook.com
© 2002 R. C. Gonzalez & R. E. Woods
Spatial and Gray-Level Resolution
Spatial Resolution
Digital Image Processing, 2nd ed. www.imageprocessingbook.com
© 2002 R. C. Gonzalez & R. E. Woods
Spatial Resolution by Re-sampling
Digital Image Processing, 2nd ed. www.imageprocessingbook.com
© 2002 R. C. Gonzalez & R. E. Woods
Gray-Level Resolution
2
4
8
16
128
32
64
256
Digital Image Processing, 2nd ed. www.imageprocessingbook.com
© 2002 R. C. Gonzalez & R. E. Woods
How to Decide Spatial and Gray-Level Resolution?
• Figure 2.22 (a): The woman’s face; Image with low level of detail.
• Figure 2.22 (b): The cameraman; Image with medium level of detail.
• Figure 2.22 (c): The crowd picture; Image with a relatively large amount of
detail.
Digital Image Processing, 2nd ed. www.imageprocessingbook.com
© 2002 R. C. Gonzalez & R. E. Woods
Aliasing and Moiré Pattern
• All signals (functions) can be shown to be made up of a linear
combination sinusoidal signals (sines and cosines) of different
frequencies. (Chapter 4)
• For physical reasons, there is a highest frequency component
in all real world signals.
• Theoretically,
– if a signal is sampled at more than twice its highest frequency
component, then it can be reconstructed exactly from its samples.
– But, if it is sampled at less than that frequency (called undersampling),
then aliasing ( 失真 ) will result.
– This causes frequencies to appear in the sampled signal that were not in
the original signal.
– The Moiré pattern shown in Figure 2.24 is an example. The vertical
low frequency pattern is a new frequency not in the original patterns.
Digital Image Processing, 2nd ed. www.imageprocessingbook.com
© 2002 R. C. Gonzalez & R. E. Woods
Aliasing and Moiré Pattern
The effect of aliased frequencies
Digital Image Processing, 2nd ed. www.imageprocessingbook.com
© 2002 R. C. Gonzalez & R. E. Woods
Zooming and Shrinking Digital Images
• Zooming: increasing the number of pixels in an
image so that the image appears larger
– Nearest neighbor interpolation
• For example: pixel replication--to repeat rows and
columns of an image
– Bilinear interpolation
• Smoother
– Higher order interpolation
• Image shrinking: subsampling
Digital Image Processing, 2nd ed. www.imageprocessingbook.com
© 2002 R. C. Gonzalez & R. E. Woods
Zooming and Shrinking Digital Images
Nearest neighbor
Interpolation
(Pixel replication)
Bilinear
interpolation
Digital Image Processing, 2nd ed. www.imageprocessingbook.com
© 2002 R. C. Gonzalez & R. E. Woods
Some Basic Relationships Between Pixels
• Neighbors of a pixel
– There are three kinds of neighbors of a pixel:
• N4(p) 4-neighbors: the set of horizontal and vertical neighbors
• ND(p) diagonal neighbors: the set of 4 diagonal neighbors
• N8(p) 8-neighbors: union of 4-neighbors and diagonal neighbors
O O O
O X O
O O O
O O
X
O O
O
O X O
O
Digital Image Processing, 2nd ed. www.imageprocessingbook.com
© 2002 R. C. Gonzalez & R. E. Woods
Some Basic Relationships Between Pixels
• Adjacency:
– Two pixels that are neighbors and have the same grey-level
(or some other specified similarity criterion) are adjacent
– Pixels can be 4-adjacent, diagonally adjacent, 8-adjacent,
or m-adjacent.
• m-adjacency (mixed adjacency):
– Two pixels p and q of the same value (or specified
similarity) are m-adjacent if either
• (i) q and p are 4-adjacent, or
• (ii) p and q are diagonally adjacent and do not have any common
4-adjacent neighbors.
• They cannot be both (i) and (ii).
Digital Image Processing, 2nd ed. www.imageprocessingbook.com
© 2002 R. C. Gonzalez & R. E. Woods
Some Basic Relationships Between Pixels
• An example of adjacency:
Digital Image Processing, 2nd ed. www.imageprocessingbook.com
© 2002 R. C. Gonzalez & R. E. Woods
Some Basic Relationships Between Pixels
• Path:
– The length of the path
– Closed 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 of S:
– The set of all pixels in S that are connected to a given pixel in S.
• Region of an image
• Boundary, border or contour of a region
• Edge: a path of one or more pixels that separate two regions
of significantly different gray levels.
Digital Image Processing, 2nd ed. www.imageprocessingbook.com
© 2002 R. C. Gonzalez & R. E. Woods
Some Basic Relationships Between Pixels
• Distance measures
– Distance function: a function of two points, p and q, in space
that satisfies three criteria
– The Euclidean distance De(p, q)
– The city-block (Manhattan) distance D4(p, q)
– The chessboard distance D8(p, q)
)
,
(
)
,
(
)
,
(
)
(
and
),
,
(
)
,
(
)
(
0
)
,
(
)
(
z
q
D
q
p
D
z
p
D
c
p
q
D
q
p
D
b
q
p
D
a




2
2
)
(
)
(
)
,
( t
y
s
x
q
p
De 



|
|
|
|
)
,
(
4 t
y
s
x
q
p
D 



|)
|
|,
max(|
)
,
(
8 t
y
s
x
q
p
D 



More Related Content

PPT
newest human eye anatomy.ppt human eye perception
PPT
Chapter02.ppt
PPT
Chapter01 (2)
PPTX
DIP PPT (1).pptx
PPTX
Image processing.pptx
PPT
9_2019_01_04!04_29_23_PM_imageprocessing.ppt
PPT
bbbbb.pptmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm
PPT
aaaaa.pptgjjjjjjjjjjjjjjjjdgggfrttttttttttttttttttttttttt
newest human eye anatomy.ppt human eye perception
Chapter02.ppt
Chapter01 (2)
DIP PPT (1).pptx
Image processing.pptx
9_2019_01_04!04_29_23_PM_imageprocessing.ppt
bbbbb.pptmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm
aaaaa.pptgjjjjjjjjjjjjjjjjdgggfrttttttttttttttttttttttttt

Similar to Chapter02.ppt of Image processing and Applications (20)

PPT
Image processing 1-lectures
PDF
Lecture 1
PDF
Sub ecs 702_30sep14
PPT
L1.PPT it comes under the image processing
PPTX
471112728-DIGITAL-IMAGE-PROCESSING-NOTES-VTU.pptx
PPTX
Digital Image Fundamentals
PDF
Chapter 2. Digital Image Fundamentals.pdf
PDF
CSE367 Lecture 1 image processing lecture
PPTX
Introduction to Image & Processing and Image
PDF
Chap_1_Digital_Image_Fundamentals_DD (2).pdf
PPT
ImageProcessing1-Introduction.ppt
PPT
Image processing1 introduction
PPTX
Digital-Image-ProcessinghJFDfhofhjHFbbbcccccccccc.pptx
PPT
Digital Image Processing
PPT
CEC366 Unit -1 FUNDAMENTALS OF DIGITAL IMAGE PROCESSING
PPTX
Digital image processing
PPTX
Advance image processing
PPTX
Elements of visual perception in digital image processing
PPTX
Digital-Image-processing-fundamenntal.pptx
PPTX
DIP-CHAPTERs
Image processing 1-lectures
Lecture 1
Sub ecs 702_30sep14
L1.PPT it comes under the image processing
471112728-DIGITAL-IMAGE-PROCESSING-NOTES-VTU.pptx
Digital Image Fundamentals
Chapter 2. Digital Image Fundamentals.pdf
CSE367 Lecture 1 image processing lecture
Introduction to Image & Processing and Image
Chap_1_Digital_Image_Fundamentals_DD (2).pdf
ImageProcessing1-Introduction.ppt
Image processing1 introduction
Digital-Image-ProcessinghJFDfhofhjHFbbbcccccccccc.pptx
Digital Image Processing
CEC366 Unit -1 FUNDAMENTALS OF DIGITAL IMAGE PROCESSING
Digital image processing
Advance image processing
Elements of visual perception in digital image processing
Digital-Image-processing-fundamenntal.pptx
DIP-CHAPTERs
Ad

Recently uploaded (20)

PPTX
Feature types and data preprocessing steps
PPTX
CyberSecurity Mobile and Wireless Devices
PPTX
tack Data Structure with Array and Linked List Implementation, Push and Pop O...
PDF
Design Guidelines and solutions for Plastics parts
PPTX
Principal presentation for NAAC (1).pptx
PDF
Unit1 - AIML Chapter 1 concept and ethics
PPTX
A Brief Introduction to IoT- Smart Objects: The "Things" in IoT
PPTX
Management Information system : MIS-e-Business Systems.pptx
PDF
distributed database system" (DDBS) is often used to refer to both the distri...
PDF
Applications of Equal_Area_Criterion.pdf
PDF
null (2) bgfbg bfgb bfgb fbfg bfbgf b.pdf
PDF
UEFA_Carbon_Footprint_Calculator_Methology_2.0.pdf
PPTX
AUTOMOTIVE ENGINE MANAGEMENT (MECHATRONICS).pptx
PDF
Influence of Green Infrastructure on Residents’ Endorsement of the New Ecolog...
PPTX
mechattonicsand iotwith sensor and actuator
PDF
First part_B-Image Processing - 1 of 2).pdf
PDF
Accra-Kumasi Expressway - Prefeasibility Report Volume 1 of 7.11.2018.pdf
PDF
Java Basics-Introduction and program control
PPTX
CN_Unite_1 AI&DS ENGGERING SPPU PUNE UNIVERSITY
PDF
Abrasive, erosive and cavitation wear.pdf
Feature types and data preprocessing steps
CyberSecurity Mobile and Wireless Devices
tack Data Structure with Array and Linked List Implementation, Push and Pop O...
Design Guidelines and solutions for Plastics parts
Principal presentation for NAAC (1).pptx
Unit1 - AIML Chapter 1 concept and ethics
A Brief Introduction to IoT- Smart Objects: The "Things" in IoT
Management Information system : MIS-e-Business Systems.pptx
distributed database system" (DDBS) is often used to refer to both the distri...
Applications of Equal_Area_Criterion.pdf
null (2) bgfbg bfgb bfgb fbfg bfbgf b.pdf
UEFA_Carbon_Footprint_Calculator_Methology_2.0.pdf
AUTOMOTIVE ENGINE MANAGEMENT (MECHATRONICS).pptx
Influence of Green Infrastructure on Residents’ Endorsement of the New Ecolog...
mechattonicsand iotwith sensor and actuator
First part_B-Image Processing - 1 of 2).pdf
Accra-Kumasi Expressway - Prefeasibility Report Volume 1 of 7.11.2018.pdf
Java Basics-Introduction and program control
CN_Unite_1 AI&DS ENGGERING SPPU PUNE UNIVERSITY
Abrasive, erosive and cavitation wear.pdf
Ad

Chapter02.ppt of Image processing and Applications

  • 1. Digital Image Processing, 2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Chapter 2 Digital Image Fundamentals
  • 2. Digital Image Processing, 2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Elements of Visual Perception 中英名詞對照 : Cornea: 角膜 Sclera: 鞏膜 Choroid: 脈絡膜 Retina: 視網膜 Iris: 虹彩 Lens: 晶體 Macula lutea: 黃斑 Fovea: 中央窩 Blind spot: 盲點 Rod: 桿狀細胞 Cone: 錐狀細胞
  • 3. Digital Image Processing, 2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Structure of the Human Eye • Pattern vision is afforded by the distribution of discrete light receptors over the surface of the retina. • There are two classes of receptors: cones and rods. – The number of cones in each eye: 6 to 7 millions – The number of rods in each eye: 75 to 150 millions – The cones is concentrated in the central portion of the retina (fovea). – The rods are distributed over the retinal surface. • Photopic (bright-light) vision: vision with cones – color receptors, high resolution in the fovea, less sensitive to light • Scotopic (dim-light) vision: vision with rods – color blind, much more sensitive to light (night vision), lower resolution
  • 4. Digital Image Processing, 2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Structure of the Human Eye
  • 5. Digital Image Processing, 2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Image Formation in the Eye • Focal length of the eye: 17 to 14 mm • Let h be the height in mm of that object in the retinal image, then 15/100 = h / 17 , h = 2.55mm • The retinal image is reflected primarily in the area of the fovea.
  • 6. Digital Image Processing, 2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Brightness Adaptation and Discrimination •The range of brightness that the eye can adapt to is enormous, roughly around 1010 to 1. •Photopic vision alone has a range of around 106 to 1. •Brightness adaptation: example “ Ba” •mL: millilambert ( 亮度單位 )
  • 7. Digital Image Processing, 2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Brightness Adaptation and Discrimination Example: Mach bands
  • 8. Digital Image Processing, 2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Brightness Adaptation and Discrimination Example: Simultaneous Contrast
  • 9. Digital Image Processing, 2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Brightness Adaptation and Discrimination Examples for Human Perception Phenomena
  • 10. Digital Image Processing, 2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Light and the Electromagnetic Spectrum
  • 11. Digital Image Processing, 2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Light and the Electromagnetic Spectrum • Three basic quantities described the quality of a chromatic ( 彩色的 ) light source: – Radiance: the total amount energy that flow from the light source (can be measured) – Luminance: the amount of energy an observer perceives from a light source (can be measured) – Brightness: a subjective descriptor of light perception; perceived quantity of light emitted (cannot be measured)
  • 12. Digital Image Processing, 2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Light and the Electromagnetic Spectrum • Relationship between frequency ( ) and wavelength ( ) , where c is the speed of light • Energy of a photon , where h is Planck’s constant     c   h E 
  • 13. Digital Image Processing, 2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Image Sensing and Acquisition • Nowadays most visible and near IR electromagnetic imaging is done with 2-dimensional charged-coupled devices (CCDs).
  • 14. Digital Image Processing, 2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods A Simple Image Formation Model • Binary images: images having only two possible brightness levels (black and white) • Gray scale images : “black and white” images • Color images: can be described mathematically as three gray scale images • Let f(x,y) be an image function, then f(x,y) = i(x,y) r(x,y), where i(x,y): the illumination function r(x,y): the reflection function Note: 0 < i(x,y)< ∞ and 0 <r(x,y)< 1. • For digital images the minimum gray level is usually 0, but the maximum depends on number of quantization levels used to digitize an image. The most common is 256 levels, so that the maximum level is 255.
  • 15. Digital Image Processing, 2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Image Sampling and Quantization
  • 16. Digital Image Processing, 2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Image Sampling and Quantization • Sampling: digitizing the 2-dimensional spatial coordinate values • Quantization: digitizing the amplitude values (brightness level)
  • 17. Digital Image Processing, 2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Representing Digital Images
  • 18. Digital Image Processing, 2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Spatial and Gray-Level Resolution Spatial Resolution
  • 19. Digital Image Processing, 2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Spatial Resolution by Re-sampling
  • 20. Digital Image Processing, 2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Gray-Level Resolution 2 4 8 16 128 32 64 256
  • 21. Digital Image Processing, 2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods How to Decide Spatial and Gray-Level Resolution? • Figure 2.22 (a): The woman’s face; Image with low level of detail. • Figure 2.22 (b): The cameraman; Image with medium level of detail. • Figure 2.22 (c): The crowd picture; Image with a relatively large amount of detail.
  • 22. Digital Image Processing, 2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Aliasing and Moiré Pattern • All signals (functions) can be shown to be made up of a linear combination sinusoidal signals (sines and cosines) of different frequencies. (Chapter 4) • For physical reasons, there is a highest frequency component in all real world signals. • Theoretically, – if a signal is sampled at more than twice its highest frequency component, then it can be reconstructed exactly from its samples. – But, if it is sampled at less than that frequency (called undersampling), then aliasing ( 失真 ) will result. – This causes frequencies to appear in the sampled signal that were not in the original signal. – The Moiré pattern shown in Figure 2.24 is an example. The vertical low frequency pattern is a new frequency not in the original patterns.
  • 23. Digital Image Processing, 2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Aliasing and Moiré Pattern The effect of aliased frequencies
  • 24. Digital Image Processing, 2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Zooming and Shrinking Digital Images • Zooming: increasing the number of pixels in an image so that the image appears larger – Nearest neighbor interpolation • For example: pixel replication--to repeat rows and columns of an image – Bilinear interpolation • Smoother – Higher order interpolation • Image shrinking: subsampling
  • 25. Digital Image Processing, 2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Zooming and Shrinking Digital Images Nearest neighbor Interpolation (Pixel replication) Bilinear interpolation
  • 26. Digital Image Processing, 2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Some Basic Relationships Between Pixels • Neighbors of a pixel – There are three kinds of neighbors of a pixel: • N4(p) 4-neighbors: the set of horizontal and vertical neighbors • ND(p) diagonal neighbors: the set of 4 diagonal neighbors • N8(p) 8-neighbors: union of 4-neighbors and diagonal neighbors O O O O X O O O O O O X O O O O X O O
  • 27. Digital Image Processing, 2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Some Basic Relationships Between Pixels • Adjacency: – Two pixels that are neighbors and have the same grey-level (or some other specified similarity criterion) are adjacent – Pixels can be 4-adjacent, diagonally adjacent, 8-adjacent, or m-adjacent. • m-adjacency (mixed adjacency): – Two pixels p and q of the same value (or specified similarity) are m-adjacent if either • (i) q and p are 4-adjacent, or • (ii) p and q are diagonally adjacent and do not have any common 4-adjacent neighbors. • They cannot be both (i) and (ii).
  • 28. Digital Image Processing, 2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Some Basic Relationships Between Pixels • An example of adjacency:
  • 29. Digital Image Processing, 2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Some Basic Relationships Between Pixels • Path: – The length of the path – Closed 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 of S: – The set of all pixels in S that are connected to a given pixel in S. • Region of an image • Boundary, border or contour of a region • Edge: a path of one or more pixels that separate two regions of significantly different gray levels.
  • 30. Digital Image Processing, 2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Some Basic Relationships Between Pixels • Distance measures – Distance function: a function of two points, p and q, in space that satisfies three criteria – The Euclidean distance De(p, q) – The city-block (Manhattan) distance D4(p, q) – The chessboard distance D8(p, q) ) , ( ) , ( ) , ( ) ( and ), , ( ) , ( ) ( 0 ) , ( ) ( z q D q p D z p D c p q D q p D b q p D a     2 2 ) ( ) ( ) , ( t y s x q p De     | | | | ) , ( 4 t y s x q p D     |) | |, max(| ) , ( 8 t y s x q p D   