SlideShare a Scribd company logo
1 of 14
Digital Image
Processing.
COURSE INSTRUCTOR
DR IMRAN MUGHAL.
PREPARED BY
RAJA OSAMA
RAJA RAHEEL
Content
• Basic Relationship between pixels.
• Pixel adjacency
• Pixel connectivity
• Pixel region
• Region adjacency
• Region boundary.
Neighbors of pixels.
• A pixel p at location (x , y) has two horizontal and two vertical
neighbors.
• This set of four pixels (vertical & horizontal) is called 4 neighbors of
pixel. p=N4(p)
• If the p is boundary pixel then it will have less number of neighbor
pixels.
p(x , y-1)
p(x -1 , y) p(x , y) p(x+1 , y)
P(x , y+1)
Neighbors of pixel
• A pixel p at location ( x ,y ) has 4 diagonal neighbors. P=ND(p)
• If p is neighbor pixel then it will have less number of neighbor pixels.
p(x-1 , y+1) p(x+1 , y-1)
P(x , y)
p(x-1 , y-1) P(x+1 , y+1)
Neighbors of pixels
• Union of all 4 (vertical & horizontal ) and 4 ( diagonal ) neighbors is
called 8 neighbors.
• N8(p) =N4(p) U PD(p)
• If p is boundary pixel then it will have less number of neighbor pixels.
p(x-1 , y+1) p(x , y-1) p(x+1 , y-1)
p(x-1 , y) p(x , y) p(x+1 , y)
p(x-1 , y-1) p(x , y+1) P(x+1 , y+1)
Adjacency
4-Adjacency:-
• Two pixels are adjacent if they have same intensity value and they are
neighbors in set of p = N4(p).
• In binary image two pixels are adjacent if they are neighbors and have
same intensity either 0 or 1.
1 0 0
0 0 1
1 1 1
Adjacency
Two pixels are adjacent if they have same intensity value and they are
neighbors in set of p = N8(p).
1 0 0
0 0 1
1 1 1
Connectivity
• Two pixels are said to be connected if a path exist between them.
• Pixel connectivity based on 4 connectivity
Pixel Region & Region adjacency
• Region can be a subset image made by pixels.
• Region can be grow according to your need.
• impixelregion is function to set pixel region in an image.
Pixel Region and Region Adjacency
Pixel Region and Region Adjacency
Region adjacency
• R1 and R2 will said to be Region adjacent if their union form a
connected set.
• Regions that are not adjacent are called disjoint.
• There can be two type of region adjacency 4&8 adjacency.
Pixel Region and Region Adjacency
EXAMPLE:
R1
R2
Above regions are adjacent using only 8-adjacency.
1 1 1
0 0 1
0 1 0
0 0 1
0 0 1
0 1 0
Boundary of Region
• The boundary of the region R is the set of pixels in the region that
have one or more neighbors that are not in R.
0 0 0 0 0
1 0 1 0 1
0 1 0 1 0
1 0 1 0 0
1 0 1 1 1
0 1 0 1 0
Thank you!

More Related Content

What's hot

Edge linking in image processing
Edge linking in image processingEdge linking in image processing
Edge linking in image processingVARUN KUMAR
 
Image Enhancement using Frequency Domain Filters
Image Enhancement using Frequency Domain FiltersImage Enhancement using Frequency Domain Filters
Image Enhancement using Frequency Domain FiltersKarthika Ramachandran
 
Homomorphic filtering
Homomorphic filteringHomomorphic filtering
Homomorphic filteringGautam Saxena
 
Image Restoration (Digital Image Processing)
Image Restoration (Digital Image Processing)Image Restoration (Digital Image Processing)
Image Restoration (Digital Image Processing)Kalyan Acharjya
 
Intensity Transformation and Spatial filtering
Intensity Transformation and Spatial filteringIntensity Transformation and Spatial filtering
Intensity Transformation and Spatial filteringShajun Nisha
 
Wavelet transform in image compression
Wavelet transform in image compressionWavelet transform in image compression
Wavelet transform in image compressionjeevithaelangovan
 
Color fundamentals and color models - Digital Image Processing
Color fundamentals and color models - Digital Image ProcessingColor fundamentals and color models - Digital Image Processing
Color fundamentals and color models - Digital Image ProcessingAmna
 
DIGITAL IMAGE PROCESSING - Day 4 Image Transform
DIGITAL IMAGE PROCESSING - Day 4 Image TransformDIGITAL IMAGE PROCESSING - Day 4 Image Transform
DIGITAL IMAGE PROCESSING - Day 4 Image Transformvijayanand Kandaswamy
 
Image Processing: Spatial filters
Image Processing: Spatial filtersImage Processing: Spatial filters
Image Processing: Spatial filtersA B Shinde
 
Image filtering in Digital image processing
Image filtering in Digital image processingImage filtering in Digital image processing
Image filtering in Digital image processingAbinaya B
 
DIGITAL IMAGE PROCESSING - LECTURE NOTES
DIGITAL IMAGE PROCESSING - LECTURE NOTESDIGITAL IMAGE PROCESSING - LECTURE NOTES
DIGITAL IMAGE PROCESSING - LECTURE NOTESEzhilya venkat
 
Back face detection
Back face detectionBack face detection
Back face detectionPooja Dixit
 
Image Filtering in the Frequency Domain
Image Filtering in the Frequency DomainImage Filtering in the Frequency Domain
Image Filtering in the Frequency DomainAmnaakhaan
 
Image representation
Image representationImage representation
Image representationRahul Dadwal
 

What's hot (20)

Edge linking in image processing
Edge linking in image processingEdge linking in image processing
Edge linking in image processing
 
Image Enhancement using Frequency Domain Filters
Image Enhancement using Frequency Domain FiltersImage Enhancement using Frequency Domain Filters
Image Enhancement using Frequency Domain Filters
 
image compression ppt
image compression pptimage compression ppt
image compression ppt
 
Homomorphic filtering
Homomorphic filteringHomomorphic filtering
Homomorphic filtering
 
Sharpening spatial filters
Sharpening spatial filtersSharpening spatial filters
Sharpening spatial filters
 
Image Restoration (Digital Image Processing)
Image Restoration (Digital Image Processing)Image Restoration (Digital Image Processing)
Image Restoration (Digital Image Processing)
 
Intensity Transformation and Spatial filtering
Intensity Transformation and Spatial filteringIntensity Transformation and Spatial filtering
Intensity Transformation and Spatial filtering
 
Wavelet transform in image compression
Wavelet transform in image compressionWavelet transform in image compression
Wavelet transform in image compression
 
Color fundamentals and color models - Digital Image Processing
Color fundamentals and color models - Digital Image ProcessingColor fundamentals and color models - Digital Image Processing
Color fundamentals and color models - Digital Image Processing
 
Digital Image Processing
Digital Image ProcessingDigital Image Processing
Digital Image Processing
 
Image segmentation
Image segmentationImage segmentation
Image segmentation
 
DIGITAL IMAGE PROCESSING - Day 4 Image Transform
DIGITAL IMAGE PROCESSING - Day 4 Image TransformDIGITAL IMAGE PROCESSING - Day 4 Image Transform
DIGITAL IMAGE PROCESSING - Day 4 Image Transform
 
Wiener Filter
Wiener FilterWiener Filter
Wiener Filter
 
Image Processing: Spatial filters
Image Processing: Spatial filtersImage Processing: Spatial filters
Image Processing: Spatial filters
 
Image filtering in Digital image processing
Image filtering in Digital image processingImage filtering in Digital image processing
Image filtering in Digital image processing
 
DIGITAL IMAGE PROCESSING - LECTURE NOTES
DIGITAL IMAGE PROCESSING - LECTURE NOTESDIGITAL IMAGE PROCESSING - LECTURE NOTES
DIGITAL IMAGE PROCESSING - LECTURE NOTES
 
Back face detection
Back face detectionBack face detection
Back face detection
 
Jpeg standards
Jpeg   standardsJpeg   standards
Jpeg standards
 
Image Filtering in the Frequency Domain
Image Filtering in the Frequency DomainImage Filtering in the Frequency Domain
Image Filtering in the Frequency Domain
 
Image representation
Image representationImage representation
Image representation
 

Similar to Basics of pixel neighbor.

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.pdfSomeone413715
 
DIP7_Relationships_between_pixels.ppt
DIP7_Relationships_between_pixels.pptDIP7_Relationships_between_pixels.ppt
DIP7_Relationships_between_pixels.pptakshaya870130
 
digital image processing chapter two, fundamentals
digital image processing chapter two, fundamentalsdigital image processing chapter two, fundamentals
digital image processing chapter two, fundamentalsKNaveenKumarECE
 
Digital image processing fundamental explanation
Digital image processing fundamental explanationDigital image processing fundamental explanation
Digital image processing fundamental explanationTirusew1
 
2 digital image fundamentals
2 digital image fundamentals2 digital image fundamentals
2 digital image fundamentalsBHAGYAPRASADBUGGE
 
Lecture 4 Relationship between pixels
Lecture 4 Relationship between pixelsLecture 4 Relationship between pixels
Lecture 4 Relationship between pixelsVARUN KUMAR
 
Digital Image Fundamentals 1.ppt
Digital Image Fundamentals 1.pptDigital Image Fundamentals 1.ppt
Digital Image Fundamentals 1.pptMrsSDivyaBME
 
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.pptPraveen Kumar
 
Region based segmentation
Region based segmentationRegion based segmentation
Region based segmentationramya marichamy
 
Image processing 1-lectures
Image processing  1-lecturesImage processing  1-lectures
Image processing 1-lecturesTaymoor Nazmy
 
Digital_Image_Processing with examples.pdf
Digital_Image_Processing with examples.pdfDigital_Image_Processing with examples.pdf
Digital_Image_Processing with examples.pdfNagabhushanaRao16
 
Digital Image Fundamentals
Digital Image FundamentalsDigital Image Fundamentals
Digital Image FundamentalsKalyan Acharjya
 
12-Image enhancement and filtering.ppt
12-Image enhancement and filtering.ppt12-Image enhancement and filtering.ppt
12-Image enhancement and filtering.pptAJAYMALIK97
 

Similar to Basics of pixel neighbor. (20)

2. IP Fundamentals.pdf
2. IP Fundamentals.pdf2. IP Fundamentals.pdf
2. IP Fundamentals.pdf
 
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
 
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 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
 
Digital image processing fundamental explanation
Digital image processing fundamental explanationDigital image processing fundamental explanation
Digital image processing fundamental explanation
 
2 digital image fundamentals
2 digital image fundamentals2 digital image fundamentals
2 digital image fundamentals
 
Lecture 4 Relationship between pixels
Lecture 4 Relationship between pixelsLecture 4 Relationship between pixels
Lecture 4 Relationship between pixels
 
chap2.ppt
chap2.pptchap2.ppt
chap2.ppt
 
Digital Image Fundamentals 1.ppt
Digital Image Fundamentals 1.pptDigital Image Fundamentals 1.ppt
Digital Image Fundamentals 1.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
 
Region based segmentation
Region based segmentationRegion based segmentation
Region based segmentation
 
Image processing 1-lectures
Image processing  1-lecturesImage processing  1-lectures
Image processing 1-lectures
 
Digital Image Fundamentals - II
Digital Image Fundamentals - IIDigital Image Fundamentals - II
Digital Image Fundamentals - II
 
Digital_Image_Processing with examples.pdf
Digital_Image_Processing with examples.pdfDigital_Image_Processing with examples.pdf
Digital_Image_Processing with examples.pdf
 
Digital Image Fundamentals
Digital Image FundamentalsDigital Image Fundamentals
Digital Image Fundamentals
 
12-Image enhancement and filtering.ppt
12-Image enhancement and filtering.ppt12-Image enhancement and filtering.ppt
12-Image enhancement and filtering.ppt
 
Lecture 4
Lecture 4Lecture 4
Lecture 4
 
Ip unit 1
Ip unit 1Ip unit 1
Ip unit 1
 

Recently uploaded

Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfakmcokerachita
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...M56BOOKSTORE PRODUCT/SERVICE
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfSumit Tiwari
 

Recently uploaded (20)

Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdf
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
 

Basics of pixel neighbor.

  • 1. Digital Image Processing. COURSE INSTRUCTOR DR IMRAN MUGHAL. PREPARED BY RAJA OSAMA RAJA RAHEEL
  • 2. Content • Basic Relationship between pixels. • Pixel adjacency • Pixel connectivity • Pixel region • Region adjacency • Region boundary.
  • 3. Neighbors of pixels. • A pixel p at location (x , y) has two horizontal and two vertical neighbors. • This set of four pixels (vertical & horizontal) is called 4 neighbors of pixel. p=N4(p) • If the p is boundary pixel then it will have less number of neighbor pixels. p(x , y-1) p(x -1 , y) p(x , y) p(x+1 , y) P(x , y+1)
  • 4. Neighbors of pixel • A pixel p at location ( x ,y ) has 4 diagonal neighbors. P=ND(p) • If p is neighbor pixel then it will have less number of neighbor pixels. p(x-1 , y+1) p(x+1 , y-1) P(x , y) p(x-1 , y-1) P(x+1 , y+1)
  • 5. Neighbors of pixels • Union of all 4 (vertical & horizontal ) and 4 ( diagonal ) neighbors is called 8 neighbors. • N8(p) =N4(p) U PD(p) • If p is boundary pixel then it will have less number of neighbor pixels. p(x-1 , y+1) p(x , y-1) p(x+1 , y-1) p(x-1 , y) p(x , y) p(x+1 , y) p(x-1 , y-1) p(x , y+1) P(x+1 , y+1)
  • 6. Adjacency 4-Adjacency:- • Two pixels are adjacent if they have same intensity value and they are neighbors in set of p = N4(p). • In binary image two pixels are adjacent if they are neighbors and have same intensity either 0 or 1. 1 0 0 0 0 1 1 1 1
  • 7. Adjacency Two pixels are adjacent if they have same intensity value and they are neighbors in set of p = N8(p). 1 0 0 0 0 1 1 1 1
  • 8. Connectivity • Two pixels are said to be connected if a path exist between them. • Pixel connectivity based on 4 connectivity
  • 9. Pixel Region & Region adjacency • Region can be a subset image made by pixels. • Region can be grow according to your need. • impixelregion is function to set pixel region in an image.
  • 10. Pixel Region and Region Adjacency
  • 11. Pixel Region and Region Adjacency Region adjacency • R1 and R2 will said to be Region adjacent if their union form a connected set. • Regions that are not adjacent are called disjoint. • There can be two type of region adjacency 4&8 adjacency.
  • 12. Pixel Region and Region Adjacency EXAMPLE: R1 R2 Above regions are adjacent using only 8-adjacency. 1 1 1 0 0 1 0 1 0 0 0 1 0 0 1 0 1 0
  • 13. Boundary of Region • The boundary of the region R is the set of pixels in the region that have one or more neighbors that are not in R. 0 0 0 0 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 0 1 0 1 1 1 0 1 0 1 0