SlideShare a Scribd company logo
By.
R.Preethi.
Pixel Relationships
Basic Relationships Between Pixels:
• Neighborhood
• Adjacency
• Connectivity
• Paths
• Regions and boundaries
 Neighbors of a Pixel:
• Any pixel p(x, y)has two vertical and two horizontal
neighbors, given by
(x+1, y), (x-1, y), (x, y+1), (x, y-1)
• This set of pixels are called the 4-neighbors of P, and is
denoted by N4(P).
• Each of them are at a unit distance from P.
• The four diagonal neighbors of p(x , y)are given by,
(x+1, y+1), (x+1, y-1), (x-1, y+1), (x-1 ,y-1)
• This set is denoted by ND(P).
• Each of them are at Euclidean distance of 1.414 from P.
 The points ND(P) and N4(P) are together known as 8-
neighbors of the point P, denoted by N8(P).
 Some of the points in the N4, ND and N8may fall outside
image when P lies on the border of image.
 a. 4-neighborsof a pixel p are
its vertical and horizontal
neighbors denoted by N4(p)
 b. 8-neighborsof a pixel p are
its vertical horizontal and
4 diagonal neighbors denoted by N8(p).
 Adjacency:
 Two pixels are connected if they are neighbors and their
gray levels satisfy some specified criterion of similarity.
 For example, in a binary image two pixels are connected if
they are 4-neighbors and have same value (0/1).
 Let V be set of gray levels values used to define
adjacency.
 4-adjacency: Two pixels pand qwith values from V are 4-
adjacent ifq is in the set N4(p).
 8-adjacency: Two pixels pand qwith values from V are 8-
adjacent if q is in the set N8(p).
 m-adjacency: Two pixels pand qwith values from V are m-
adjacent if,
–q is in N4(P).
–q is in ND(p) and the set [ ] is empty (has no pixels
whose values are from V).
Connectivity :
• To determine whether the pixels are adjacent in some
sense.
• Let V be the set of gray-level values used to define
connectivity; then Two pixels p, q that have values from
the set V are:
 a. 4-connected,if q is in the set N4(p)
 b. 8-connected,if q is in the set N8(p)
 c. m-connected,iff
i. q is in N4(p) or
ii. q is in ND(p) and the set Is empty
 Pixel p is adjacentto pixel q
if they are connected.
 Two image subsetsS1and
S2 are adjacent if some pixel
in S1is adjacent to some pixel in S2.
 Paths & Path lengths:
• A pathfrom pixel p with
coordinates (x, y)to pixel q
with coordinates (s, t)is a sequence of distinct pixels with
coordinates:
(x0, y0), (x1, y1), (x2, y2) ... (xn, yn),
where (x0, y0)=(x, y)and (xn, yn)=(s, t); (xi, yi)is
adjacentto(xi-1, yi-1) .
 Here n is the length of the path .We can define 4-, 8-, and
m-paths based on type of adjacency used.
 Connected Components:
• If p and q are pixels of an image subset S then p is
connected to q in S if there is a path from p to q
consisting entirely of pixels in S.
• For every pixel pin S, the set of pixels in S that are
connected to p is called a connected component of S.
• If S has only one connected component then S is
called Connected Set.
Regions and Boundaries:
 A subset R of pixels in an image is called a Regionof the
image if R is a connected set.
 The boundaryof the region R is the set of pixels in the
region that have one or more neighbors that are not in R.
 If R happens to be entire Image?
Distance measures:
Given pixels p, q and z with coordinates (x, y), (s, t), (u,
v)respectively, the distance function D has following
properties:a.
a.D(p, q) 0 [D(p, q) = 0, iff p = q]
b. D(p, q) = D(q, p)
c. D(p, z) D(p, q) + D(q, z)
The following are the different Distance measures:
a.Euclidean Distance : De(p, q) = [(x-s)2 + (y-t)2]
b. City Block Distance: ÆD4(p, q) = |x-s| + |y-t|
c. Chess Board Distance: ÆD8(p, q) = max(|x-s|, |y-t|)
Color Fundamentals:
Colors are seen as variable combinations of the
primary colors of light :red (R), green (G), and blue (B).
The primary colors can be mixed to produce the secondary
colors: magenta (red+blue), cyan (green+blue), and
yellow (red+green).Mixing the three primaries, or a
secondary with its opposite primary color, produces white
light.
 RGBcolors are used for color TV, monitors, and video
cameras.
 However, the primary colors of pigments
arecyan(C),magenta(M),and yellow(Y), and the secondary
colors are red, green, and blue.A proper combination of
the three pigment primaries, or a secondary with its
opposite primary, produces black.
Color Models:
 The purpose of a color model is to facilitate the
specification of colors in some standard way. A color
model is a specification of a coordinate system and a
subspace within that system where each color is
represented by a single point. Color models most
commonly used in image processing are:
 RGB model for color monitors and video cameras.
 CMY and CMYK (cyan, magenta, yellow, black)
models for color printing.
 HSI (hue, saturation, intensity) model.
The RGB color model:
 In this model, each color appears in its primary colors red,
green, and blue. This model is based on a Cartesian
coordinate system. The color subspace is the cube shown
in the figure below. The different colors in this model are
points on or inside the cube, and are defined by vectors
extending from the origin.
 All color values R, G, and B have been normalized in the
range [0, 1].However, we can represent each of R, G, and
B from 0 to 255. Each RGB color image consists of three
component images, one for each primary color as shown
in the figure below. These three images are combined on
the screen to produce a color image.
 The CMY and CMYK color model Cyan, magenta, and
yellow are the primary colors of pigments. Most printing
devices such as color printers and copiers require CMY
data input or perform an RGB to CMY conversion
internally.
The HIS color model:
 The RGB and CMY color models are not suited for
describing colors in terms of human interpretation. When
we view a color object, we describe it by its hue,
saturation, and brightness(intensity). Hence the HSI color
model has been presented.
 The HSI model decouples the intensity component from
the color-carrying information (hue and saturation) in a
color image. As a result, this model is an ideal tool for
developing color image processing algorithms.
 The hue, saturation, and intensity values can be obtained
from the RGB color cube.
 That is, we can convert any RGB point to a corresponding
point is the HSI color model by working out the
geometrical formulas.
Digital Image Processing

More Related Content

What's hot

Enhancement in spatial domain
Enhancement in spatial domainEnhancement in spatial domain
Enhancement in spatial domain
Ashish Kumar
 
Image trnsformations
Image trnsformationsImage trnsformations
Image trnsformations
John Williams
 

What's hot (20)

Region based segmentation
Region based segmentationRegion based segmentation
Region based segmentation
 
Digital Image Processing
Digital Image ProcessingDigital Image Processing
Digital Image Processing
 
Point processing
Point processingPoint processing
Point processing
 
Image Representation & Descriptors
Image Representation & DescriptorsImage Representation & Descriptors
Image Representation & Descriptors
 
Image Enhancement - Point Processing
Image Enhancement - Point ProcessingImage Enhancement - Point Processing
Image Enhancement - Point Processing
 
Digital Image Processing - Image Compression
Digital Image Processing - Image CompressionDigital Image Processing - Image Compression
Digital Image Processing - Image Compression
 
Chapter10 image segmentation
Chapter10 image segmentationChapter10 image segmentation
Chapter10 image segmentation
 
Wavelet transform in image compression
Wavelet transform in image compressionWavelet transform in image compression
Wavelet transform in image compression
 
Smoothing Filters in Spatial Domain
Smoothing Filters in Spatial DomainSmoothing Filters in Spatial Domain
Smoothing Filters in Spatial Domain
 
Fundamental steps in image processing
Fundamental steps in image processingFundamental steps in image processing
Fundamental steps in image processing
 
Edge linking in image processing
Edge linking in image processingEdge linking in image processing
Edge linking in image processing
 
IMAGE SEGMENTATION.
IMAGE SEGMENTATION.IMAGE SEGMENTATION.
IMAGE SEGMENTATION.
 
Enhancement in spatial domain
Enhancement in spatial domainEnhancement in spatial domain
Enhancement in spatial domain
 
Color Image Processing
Color Image ProcessingColor Image Processing
Color Image Processing
 
Image compression standards
Image compression standardsImage compression standards
Image compression standards
 
Image segmentation
Image segmentationImage segmentation
Image segmentation
 
Image sampling and quantization
Image sampling and quantizationImage sampling and quantization
Image sampling and quantization
 
Image trnsformations
Image trnsformationsImage trnsformations
Image trnsformations
 
digital image processing
digital image processingdigital image processing
digital image processing
 
5. gray level transformation
5. gray level transformation5. gray level transformation
5. gray level transformation
 

Similar to Digital Image Processing

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.pdfchapter_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
Someone413715
 
chap2.ppt is the presentation of image of eye.
chap2.ppt is the presentation of image of eye.chap2.ppt is the presentation of image of eye.
chap2.ppt is the presentation of image of eye.
YogeshRotela
 
digital image processing chapter two, fundamentals
digital image processing chapter two, fundamentalsdigital image processing chapter two, fundamentals
digital image processing chapter two, fundamentals
KNaveenKumarECE
 

Similar to Digital Image Processing (20)

3.ppt
3.ppt3.ppt
3.ppt
 
DIP7_Relationships_between_pixels.ppt
DIP7_Relationships_between_pixels.pptDIP7_Relationships_between_pixels.ppt
DIP7_Relationships_between_pixels.ppt
 
Digital image processing fundamental explanation
Digital image processing fundamental explanationDigital image processing fundamental explanation
Digital image processing fundamental explanation
 
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.pdfchapter_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
 
03 digital image fundamentals DIP
03 digital image fundamentals DIP03 digital image fundamentals DIP
03 digital image fundamentals DIP
 
chap2.ppt
chap2.pptchap2.ppt
chap2.ppt
 
Image_Processing-ch2surface r_part_2.ppt
Image_Processing-ch2surface r_part_2.pptImage_Processing-ch2surface r_part_2.ppt
Image_Processing-ch2surface r_part_2.ppt
 
Digital Image Fundamentals 1.ppt
Digital Image Fundamentals 1.pptDigital Image Fundamentals 1.ppt
Digital Image Fundamentals 1.ppt
 
Image Acquisition and Representation
Image Acquisition and RepresentationImage Acquisition and Representation
Image Acquisition and Representation
 
2. IP Fundamentals.pdf
2. IP Fundamentals.pdf2. IP Fundamentals.pdf
2. IP Fundamentals.pdf
 
chap2.ppt is the presentation of image of eye.
chap2.ppt is the presentation of image of eye.chap2.ppt is the presentation of image of eye.
chap2.ppt is the presentation of image of eye.
 
Pixelrelationships
PixelrelationshipsPixelrelationships
Pixelrelationships
 
Lecture4.ppt
Lecture4.pptLecture4.ppt
Lecture4.ppt
 
2 digital image fundamentals
2 digital image fundamentals2 digital image fundamentals
2 digital image fundamentals
 
Ip unit 1
Ip unit 1Ip unit 1
Ip unit 1
 
digital image processing chapter two, fundamentals
digital image processing chapter two, fundamentalsdigital image processing chapter two, fundamentals
digital image processing chapter two, fundamentals
 
digTop.ppt
digTop.pptdigTop.ppt
digTop.ppt
 
Chapter 2 Image Processing: Pixel Relation
Chapter 2 Image Processing: Pixel RelationChapter 2 Image Processing: Pixel Relation
Chapter 2 Image Processing: Pixel Relation
 
pixelrelationships-m-1.pptx.ppt
pixelrelationships-m-1.pptx.pptpixelrelationships-m-1.pptx.ppt
pixelrelationships-m-1.pptx.ppt
 
The Digital Image Processing Q@A
The Digital Image Processing Q@AThe Digital Image Processing Q@A
The Digital Image Processing Q@A
 

Recently uploaded

527598851-ppc-due-to-various-govt-policies.pdf
527598851-ppc-due-to-various-govt-policies.pdf527598851-ppc-due-to-various-govt-policies.pdf
527598851-ppc-due-to-various-govt-policies.pdf
rajpreetkaur75080
 

Recently uploaded (15)

Pollinator Ambassador Earth Steward Day Presentation 2024-05-22
Pollinator Ambassador Earth Steward Day Presentation 2024-05-22Pollinator Ambassador Earth Steward Day Presentation 2024-05-22
Pollinator Ambassador Earth Steward Day Presentation 2024-05-22
 
Sharpen existing tools or get a new toolbox? Contemporary cluster initiatives...
Sharpen existing tools or get a new toolbox? Contemporary cluster initiatives...Sharpen existing tools or get a new toolbox? Contemporary cluster initiatives...
Sharpen existing tools or get a new toolbox? Contemporary cluster initiatives...
 
Hi-Tech Industry 2024-25 Prospective.pptx
Hi-Tech Industry 2024-25 Prospective.pptxHi-Tech Industry 2024-25 Prospective.pptx
Hi-Tech Industry 2024-25 Prospective.pptx
 
Getting started with Amazon Bedrock Studio and Control Tower
Getting started with Amazon Bedrock Studio and Control TowerGetting started with Amazon Bedrock Studio and Control Tower
Getting started with Amazon Bedrock Studio and Control Tower
 
Eureka, I found it! - Special Libraries Association 2021 Presentation
Eureka, I found it! - Special Libraries Association 2021 PresentationEureka, I found it! - Special Libraries Association 2021 Presentation
Eureka, I found it! - Special Libraries Association 2021 Presentation
 
Bitcoin Lightning wallet and tic-tac-toe game XOXO
Bitcoin Lightning wallet and tic-tac-toe game XOXOBitcoin Lightning wallet and tic-tac-toe game XOXO
Bitcoin Lightning wallet and tic-tac-toe game XOXO
 
Writing Sample 2 -Bridging the Divide: Enhancing Public Engagement in Urban D...
Writing Sample 2 -Bridging the Divide: Enhancing Public Engagement in Urban D...Writing Sample 2 -Bridging the Divide: Enhancing Public Engagement in Urban D...
Writing Sample 2 -Bridging the Divide: Enhancing Public Engagement in Urban D...
 
123445566544333222333444dxcvbcvcvharsh.pptx
123445566544333222333444dxcvbcvcvharsh.pptx123445566544333222333444dxcvbcvcvharsh.pptx
123445566544333222333444dxcvbcvcvharsh.pptx
 
527598851-ppc-due-to-various-govt-policies.pdf
527598851-ppc-due-to-various-govt-policies.pdf527598851-ppc-due-to-various-govt-policies.pdf
527598851-ppc-due-to-various-govt-policies.pdf
 
The Canoga Gardens Development Project. PDF
The Canoga Gardens Development Project. PDFThe Canoga Gardens Development Project. PDF
The Canoga Gardens Development Project. PDF
 
05232024 Joint Meeting - Community Networking
05232024 Joint Meeting - Community Networking05232024 Joint Meeting - Community Networking
05232024 Joint Meeting - Community Networking
 
Competition and Regulation in Professional Services – KLEINER – June 2024 OEC...
Competition and Regulation in Professional Services – KLEINER – June 2024 OEC...Competition and Regulation in Professional Services – KLEINER – June 2024 OEC...
Competition and Regulation in Professional Services – KLEINER – June 2024 OEC...
 
Acorn Recovery: Restore IT infra within minutes
Acorn Recovery: Restore IT infra within minutesAcorn Recovery: Restore IT infra within minutes
Acorn Recovery: Restore IT infra within minutes
 
0x01 - Newton's Third Law: Static vs. Dynamic Abusers
0x01 - Newton's Third Law:  Static vs. Dynamic Abusers0x01 - Newton's Third Law:  Static vs. Dynamic Abusers
0x01 - Newton's Third Law: Static vs. Dynamic Abusers
 
Oracle Database Administration I (1Z0-082) Exam Dumps 2024.pdf
Oracle Database Administration I (1Z0-082) Exam Dumps 2024.pdfOracle Database Administration I (1Z0-082) Exam Dumps 2024.pdf
Oracle Database Administration I (1Z0-082) Exam Dumps 2024.pdf
 

Digital Image Processing

  • 2. Pixel Relationships Basic Relationships Between Pixels: • Neighborhood • Adjacency • Connectivity • Paths • Regions and boundaries
  • 3.  Neighbors of a Pixel: • Any pixel p(x, y)has two vertical and two horizontal neighbors, given by (x+1, y), (x-1, y), (x, y+1), (x, y-1) • This set of pixels are called the 4-neighbors of P, and is denoted by N4(P). • Each of them are at a unit distance from P. • The four diagonal neighbors of p(x , y)are given by, (x+1, y+1), (x+1, y-1), (x-1, y+1), (x-1 ,y-1) • This set is denoted by ND(P). • Each of them are at Euclidean distance of 1.414 from P.
  • 4.  The points ND(P) and N4(P) are together known as 8- neighbors of the point P, denoted by N8(P).  Some of the points in the N4, ND and N8may fall outside image when P lies on the border of image.  a. 4-neighborsof a pixel p are its vertical and horizontal neighbors denoted by N4(p)  b. 8-neighborsof a pixel p are its vertical horizontal and 4 diagonal neighbors denoted by N8(p).
  • 5.  Adjacency:  Two pixels are connected if they are neighbors and their gray levels satisfy some specified criterion of similarity.  For example, in a binary image two pixels are connected if they are 4-neighbors and have same value (0/1).  Let V be set of gray levels values used to define adjacency.  4-adjacency: Two pixels pand qwith values from V are 4- adjacent ifq is in the set N4(p).  8-adjacency: Two pixels pand qwith values from V are 8- adjacent if q is in the set N8(p).
  • 6.  m-adjacency: Two pixels pand qwith values from V are m- adjacent if, –q is in N4(P). –q is in ND(p) and the set [ ] is empty (has no pixels whose values are from V). Connectivity : • To determine whether the pixels are adjacent in some sense. • Let V be the set of gray-level values used to define connectivity; then Two pixels p, q that have values from the set V are:
  • 7.  a. 4-connected,if q is in the set N4(p)  b. 8-connected,if q is in the set N8(p)  c. m-connected,iff i. q is in N4(p) or ii. q is in ND(p) and the set Is empty
  • 8.  Pixel p is adjacentto pixel q if they are connected.  Two image subsetsS1and S2 are adjacent if some pixel in S1is adjacent to some pixel in S2.  Paths & Path lengths: • A pathfrom pixel p with coordinates (x, y)to pixel q with coordinates (s, t)is a sequence of distinct pixels with coordinates: (x0, y0), (x1, y1), (x2, y2) ... (xn, yn), where (x0, y0)=(x, y)and (xn, yn)=(s, t); (xi, yi)is adjacentto(xi-1, yi-1) .
  • 9.  Here n is the length of the path .We can define 4-, 8-, and m-paths based on type of adjacency used.  Connected Components: • If p and q are pixels of an image subset S then p is connected to q in S if there is a path from p to q consisting entirely of pixels in S. • For every pixel pin S, the set of pixels in S that are connected to p is called a connected component of S. • If S has only one connected component then S is called Connected Set.
  • 10. Regions and Boundaries:  A subset R of pixels in an image is called a Regionof the image if R is a connected set.  The boundaryof the region R is the set of pixels in the region that have one or more neighbors that are not in R.  If R happens to be entire Image? Distance measures: Given pixels p, q and z with coordinates (x, y), (s, t), (u, v)respectively, the distance function D has following properties:a.
  • 11. a.D(p, q) 0 [D(p, q) = 0, iff p = q] b. D(p, q) = D(q, p) c. D(p, z) D(p, q) + D(q, z) The following are the different Distance measures: a.Euclidean Distance : De(p, q) = [(x-s)2 + (y-t)2] b. City Block Distance: ÆD4(p, q) = |x-s| + |y-t| c. Chess Board Distance: ÆD8(p, q) = max(|x-s|, |y-t|)
  • 12. Color Fundamentals: Colors are seen as variable combinations of the primary colors of light :red (R), green (G), and blue (B). The primary colors can be mixed to produce the secondary colors: magenta (red+blue), cyan (green+blue), and yellow (red+green).Mixing the three primaries, or a secondary with its opposite primary color, produces white light.
  • 13.  RGBcolors are used for color TV, monitors, and video cameras.  However, the primary colors of pigments arecyan(C),magenta(M),and yellow(Y), and the secondary colors are red, green, and blue.A proper combination of the three pigment primaries, or a secondary with its opposite primary, produces black.
  • 14. Color Models:  The purpose of a color model is to facilitate the specification of colors in some standard way. A color model is a specification of a coordinate system and a subspace within that system where each color is represented by a single point. Color models most commonly used in image processing are:  RGB model for color monitors and video cameras.  CMY and CMYK (cyan, magenta, yellow, black) models for color printing.  HSI (hue, saturation, intensity) model.
  • 15. The RGB color model:  In this model, each color appears in its primary colors red, green, and blue. This model is based on a Cartesian coordinate system. The color subspace is the cube shown in the figure below. The different colors in this model are points on or inside the cube, and are defined by vectors extending from the origin.
  • 16.  All color values R, G, and B have been normalized in the range [0, 1].However, we can represent each of R, G, and B from 0 to 255. Each RGB color image consists of three component images, one for each primary color as shown in the figure below. These three images are combined on the screen to produce a color image.
  • 17.  The CMY and CMYK color model Cyan, magenta, and yellow are the primary colors of pigments. Most printing devices such as color printers and copiers require CMY data input or perform an RGB to CMY conversion internally.
  • 18. The HIS color model:  The RGB and CMY color models are not suited for describing colors in terms of human interpretation. When we view a color object, we describe it by its hue, saturation, and brightness(intensity). Hence the HSI color model has been presented.  The HSI model decouples the intensity component from the color-carrying information (hue and saturation) in a color image. As a result, this model is an ideal tool for developing color image processing algorithms.
  • 19.  The hue, saturation, and intensity values can be obtained from the RGB color cube.  That is, we can convert any RGB point to a corresponding point is the HSI color model by working out the geometrical formulas.