SlideShare a Scribd company logo
Digital Image Processing
Relationships between pixels
• In this lecture, we consider several
important relationships between pixels in a
digital image.
Neighbors of a Pixel
• A pixel p at coordinates (x,y) has four horizontal and vertical
neighbors whose coordinates are given by:
(x+1,y), (x-1, y), (x, y+1), (x,y-1)
This set of pixels, called the 4-neighbors or p, is denoted by N4(p).
Each pixel is one unit distance from (x,y) and some of the neighbors
of p lie outside the digital image if (x,y) is on the border of the image.
(x, y-1)
(x-1, y) P (x,y) (x+1, y)
(x, y+1)
Neighbors of a Pixel
• The four diagonal neighbors of p have coordinates:
(x+1, y+1), (x+1, y-1), (x-1, y+1), (x-1, y-1)
and are denoted by ND (p).
These points, together with the 4-neighbors, are called the 8-neighbors of p,
denoted by N8 (p).
As before, some of the points in ND (p) and N8 (p) fall outside the image if (x,y)
is on the border of the image.
(x-1, y+1) (x+1, y-1)
P (x,y)
(x-1, y-1) (x+1, y+1)
(x-1, y+1) (x, y-1) (x+1, y-1)
(x-1, y) P (x,y) (x+1, y)
(x-1, y-1) (x, y+1) (x+1, y+1)
Adjacency and Connectivity
• Let V: a set of intensity values used to define
adjacency and connectivity.
• In a binary image, V = {1}, if we are referring
to adjacency of pixels with value 1.
• In a gray-scale image, the idea is the same,
but V typically contains more elements, for
example, V = {180, 181, 182, …, 200}
• If the possible intensity values 0 – 255, V set
can be any subset of these 256 values.
Types of Adjacency
1. 4-adjacency: Two pixels p and q with
values from V are 4-adjacent if q is in the
set N4(p).
2. 8-adjacency: Two pixels p and q with
values from V are 8-adjacent if q is in the
set N8(p).
3. m-adjacency =(mixed)
Types of Adjacency
• m-adjacency:
Two pixels p and q with values from V are
m-adjacent if :
• q is in N4(p) or
• q is in ND(p) and the set N4(p) ∩ N4(q) has no
pixel whose values are from V (no intersection)
• Important Note: the type of adjacency
used must be specified
Types of Adjacency
• Mixed adjacency is a modification of 8-
adjacency. It is introduced to eliminate the
ambiguities that often arise when 8-
adjacency is used.
• For example:
Types of Adjacency
• In this example, we can note that to connect between
two pixels (finding a path between two pixels):
– In 8-adjacency way, you can find multiple paths
between two pixels
– While, in m-adjacency, you can find only one path
between two pixels
• So, m-adjacency has eliminated the multiple path
connection that has been generated by the 8-
adjacency.
• Two subsets S1 and S2 are adjacent, if some pixel in
S1 is adjacent to some pixel in S2. Adjacent means,
either 4-, 8- or m-adjacency.
A Digital Path
• A digital path (or curve) from pixel p with
coordinate (x,y) to pixel q with coordinate (s,t)
is a sequence of distinct pixels with
coordinates (x0,y0), (x1,y1), …, (xn, yn) where
(x0,y0) = (x,y) and (xn, yn) = (s,t) and pixels (xi,
yi) and (xi-1, yi-1) are adjacent for 1 ≤ i ≤ n
• n is the length of the path
• If (x0,y0) = (xn, yn), the path is closed.
• We can specify 4-, 8- or m-paths depending
on the type of adjacency specified.
A Digital Path
• Return to the previous example:
In figure (b) the paths between the top right and
bottom right pixels are 8-paths. And the path
between the same 2 pixels in figure (c) is m-path
Connectivity
• Let S represent a subset of pixels in an
image, two pixels p and q are said to be
connected in S if there exists a path
between them consisting entirely of pixels
in S.
• For any pixel p in S, the set of pixels that
are connected to it in S is called a
connected component of S. If it only has
one connected component, then set S is
called a connected set.
Region and Boundary
• Region
Let R be a subset of pixels in an image, we
call R a region of the image if R is a
connected set.
• Boundary
The boundary (also called border or
contour) of a region R is the set of pixels in
the region that have one or more
neighbors that are not in R.
Region and Boundary
If R happens to be an entire image, then its boundary
is defined as the set of pixels in the first and last rows
and columns in the image.
This extra definition is required because an image has
no neighbors beyond its borders
Normally, when we refer to a region, we are referring
to subset of an image, and any pixels in the boundary
of the region that happen to coincide with the border of
the image are included implicitly as part of the region
boundary.
Distance Measures
• For pixels p, q and z, with coordinates
(x,y), (s,t) and (v,w), respectively, D is a
distance function if:
(a) D (p,q) ≥ 0 (D (p,q) = 0 iff p = q),
(b) D (p,q) = D (q, p), and
(c) D (p,z) ≤ D (p,q) + D (q,z).
Distance Measures
• The Euclidean Distance between p and q
is defined as:
De (p,q) = [(x – s)2 + (y - t)2]1/2
Pixels having a distance less than or equal
to some value r from (x,y) are the points
contained in a disk of
radius r centered at (x,y)
p (x,y)
q (s,t)
Distance Measures
• The D4 distance (also called city-block
distance) between p and q is defined as:
D4 (p,q) = | x – s | + | y – t |
Pixels having a D4 distance from
(x,y), less than or equal to some
value r form a Diamond
centered at (x,y)
p (x,y)
q (s,t)
D4
Distance Measures
Example:
The pixels with distance D4 ≤ 2 from (x,y)
form the following contours of constant
distance.
The pixels with D4 = 1 are
the 4-neighbors of (x,y)
Distance Measures
• The D8 distance (also called chessboard
distance) between p and q is defined as:
D8 (p,q) = max(| x – s |,| y – t |)
Pixels having a D8 distance from
(x,y), less than or equal to some
value r form a square
Centered at (x,y)
p (x,y)
q (s,t)
D8(b)
D8(a)
D8 = max(D8(a) , D8(b))
Distance Measures
Example:
D8 distance ≤ 2 from (x,y) form the following
contours of constant distance.
Distance Measures
• Dm distance:
is defined as the shortest m-path between
the points.
In this case, the distance between two
pixels will depend on the values of the
pixels along the path, as well as the values
of their neighbors.
Distance Measures
• Example:
Consider the following arrangement of
pixels and assume that p, p2, and p4 have
value 1 and that p1 and p3 can have can
have a value of 0 or 1
Suppose that we consider
the adjacency of pixels
values 1 (i.e. V = {1})
Distance Measures
• Cont. Example:
Now, to compute the Dm between points p
and p4
Here we have 4 cases:
Case1: If p1 =0 and p3 = 0
The length of the shortest m-path
(the Dm distance) is 2 (p, p2, p4)
Distance Measures
• Cont. Example:
Case2: If p1 =1 and p3 = 0
now, p1 and p will no longer be adjacent
(see m-adjacency definition)
then, the length of the shortest
path will be 3 (p, p1, p2, p4)
Distance Measures
• Cont. Example:
Case3: If p1 =0 and p3 = 1
The same applies here, and the shortest –
m-path will be 3 (p, p2, p3, p4)
Distance Measures
• Cont. Example:
Case4: If p1 =1 and p3 = 1
The length of the shortest m-path will be 4
(p, p1 , p2, p3, p4)

More Related Content

What's hot

Basics of pixel neighbor.
Basics of pixel neighbor.Basics of pixel neighbor.
Basics of pixel neighbor.
raheel rajput
 
Introduction to Digital Image Processing
Introduction to Digital Image ProcessingIntroduction to Digital Image Processing
Introduction to Digital Image Processing
kalaimuthu2
 
Image trnsformations
Image trnsformationsImage trnsformations
Image trnsformations
John Williams
 
Bresenham circle
Bresenham circleBresenham circle
Bresenham circle
Taher Barodawala
 
Pixelrelationships
PixelrelationshipsPixelrelationships
Pixelrelationships
Harshavardhan Reddy
 
2D Transformations(Computer Graphics)
2D Transformations(Computer Graphics)2D Transformations(Computer Graphics)
2D Transformations(Computer Graphics)
AditiPatni3
 
Dip 5 mathematical preliminaries
Dip 5 mathematical preliminariesDip 5 mathematical preliminaries
Dip 5 mathematical preliminaries
Manas Mantri
 
Digital Image Processing
Digital Image ProcessingDigital Image Processing
Digital Image Processing
lalithambiga kamaraj
 
Gamma & Beta functions
Gamma & Beta functionsGamma & Beta functions
Gamma & Beta functions
Selvaraj John
 
Unit 1 chapter 1 Design and Analysis of Algorithms
Unit 1   chapter 1 Design and Analysis of AlgorithmsUnit 1   chapter 1 Design and Analysis of Algorithms
Unit 1 chapter 1 Design and Analysis of Algorithms
P. Subathra Kishore, KAMARAJ College of Engineering and Technology, Madurai
 
Using Laplace Transforms to Solve Differential Equations
Using Laplace Transforms to Solve Differential EquationsUsing Laplace Transforms to Solve Differential Equations
Using Laplace Transforms to Solve Differential Equations
George Stevens
 
Gaussian noise
Gaussian noiseGaussian noise
Gaussian noise
Tothepoint Arora
 
Object oriented analysis and design unit- v
Object oriented analysis and design unit- vObject oriented analysis and design unit- v
Object oriented analysis and design unit- v
Shri Shankaracharya College, Bhilai,Junwani
 
Comuter graphics ellipse drawing algorithm
Comuter graphics ellipse drawing algorithmComuter graphics ellipse drawing algorithm
Comuter graphics ellipse drawing algorithm
Rachana Marathe
 
COM2304: Intensity Transformation and Spatial Filtering – II Spatial Filterin...
COM2304: Intensity Transformation and Spatial Filtering – II Spatial Filterin...COM2304: Intensity Transformation and Spatial Filtering – II Spatial Filterin...
COM2304: Intensity Transformation and Spatial Filtering – II Spatial Filterin...
Hemantha Kulathilake
 
Pixel relationships
Pixel relationshipsPixel relationships
Walsh transform
Walsh transformWalsh transform
Walsh transform
SachinMaithani1
 
Fractional Calculus
Fractional CalculusFractional Calculus
Fractional Calculus
VRRITC
 
Unix lab manual
Unix lab manualUnix lab manual
Unix lab manual
Tanzeem Syed
 
Data compression using huffman coding
Data compression using huffman codingData compression using huffman coding
Data compression using huffman coding
SATYENDRAKUMAR279
 

What's hot (20)

Basics of pixel neighbor.
Basics of pixel neighbor.Basics of pixel neighbor.
Basics of pixel neighbor.
 
Introduction to Digital Image Processing
Introduction to Digital Image ProcessingIntroduction to Digital Image Processing
Introduction to Digital Image Processing
 
Image trnsformations
Image trnsformationsImage trnsformations
Image trnsformations
 
Bresenham circle
Bresenham circleBresenham circle
Bresenham circle
 
Pixelrelationships
PixelrelationshipsPixelrelationships
Pixelrelationships
 
2D Transformations(Computer Graphics)
2D Transformations(Computer Graphics)2D Transformations(Computer Graphics)
2D Transformations(Computer Graphics)
 
Dip 5 mathematical preliminaries
Dip 5 mathematical preliminariesDip 5 mathematical preliminaries
Dip 5 mathematical preliminaries
 
Digital Image Processing
Digital Image ProcessingDigital Image Processing
Digital Image Processing
 
Gamma & Beta functions
Gamma & Beta functionsGamma & Beta functions
Gamma & Beta functions
 
Unit 1 chapter 1 Design and Analysis of Algorithms
Unit 1   chapter 1 Design and Analysis of AlgorithmsUnit 1   chapter 1 Design and Analysis of Algorithms
Unit 1 chapter 1 Design and Analysis of Algorithms
 
Using Laplace Transforms to Solve Differential Equations
Using Laplace Transforms to Solve Differential EquationsUsing Laplace Transforms to Solve Differential Equations
Using Laplace Transforms to Solve Differential Equations
 
Gaussian noise
Gaussian noiseGaussian noise
Gaussian noise
 
Object oriented analysis and design unit- v
Object oriented analysis and design unit- vObject oriented analysis and design unit- v
Object oriented analysis and design unit- v
 
Comuter graphics ellipse drawing algorithm
Comuter graphics ellipse drawing algorithmComuter graphics ellipse drawing algorithm
Comuter graphics ellipse drawing algorithm
 
COM2304: Intensity Transformation and Spatial Filtering – II Spatial Filterin...
COM2304: Intensity Transformation and Spatial Filtering – II Spatial Filterin...COM2304: Intensity Transformation and Spatial Filtering – II Spatial Filterin...
COM2304: Intensity Transformation and Spatial Filtering – II Spatial Filterin...
 
Pixel relationships
Pixel relationshipsPixel relationships
Pixel relationships
 
Walsh transform
Walsh transformWalsh transform
Walsh transform
 
Fractional Calculus
Fractional CalculusFractional Calculus
Fractional Calculus
 
Unix lab manual
Unix lab manualUnix lab manual
Unix lab manual
 
Data compression using huffman coding
Data compression using huffman codingData compression using huffman coding
Data compression using huffman coding
 

Similar to 3.ppt

Lecture4.ppt
Lecture4.pptLecture4.ppt
Lecture4.ppt
SivaSankar306103
 
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
 
Digital image processing fundamental explanation
Digital image processing fundamental explanationDigital image processing fundamental explanation
Digital image processing fundamental explanation
Tirusew1
 
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
Praveen Kumar
 
Image Acquisition and Representation
Image Acquisition and RepresentationImage Acquisition and Representation
Image Acquisition and Representation
Amnaakhaan
 
Ip unit 1
Ip unit 1Ip unit 1
Ip unit 1
Dr. Radhey Shyam
 
pixelrelationships-m-1.pptx.ppt
pixelrelationships-m-1.pptx.pptpixelrelationships-m-1.pptx.ppt
pixelrelationships-m-1.pptx.ppt
JayanthHN1
 
chap2.ppt
chap2.pptchap2.ppt
chap2.ppt
akshaya870130
 
Digital Image Fundamentals 1.ppt
Digital Image Fundamentals 1.pptDigital Image Fundamentals 1.ppt
Digital Image Fundamentals 1.ppt
MrsSDivyaBME
 
03 digital image fundamentals DIP
03 digital image fundamentals DIP03 digital image fundamentals DIP
03 digital image fundamentals DIP
babak danyal
 
The Digital Image Processing Q@A
The Digital Image Processing Q@AThe Digital Image Processing Q@A
The Digital Image Processing Q@A
Chung Hua Universit
 
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
 
2 digital image fundamentals
2 digital image fundamentals2 digital image fundamentals
2 digital image fundamentals
BHAGYAPRASADBUGGE
 
Chapter 2 Image Processing: Pixel Relation
Chapter 2 Image Processing: Pixel RelationChapter 2 Image Processing: Pixel Relation
Chapter 2 Image Processing: Pixel Relation
Varun Ojha
 
2. IP Fundamentals.pdf
2. IP Fundamentals.pdf2. IP Fundamentals.pdf
2. IP Fundamentals.pdf
DrNVaijayanthiDeanRD
 
digTop.ppt
digTop.pptdigTop.ppt
digTop.ppt
mohammadhaqqi3
 
digital image processing chapter two, fundamentals
digital image processing chapter two, fundamentalsdigital image processing chapter two, fundamentals
digital image processing chapter two, fundamentals
KNaveenKumarECE
 
Metric space
Metric spaceMetric space
Metric space
NaliniSPatil
 
Output primitives in Computer Graphics
Output primitives in Computer GraphicsOutput primitives in Computer Graphics
Output primitives in Computer Graphics
Kamal Acharya
 
Digital Distance Geometry
Digital Distance GeometryDigital Distance Geometry
Digital Distance Geometry
ppd1961
 

Similar to 3.ppt (20)

Lecture4.ppt
Lecture4.pptLecture4.ppt
Lecture4.ppt
 
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
 
Digital image processing fundamental explanation
Digital image processing fundamental explanationDigital image processing fundamental explanation
Digital image processing fundamental explanation
 
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
 
Image Acquisition and Representation
Image Acquisition and RepresentationImage Acquisition and Representation
Image Acquisition and Representation
 
Ip unit 1
Ip unit 1Ip unit 1
Ip unit 1
 
pixelrelationships-m-1.pptx.ppt
pixelrelationships-m-1.pptx.pptpixelrelationships-m-1.pptx.ppt
pixelrelationships-m-1.pptx.ppt
 
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
 
03 digital image fundamentals DIP
03 digital image fundamentals DIP03 digital image fundamentals DIP
03 digital image fundamentals DIP
 
The Digital Image Processing Q@A
The Digital Image Processing Q@AThe Digital Image Processing Q@A
The Digital Image Processing Q@A
 
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.
 
2 digital image fundamentals
2 digital image fundamentals2 digital image fundamentals
2 digital image fundamentals
 
Chapter 2 Image Processing: Pixel Relation
Chapter 2 Image Processing: Pixel RelationChapter 2 Image Processing: Pixel Relation
Chapter 2 Image Processing: Pixel Relation
 
2. IP Fundamentals.pdf
2. IP Fundamentals.pdf2. IP Fundamentals.pdf
2. IP Fundamentals.pdf
 
digTop.ppt
digTop.pptdigTop.ppt
digTop.ppt
 
digital image processing chapter two, fundamentals
digital image processing chapter two, fundamentalsdigital image processing chapter two, fundamentals
digital image processing chapter two, fundamentals
 
Metric space
Metric spaceMetric space
Metric space
 
Output primitives in Computer Graphics
Output primitives in Computer GraphicsOutput primitives in Computer Graphics
Output primitives in Computer Graphics
 
Digital Distance Geometry
Digital Distance GeometryDigital Distance Geometry
Digital Distance Geometry
 

Recently uploaded

Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
panagenda
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
kumardaparthi1024
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
Neo4j
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
名前 です男
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
Daiki Mogmet Ito
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
panagenda
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
Zilliz
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
Kumud Singh
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
Edge AI and Vision Alliance
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
Alpen-Adria-Universität
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
SOFTTECHHUB
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
Zilliz
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Speck&Tech
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
tolgahangng
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
Neo4j
 

Recently uploaded (20)

Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
 

3.ppt

  • 2. • In this lecture, we consider several important relationships between pixels in a digital image.
  • 3. Neighbors of a Pixel • A pixel p at coordinates (x,y) has four horizontal and vertical neighbors whose coordinates are given by: (x+1,y), (x-1, y), (x, y+1), (x,y-1) This set of pixels, called the 4-neighbors or p, is denoted by N4(p). Each pixel is one unit distance from (x,y) and some of the neighbors of p lie outside the digital image if (x,y) is on the border of the image. (x, y-1) (x-1, y) P (x,y) (x+1, y) (x, y+1)
  • 4. Neighbors of a Pixel • The four diagonal neighbors of p have coordinates: (x+1, y+1), (x+1, y-1), (x-1, y+1), (x-1, y-1) and are denoted by ND (p). These points, together with the 4-neighbors, are called the 8-neighbors of p, denoted by N8 (p). As before, some of the points in ND (p) and N8 (p) fall outside the image if (x,y) is on the border of the image. (x-1, y+1) (x+1, y-1) P (x,y) (x-1, y-1) (x+1, y+1) (x-1, y+1) (x, y-1) (x+1, y-1) (x-1, y) P (x,y) (x+1, y) (x-1, y-1) (x, y+1) (x+1, y+1)
  • 5. Adjacency and Connectivity • Let V: a set of intensity values used to define adjacency and connectivity. • In a binary image, V = {1}, if we are referring to adjacency of pixels with value 1. • In a gray-scale image, the idea is the same, but V typically contains more elements, for example, V = {180, 181, 182, …, 200} • If the possible intensity values 0 – 255, V set can be any subset of these 256 values.
  • 6. Types of Adjacency 1. 4-adjacency: Two pixels p and q with values from V are 4-adjacent if q is in the set N4(p). 2. 8-adjacency: Two pixels p and q with values from V are 8-adjacent if q is in the set N8(p). 3. m-adjacency =(mixed)
  • 7. Types of Adjacency • m-adjacency: Two pixels p and q with values from V are m-adjacent if : • q is in N4(p) or • q is in ND(p) and the set N4(p) ∩ N4(q) has no pixel whose values are from V (no intersection) • Important Note: the type of adjacency used must be specified
  • 8. Types of Adjacency • Mixed adjacency is a modification of 8- adjacency. It is introduced to eliminate the ambiguities that often arise when 8- adjacency is used. • For example:
  • 9. Types of Adjacency • In this example, we can note that to connect between two pixels (finding a path between two pixels): – In 8-adjacency way, you can find multiple paths between two pixels – While, in m-adjacency, you can find only one path between two pixels • So, m-adjacency has eliminated the multiple path connection that has been generated by the 8- adjacency. • Two subsets S1 and S2 are adjacent, if some pixel in S1 is adjacent to some pixel in S2. Adjacent means, either 4-, 8- or m-adjacency.
  • 10. A Digital Path • A digital path (or curve) from pixel p with coordinate (x,y) to pixel q with coordinate (s,t) is a sequence of distinct pixels with coordinates (x0,y0), (x1,y1), …, (xn, yn) where (x0,y0) = (x,y) and (xn, yn) = (s,t) and pixels (xi, yi) and (xi-1, yi-1) are adjacent for 1 ≤ i ≤ n • n is the length of the path • If (x0,y0) = (xn, yn), the path is closed. • We can specify 4-, 8- or m-paths depending on the type of adjacency specified.
  • 11. A Digital Path • Return to the previous example: In figure (b) the paths between the top right and bottom right pixels are 8-paths. And the path between the same 2 pixels in figure (c) is m-path
  • 12. Connectivity • Let S represent a subset of pixels in an image, two pixels p and q are said to be connected in S if there exists a path between them consisting entirely of pixels in S. • For any pixel p in S, the set of pixels that are connected to it in S is called a connected component of S. If it only has one connected component, then set S is called a connected set.
  • 13. Region and Boundary • Region Let R be a subset of pixels in an image, we call R a region of the image if R is a connected set. • Boundary The boundary (also called border or contour) of a region R is the set of pixels in the region that have one or more neighbors that are not in R.
  • 14. Region and Boundary If R happens to be an entire image, then its boundary is defined as the set of pixels in the first and last rows and columns in the image. This extra definition is required because an image has no neighbors beyond its borders Normally, when we refer to a region, we are referring to subset of an image, and any pixels in the boundary of the region that happen to coincide with the border of the image are included implicitly as part of the region boundary.
  • 15. Distance Measures • For pixels p, q and z, with coordinates (x,y), (s,t) and (v,w), respectively, D is a distance function if: (a) D (p,q) ≥ 0 (D (p,q) = 0 iff p = q), (b) D (p,q) = D (q, p), and (c) D (p,z) ≤ D (p,q) + D (q,z).
  • 16. Distance Measures • The Euclidean Distance between p and q is defined as: De (p,q) = [(x – s)2 + (y - t)2]1/2 Pixels having a distance less than or equal to some value r from (x,y) are the points contained in a disk of radius r centered at (x,y) p (x,y) q (s,t)
  • 17. Distance Measures • The D4 distance (also called city-block distance) between p and q is defined as: D4 (p,q) = | x – s | + | y – t | Pixels having a D4 distance from (x,y), less than or equal to some value r form a Diamond centered at (x,y) p (x,y) q (s,t) D4
  • 18. Distance Measures Example: The pixels with distance D4 ≤ 2 from (x,y) form the following contours of constant distance. The pixels with D4 = 1 are the 4-neighbors of (x,y)
  • 19. Distance Measures • The D8 distance (also called chessboard distance) between p and q is defined as: D8 (p,q) = max(| x – s |,| y – t |) Pixels having a D8 distance from (x,y), less than or equal to some value r form a square Centered at (x,y) p (x,y) q (s,t) D8(b) D8(a) D8 = max(D8(a) , D8(b))
  • 20. Distance Measures Example: D8 distance ≤ 2 from (x,y) form the following contours of constant distance.
  • 21. Distance Measures • Dm distance: is defined as the shortest m-path between the points. In this case, the distance between two pixels will depend on the values of the pixels along the path, as well as the values of their neighbors.
  • 22. Distance Measures • Example: Consider the following arrangement of pixels and assume that p, p2, and p4 have value 1 and that p1 and p3 can have can have a value of 0 or 1 Suppose that we consider the adjacency of pixels values 1 (i.e. V = {1})
  • 23. Distance Measures • Cont. Example: Now, to compute the Dm between points p and p4 Here we have 4 cases: Case1: If p1 =0 and p3 = 0 The length of the shortest m-path (the Dm distance) is 2 (p, p2, p4)
  • 24. Distance Measures • Cont. Example: Case2: If p1 =1 and p3 = 0 now, p1 and p will no longer be adjacent (see m-adjacency definition) then, the length of the shortest path will be 3 (p, p1, p2, p4)
  • 25. Distance Measures • Cont. Example: Case3: If p1 =0 and p3 = 1 The same applies here, and the shortest – m-path will be 3 (p, p2, p3, p4)
  • 26. Distance Measures • Cont. Example: Case4: If p1 =1 and p3 = 1 The length of the shortest m-path will be 4 (p, p1 , p2, p3, p4)