SlideShare a Scribd company logo
1 of 25
Download to read offline
Introduction to Graphs and their
Ability to Represent Images
Martin Cerman
•  Graph G = (V,E)
•  Set of vertices V
•  Set of edges E, where E ⊂  V x V
•  Edges can be directed or undirected
Graph Definition
2	
  
V = {1, 2, 3, 4, 5}
E = {(1,2), (2,3), (3,2), (4,3), (4,1), (4,5), (5,5)}
1	
  
2	
  
3	
  
4	
  
5	
  
1
1
=	
  
•  Parallel / Double edges
•  Self-loops
•  Simple graph: contains NO parallel edges and NO self-loops
•  Multigraph: contains parallel edges and/or self-loops
Graph Definition
3	
  
•  Planar graphs
•  Contains no crossing edges
•  Tree
•  Connects all vertices without cycles
•  Forest
•  All connected components are trees
Graph Definition
4	
  
•  Vertices generally stored in array or vector
•  Most common data-structures to store edges
•  Adjacency list
•  Adjacency matrix
•  Incidence matrix
•  Edge data-structure defines complexity of graph operations
•  Storage- and computational cost
•  Operations for example: add edge, remove edge, check adjacency,…
Graph Data-structure
5	
  
•  Collection of unordered linked lists, one for each vertex
•  Great for representation of sparse graphs
Adjacency List
6	
  
1	
  
2	
  
3	
  
4	
  
5	
  
1 2 3 4 5
2 3 2 1 5
4 3
5
Graph	
  opera*on	
   Complexity	
  
Store	
  graph	
   O(|V|+|E|)	
  
Add	
  Vertex	
   O(1)	
  
Add	
  Edge	
   O(1)	
  
Remove	
  Vertex	
   O(|E|)	
  
Remove	
  Edge	
   O(|E|)	
  
Adjacency	
  check	
   O(|V|)	
  
V
•  Square matrix with side length |V|
•  Describes if two vertices are adjacent
•  Symmetric if undirected graph, binary if simple graph
Adjacency Matrix
7	
  
1	
  
2	
  
3	
  
4	
  
5	
  
Graph	
  opera*on	
   Complexity	
  
Store	
  graph	
   O(|V|²)	
  
Add	
  Vertex	
   O(|V|²)	
  
Add	
  Edge	
   O(1)	
  
Remove	
  Vertex	
   O(|V|²)	
  
Remove	
  Edge	
   O(1)	
  
Adjacency	
  check	
   O(1)	
  
1	
  
1	
  
1	
   1	
  
1	
   1	
   1	
  
1	
  
V
V
•  Matrix of size |V| x |E|
•  Describes incidence relationship between vertices and edges
Incidence Matrix
8	
  
1	
  
2	
  
3	
  
4	
  
5	
  
Graph	
  opera*on	
   Complexity	
  
Store	
  graph	
   O(|V|*|E|)	
  
Add	
  Vertex	
   O(|V|*|E|)	
  
Add	
  Edge	
   O(|V|*|E|)	
  
Remove	
  Vertex	
   O(|V|*|E|)	
  
Remove	
  Edge	
   O(|V|*|E|)	
  
Adjacency	
  check	
   O(|E|)	
  
1	
   2	
   3	
   4	
   5	
  
a	
   1	
   1	
  
b	
   1	
   1	
  
c	
   1	
   1	
  
d	
   1	
   1	
  
e	
   1	
   1	
  
f	
   1	
  
V
E
c
b
d
a
e
f
Complexity Comparison
9	
  
Adjacency	
  List	
   Adjacency	
  Matrix	
   Incidence	
  Matrix	
  
Store	
  graph	
   O(|V|+|E|)	
   O(|V|²)	
   O(|V|*|E|)	
  
Add	
  Vertex	
   O(1)	
   O(|V|²)	
   O(|V|*|E|)	
  
Add	
  Edge	
   O(1)	
   O(1)	
   O(|V|*|E|)	
  
Remove	
  Vertex	
   O(|E|)	
   O(|V|²)	
   O(|V|*|E|)	
  
Remove	
  Edge	
   O(|E|)	
   O(1)	
   O(|V|*|E|)	
  
Adjacency	
  check	
   O(|V|)	
   O(1)	
   O(|E|)	
  
•  Choose data-structure based on algorithm needs !
•  Vertex merging (Edge contraction)
•  Edge removal
Graph Reduction Operations
10	
  
•  Built by applying reduction operations to a graph
•  Lowest level stores original graph
•  Top level stores maximally reduced graph (single vertex)
Graph Pyramid
11	
  
•  Vertices describe pixels
•  Edges describe adjacency relationships between pixels
•  4-connected image graph is always planar
Graphs and Images
12	
  
•  Simplified image graph
•  Vertices describe connected regions of any shape and size
•  Edges describe adjacency relationships between regions
•  Simple graph – no multiple edges, no self-loops
Region Adjacency Graph
13	
  
•  Does not uniquely describe a “setting” of regions
•  Cannot describe inclusion relationship and multiple borders
Region Adjacency Graph
14	
  
•  Every planar graph has a dual graph
•  Primal graph
•  Vertices describe regions
•  Edges describe adjacency relationships between regions
•  Dual graph
•  Vertices describe faces
•  Edges describe borders of faces
Dual Graphs
15	
  
•  Primal edge contraction = dual edge removal
•  Primal edge removal = dual edge contraction
Duality of Reduction Operations
16	
  
•  Differentiates between adjacency and inclusion relationship
•  Preserves multiple borders
Dual Graphs
17	
  
1	
  
4	
  
•  Differentiates between adjacency and inclusion relationship
•  Preserves multiple borders
•  Does not uniquely describe a “setting” of regions
Dual Graphs
18	
  
1	
  
4	
  
•  Different representation of a graph
•  Combinatorial Map CM = (D, α, σ)
•  Set of “darts” D
•  α involution connecting two darts
•  σ permutation connecting two darts
•  Can be stored in single array
Combinatorial Maps
19	
  
1	
  
2	
  
3	
   4	
  
σ	
  
α	
  
•  Modification of the σ permutation
•  Vertex merging (edge contraction)
•  Edge removal
CM Reduction Operations
20	
  
•  Primal combinatorial map implicitly stores dual map CM’=(D, α, γ)
•  Dual map can be computed anytime from the primal, and vice-versa
•  Combination of α involution and σ permutation
•  γ  = (α * σ)      or    γ  = (σ  *  α)
Dual Combinatorial Maps
21	
  
Combinatorial Maps
22	
  
•  Uniquely describe “setting” of regions
•  Because of implicitly storing direction of darts around each vertex
Dual Combinatorial Maps
23	
  
•  Task: group pixels with “similar” properties
•  Color, texture, higher level features,…
•  Iterative Approach:
•  Represent image as graph
•  Assign weights to edges (similarity)
•  Iteratively contract edges with lowest weights
•  Other approaches:
•  Minimum spanning tree based approaches
•  Graph cuts
Application: Image Segmentation
24	
  
Thank you!
Martin Cerman

More Related Content

What's hot

Practical Applications of Bessel's function
Practical Applications of Bessel's functionPractical Applications of Bessel's function
Practical Applications of Bessel's function
OneirosErebus
 
augmented reality paper presentation
augmented reality paper presentationaugmented reality paper presentation
augmented reality paper presentation
Vaibhav Mehta
 

What's hot (10)

Immersive Learning
Immersive Learning Immersive Learning
Immersive Learning
 
RPA in Healthcare
RPA in HealthcareRPA in Healthcare
RPA in Healthcare
 
Applied numerical methods lec13
Applied numerical methods lec13Applied numerical methods lec13
Applied numerical methods lec13
 
Artificial Intelligence (AI) -> understanding what it is & how you can use it...
Artificial Intelligence (AI) -> understanding what it is & how you can use it...Artificial Intelligence (AI) -> understanding what it is & how you can use it...
Artificial Intelligence (AI) -> understanding what it is & how you can use it...
 
Website design reference letter
Website design reference letterWebsite design reference letter
Website design reference letter
 
Practical Applications of Bessel's function
Practical Applications of Bessel's functionPractical Applications of Bessel's function
Practical Applications of Bessel's function
 
augmented reality paper presentation
augmented reality paper presentationaugmented reality paper presentation
augmented reality paper presentation
 
Methods of variation of parameters- advance engineering mathe mathematics
Methods of variation of parameters- advance engineering mathe mathematicsMethods of variation of parameters- advance engineering mathe mathematics
Methods of variation of parameters- advance engineering mathe mathematics
 
Use of matrix in daily life
Use of matrix in daily lifeUse of matrix in daily life
Use of matrix in daily life
 
Artificial intellegence by Bhanuprakash
Artificial  intellegence by BhanuprakashArtificial  intellegence by Bhanuprakash
Artificial intellegence by Bhanuprakash
 

Viewers also liked

Presen_Segmentation
Presen_SegmentationPresen_Segmentation
Presen_Segmentation
Vikas Goyal
 
Devanagari Character Recognition
Devanagari Character RecognitionDevanagari Character Recognition
Devanagari Character Recognition
Pulkit Goyal
 
optical character recognition system
optical character recognition systemoptical character recognition system
optical character recognition system
Vijay Apurva
 

Viewers also liked (20)

Text Detection Strategies
Text Detection StrategiesText Detection Strategies
Text Detection Strategies
 
Fields of application for working with smart glasses
Fields of application for working with smart glassesFields of application for working with smart glasses
Fields of application for working with smart glasses
 
Low-end Android cameras and the exposure triangle
Low-end Android cameras and the exposure triangleLow-end Android cameras and the exposure triangle
Low-end Android cameras and the exposure triangle
 
ConvNetJS & CaffeJS
ConvNetJS & CaffeJSConvNetJS & CaffeJS
ConvNetJS & CaffeJS
 
Deep Learning in iOS Tutorial
Deep Learning in iOS TutorialDeep Learning in iOS Tutorial
Deep Learning in iOS Tutorial
 
A Mobile Recognition System for Analog Energy Meter Scanning
A Mobile Recognition System for Analog Energy Meter ScanningA Mobile Recognition System for Analog Energy Meter Scanning
A Mobile Recognition System for Analog Energy Meter Scanning
 
HoloLens Introduction and Technical Specifications
HoloLens Introduction and Technical SpecificationsHoloLens Introduction and Technical Specifications
HoloLens Introduction and Technical Specifications
 
Detecting text from natural images with Stroke Width Transform
Detecting text from natural images with Stroke Width TransformDetecting text from natural images with Stroke Width Transform
Detecting text from natural images with Stroke Width Transform
 
Microsoft Cognitive Services
Microsoft Cognitive ServicesMicrosoft Cognitive Services
Microsoft Cognitive Services
 
Text Detection and Recognition
Text Detection and RecognitionText Detection and Recognition
Text Detection and Recognition
 
Presentation iwssip2012
Presentation iwssip2012Presentation iwssip2012
Presentation iwssip2012
 
Presen_Segmentation
Presen_SegmentationPresen_Segmentation
Presen_Segmentation
 
SCENE TEXT RECOGNITION IN MOBILE APPLICATION BY CHARACTER DESCRIPTOR AND STRU...
SCENE TEXT RECOGNITION IN MOBILE APPLICATION BY CHARACTER DESCRIPTOR AND STRU...SCENE TEXT RECOGNITION IN MOBILE APPLICATION BY CHARACTER DESCRIPTOR AND STRU...
SCENE TEXT RECOGNITION IN MOBILE APPLICATION BY CHARACTER DESCRIPTOR AND STRU...
 
राजभाषा हिंदी-सूचना और प्रौद्योगि‍की विषय पर हिंदी कार्यशाला
राजभाषा हिंदी-सूचना और प्रौद्योगि‍की विषय पर हिंदी कार्यशालाराजभाषा हिंदी-सूचना और प्रौद्योगि‍की विषय पर हिंदी कार्यशाला
राजभाषा हिंदी-सूचना और प्रौद्योगि‍की विषय पर हिंदी कार्यशाला
 
Devanagari Character Recognition
Devanagari Character RecognitionDevanagari Character Recognition
Devanagari Character Recognition
 
Graph Theory,Graph Terminologies,Planar Graph & Graph Colouring
Graph Theory,Graph Terminologies,Planar Graph & Graph ColouringGraph Theory,Graph Terminologies,Planar Graph & Graph Colouring
Graph Theory,Graph Terminologies,Planar Graph & Graph Colouring
 
Text extraction from natural scene image, a survey
Text extraction from natural scene image, a surveyText extraction from natural scene image, a survey
Text extraction from natural scene image, a survey
 
optical character recognition system
optical character recognition systemoptical character recognition system
optical character recognition system
 
Introduction to graph class 8
Introduction to graph class 8Introduction to graph class 8
Introduction to graph class 8
 
9 public relations tip posters for you office walls
9 public relations tip posters for you office walls9 public relations tip posters for you office walls
9 public relations tip posters for you office walls
 

Similar to Introduction to graphs and their ability to represent images

Graph representation
Graph representationGraph representation
Graph representation
Tech_MX
 
Unit II_Graph.pptxkgjrekjgiojtoiejhgnltegjte
Unit II_Graph.pptxkgjrekjgiojtoiejhgnltegjteUnit II_Graph.pptxkgjrekjgiojtoiejhgnltegjte
Unit II_Graph.pptxkgjrekjgiojtoiejhgnltegjte
pournima055
 

Similar to Introduction to graphs and their ability to represent images (20)

CS-102 Data Structure lectures on Graphs
CS-102 Data Structure lectures on GraphsCS-102 Data Structure lectures on Graphs
CS-102 Data Structure lectures on Graphs
 
CS-102 Data Structure lectures on Graphs
CS-102 Data Structure lectures on GraphsCS-102 Data Structure lectures on Graphs
CS-102 Data Structure lectures on Graphs
 
Graph Theory
Graph TheoryGraph Theory
Graph Theory
 
Graph representation
Graph representationGraph representation
Graph representation
 
Graph
GraphGraph
Graph
 
ae_722_unstructured_meshes.ppt
ae_722_unstructured_meshes.pptae_722_unstructured_meshes.ppt
ae_722_unstructured_meshes.ppt
 
Unit II_Graph.pptxkgjrekjgiojtoiejhgnltegjte
Unit II_Graph.pptxkgjrekjgiojtoiejhgnltegjteUnit II_Graph.pptxkgjrekjgiojtoiejhgnltegjte
Unit II_Graph.pptxkgjrekjgiojtoiejhgnltegjte
 
Graphs.pptx
Graphs.pptxGraphs.pptx
Graphs.pptx
 
Graphs and eularian circuit & path with c++ program
Graphs and eularian circuit & path with c++ programGraphs and eularian circuit & path with c++ program
Graphs and eularian circuit & path with c++ program
 
Graphs
GraphsGraphs
Graphs
 
Lec28
Lec28Lec28
Lec28
 
Unit 2: All
Unit 2: AllUnit 2: All
Unit 2: All
 
Basics of graph
Basics of graphBasics of graph
Basics of graph
 
Depth First Search and Breadth First Search
Depth First Search and Breadth First SearchDepth First Search and Breadth First Search
Depth First Search and Breadth First Search
 
Introduction to Graph Theory
Introduction to Graph TheoryIntroduction to Graph Theory
Introduction to Graph Theory
 
Graphs Algorithms
Graphs AlgorithmsGraphs Algorithms
Graphs Algorithms
 
Graphs
GraphsGraphs
Graphs
 
graph_theory_1-11.pdf___________________
graph_theory_1-11.pdf___________________graph_theory_1-11.pdf___________________
graph_theory_1-11.pdf___________________
 
8150.graphs
8150.graphs8150.graphs
8150.graphs
 
18 Basic Graph Algorithms
18 Basic Graph Algorithms18 Basic Graph Algorithms
18 Basic Graph Algorithms
 

Recently uploaded

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Recently uploaded (20)

EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 

Introduction to graphs and their ability to represent images

  • 1. Introduction to Graphs and their Ability to Represent Images Martin Cerman
  • 2. •  Graph G = (V,E) •  Set of vertices V •  Set of edges E, where E ⊂  V x V •  Edges can be directed or undirected Graph Definition 2   V = {1, 2, 3, 4, 5} E = {(1,2), (2,3), (3,2), (4,3), (4,1), (4,5), (5,5)} 1   2   3   4   5   1 1 =  
  • 3. •  Parallel / Double edges •  Self-loops •  Simple graph: contains NO parallel edges and NO self-loops •  Multigraph: contains parallel edges and/or self-loops Graph Definition 3  
  • 4. •  Planar graphs •  Contains no crossing edges •  Tree •  Connects all vertices without cycles •  Forest •  All connected components are trees Graph Definition 4  
  • 5. •  Vertices generally stored in array or vector •  Most common data-structures to store edges •  Adjacency list •  Adjacency matrix •  Incidence matrix •  Edge data-structure defines complexity of graph operations •  Storage- and computational cost •  Operations for example: add edge, remove edge, check adjacency,… Graph Data-structure 5  
  • 6. •  Collection of unordered linked lists, one for each vertex •  Great for representation of sparse graphs Adjacency List 6   1   2   3   4   5   1 2 3 4 5 2 3 2 1 5 4 3 5 Graph  opera*on   Complexity   Store  graph   O(|V|+|E|)   Add  Vertex   O(1)   Add  Edge   O(1)   Remove  Vertex   O(|E|)   Remove  Edge   O(|E|)   Adjacency  check   O(|V|)   V
  • 7. •  Square matrix with side length |V| •  Describes if two vertices are adjacent •  Symmetric if undirected graph, binary if simple graph Adjacency Matrix 7   1   2   3   4   5   Graph  opera*on   Complexity   Store  graph   O(|V|²)   Add  Vertex   O(|V|²)   Add  Edge   O(1)   Remove  Vertex   O(|V|²)   Remove  Edge   O(1)   Adjacency  check   O(1)   1   1   1   1   1   1   1   1   V V
  • 8. •  Matrix of size |V| x |E| •  Describes incidence relationship between vertices and edges Incidence Matrix 8   1   2   3   4   5   Graph  opera*on   Complexity   Store  graph   O(|V|*|E|)   Add  Vertex   O(|V|*|E|)   Add  Edge   O(|V|*|E|)   Remove  Vertex   O(|V|*|E|)   Remove  Edge   O(|V|*|E|)   Adjacency  check   O(|E|)   1   2   3   4   5   a   1   1   b   1   1   c   1   1   d   1   1   e   1   1   f   1   V E c b d a e f
  • 9. Complexity Comparison 9   Adjacency  List   Adjacency  Matrix   Incidence  Matrix   Store  graph   O(|V|+|E|)   O(|V|²)   O(|V|*|E|)   Add  Vertex   O(1)   O(|V|²)   O(|V|*|E|)   Add  Edge   O(1)   O(1)   O(|V|*|E|)   Remove  Vertex   O(|E|)   O(|V|²)   O(|V|*|E|)   Remove  Edge   O(|E|)   O(1)   O(|V|*|E|)   Adjacency  check   O(|V|)   O(1)   O(|E|)   •  Choose data-structure based on algorithm needs !
  • 10. •  Vertex merging (Edge contraction) •  Edge removal Graph Reduction Operations 10  
  • 11. •  Built by applying reduction operations to a graph •  Lowest level stores original graph •  Top level stores maximally reduced graph (single vertex) Graph Pyramid 11  
  • 12. •  Vertices describe pixels •  Edges describe adjacency relationships between pixels •  4-connected image graph is always planar Graphs and Images 12  
  • 13. •  Simplified image graph •  Vertices describe connected regions of any shape and size •  Edges describe adjacency relationships between regions •  Simple graph – no multiple edges, no self-loops Region Adjacency Graph 13  
  • 14. •  Does not uniquely describe a “setting” of regions •  Cannot describe inclusion relationship and multiple borders Region Adjacency Graph 14  
  • 15. •  Every planar graph has a dual graph •  Primal graph •  Vertices describe regions •  Edges describe adjacency relationships between regions •  Dual graph •  Vertices describe faces •  Edges describe borders of faces Dual Graphs 15  
  • 16. •  Primal edge contraction = dual edge removal •  Primal edge removal = dual edge contraction Duality of Reduction Operations 16  
  • 17. •  Differentiates between adjacency and inclusion relationship •  Preserves multiple borders Dual Graphs 17   1   4  
  • 18. •  Differentiates between adjacency and inclusion relationship •  Preserves multiple borders •  Does not uniquely describe a “setting” of regions Dual Graphs 18   1   4  
  • 19. •  Different representation of a graph •  Combinatorial Map CM = (D, α, σ) •  Set of “darts” D •  α involution connecting two darts •  σ permutation connecting two darts •  Can be stored in single array Combinatorial Maps 19   1   2   3   4   σ   α  
  • 20. •  Modification of the σ permutation •  Vertex merging (edge contraction) •  Edge removal CM Reduction Operations 20  
  • 21. •  Primal combinatorial map implicitly stores dual map CM’=(D, α, γ) •  Dual map can be computed anytime from the primal, and vice-versa •  Combination of α involution and σ permutation •  γ  = (α * σ)      or    γ  = (σ  *  α) Dual Combinatorial Maps 21  
  • 23. •  Uniquely describe “setting” of regions •  Because of implicitly storing direction of darts around each vertex Dual Combinatorial Maps 23  
  • 24. •  Task: group pixels with “similar” properties •  Color, texture, higher level features,… •  Iterative Approach: •  Represent image as graph •  Assign weights to edges (similarity) •  Iteratively contract edges with lowest weights •  Other approaches: •  Minimum spanning tree based approaches •  Graph cuts Application: Image Segmentation 24