SlideShare a Scribd company logo
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

line attributes.pptx
line attributes.pptxline attributes.pptx
line attributes.pptx
RubaNagarajan
 
Basic concepts of curve fittings
Basic concepts of curve fittingsBasic concepts of curve fittings
Basic concepts of curve fittings
Tarun Gehlot
 
Convolution codes and turbo codes
Convolution codes and turbo codesConvolution codes and turbo codes
Convolution codes and turbo codesManish Srivastava
 
Information Theory MSU-EEE.ppt
Information Theory MSU-EEE.pptInformation Theory MSU-EEE.ppt
Information Theory MSU-EEE.ppt
robomango
 
Filtering and masking
Filtering and maskingFiltering and masking
Filtering and maskingamudhini
 
probability :- Covariance and correlation Faisalkhan2081@yahoo.com
probability :- Covariance and correlation Faisalkhan2081@yahoo.comprobability :- Covariance and correlation Faisalkhan2081@yahoo.com
probability :- Covariance and correlation Faisalkhan2081@yahoo.com
Faisal Khan
 
Random variate generation
Random variate generationRandom variate generation
Random variate generation
De La Salle University-Manila
 
Channel Coding (Error Control Coding)
Channel Coding (Error Control Coding)Channel Coding (Error Control Coding)
Channel Coding (Error Control Coding)
Ola Mashaqi @ an-najah national university
 
Line drawing algorithm and antialiasing techniques
Line drawing algorithm and antialiasing techniquesLine drawing algorithm and antialiasing techniques
Line drawing algorithm and antialiasing techniques
Ankit Garg
 
Reed Soloman and convolution codes
Reed Soloman and convolution codesReed Soloman and convolution codes
Reed Soloman and convolution codes
Shailesh Tanwar
 
Binomial Probability Distributions
Binomial Probability DistributionsBinomial Probability Distributions
Binomial Probability Distributions
Long Beach City College
 
DIGITAL COMMUNICATION: ENCODING AND DECODING OF CYCLIC CODE
DIGITAL COMMUNICATION: ENCODING AND DECODING OF CYCLIC CODE DIGITAL COMMUNICATION: ENCODING AND DECODING OF CYCLIC CODE
DIGITAL COMMUNICATION: ENCODING AND DECODING OF CYCLIC CODE
ShivangiSingh241
 
Bresenham's line drawing algorithm
Bresenham's line drawing algorithmBresenham's line drawing algorithm
Bresenham's line drawing algorithm
Mani Kanth
 
Computer graphics realism
Computer graphics realismComputer graphics realism
Computer graphics realism
sathya dhineshkumar
 
Lecture 6 introduction to open gl and glut
Lecture 6   introduction to open gl and glutLecture 6   introduction to open gl and glut
Lecture 6 introduction to open gl and glut
simpleok
 
Presentation of Lossy compression
Presentation of Lossy compressionPresentation of Lossy compression
Presentation of Lossy compression
Omar Ghazi
 
[NDC2016] 신경망은컨텐츠자동생성의꿈을꾸는가
[NDC2016] 신경망은컨텐츠자동생성의꿈을꾸는가[NDC2016] 신경망은컨텐츠자동생성의꿈을꾸는가
[NDC2016] 신경망은컨텐츠자동생성의꿈을꾸는가
Hwanhee Kim
 

What's hot (20)

line attributes.pptx
line attributes.pptxline attributes.pptx
line attributes.pptx
 
Basic concepts of curve fittings
Basic concepts of curve fittingsBasic concepts of curve fittings
Basic concepts of curve fittings
 
Convolution codes and turbo codes
Convolution codes and turbo codesConvolution codes and turbo codes
Convolution codes and turbo codes
 
Information Theory MSU-EEE.ppt
Information Theory MSU-EEE.pptInformation Theory MSU-EEE.ppt
Information Theory MSU-EEE.ppt
 
Filtering and masking
Filtering and maskingFiltering and masking
Filtering and masking
 
probability :- Covariance and correlation Faisalkhan2081@yahoo.com
probability :- Covariance and correlation Faisalkhan2081@yahoo.comprobability :- Covariance and correlation Faisalkhan2081@yahoo.com
probability :- Covariance and correlation Faisalkhan2081@yahoo.com
 
quantization
quantizationquantization
quantization
 
Random variate generation
Random variate generationRandom variate generation
Random variate generation
 
Channel Coding (Error Control Coding)
Channel Coding (Error Control Coding)Channel Coding (Error Control Coding)
Channel Coding (Error Control Coding)
 
Numerical Method 2
Numerical Method 2Numerical Method 2
Numerical Method 2
 
Line drawing algorithm and antialiasing techniques
Line drawing algorithm and antialiasing techniquesLine drawing algorithm and antialiasing techniques
Line drawing algorithm and antialiasing techniques
 
Reed Soloman and convolution codes
Reed Soloman and convolution codesReed Soloman and convolution codes
Reed Soloman and convolution codes
 
Binomial Probability Distributions
Binomial Probability DistributionsBinomial Probability Distributions
Binomial Probability Distributions
 
Convolution Codes
Convolution CodesConvolution Codes
Convolution Codes
 
DIGITAL COMMUNICATION: ENCODING AND DECODING OF CYCLIC CODE
DIGITAL COMMUNICATION: ENCODING AND DECODING OF CYCLIC CODE DIGITAL COMMUNICATION: ENCODING AND DECODING OF CYCLIC CODE
DIGITAL COMMUNICATION: ENCODING AND DECODING OF CYCLIC CODE
 
Bresenham's line drawing algorithm
Bresenham's line drawing algorithmBresenham's line drawing algorithm
Bresenham's line drawing algorithm
 
Computer graphics realism
Computer graphics realismComputer graphics realism
Computer graphics realism
 
Lecture 6 introduction to open gl and glut
Lecture 6   introduction to open gl and glutLecture 6   introduction to open gl and glut
Lecture 6 introduction to open gl and glut
 
Presentation of Lossy compression
Presentation of Lossy compressionPresentation of Lossy compression
Presentation of Lossy compression
 
[NDC2016] 신경망은컨텐츠자동생성의꿈을꾸는가
[NDC2016] 신경망은컨텐츠자동생성의꿈을꾸는가[NDC2016] 신경망은컨텐츠자동생성의꿈을꾸는가
[NDC2016] 신경망은컨텐츠자동생성의꿈을꾸는가
 

Viewers also liked

Text Detection Strategies
Text Detection StrategiesText Detection Strategies
Text Detection Strategies
Anyline
 
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
Anyline
 
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
Anyline
 
ConvNetJS & CaffeJS
ConvNetJS & CaffeJSConvNetJS & CaffeJS
ConvNetJS & CaffeJS
Anyline
 
Deep Learning in iOS Tutorial
Deep Learning in iOS TutorialDeep Learning in iOS Tutorial
Deep Learning in iOS Tutorial
Anyline
 
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
Anyline
 
HoloLens Introduction and Technical Specifications
HoloLens Introduction and Technical SpecificationsHoloLens Introduction and Technical Specifications
HoloLens Introduction and Technical Specifications
Anyline
 
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
Pooja G N
 
Microsoft Cognitive Services
Microsoft Cognitive ServicesMicrosoft Cognitive Services
Microsoft Cognitive Services
Anyline
 
Text Detection and Recognition
Text Detection and RecognitionText Detection and Recognition
Text Detection and Recognition
Badruz Nasrin Basri
 
Presentation iwssip2012
Presentation iwssip2012Presentation iwssip2012
Presentation iwssip2012
Bernhard Quehl
 
Presen_Segmentation
Presen_SegmentationPresen_Segmentation
Presen_SegmentationVikas Goyal
 
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...
Cheriyan K M
 
राजभाषा हिंदी-सूचना और प्रौद्योगि‍की विषय पर हिंदी कार्यशाला
राजभाषा हिंदी-सूचना और प्रौद्योगि‍की विषय पर हिंदी कार्यशालाराजभाषा हिंदी-सूचना और प्रौद्योगि‍की विषय पर हिंदी कार्यशाला
राजभाषा हिंदी-सूचना और प्रौद्योगि‍की विषय पर हिंदी कार्यशाला
राहुल खटे (Rahul Khate)
 
Devanagari Character Recognition
Devanagari Character RecognitionDevanagari Character Recognition
Devanagari Character Recognition
Pulkit Goyal
 
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
Saurabh Kaushik
 
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
SOYEON KIM
 
optical character recognition system
optical character recognition systemoptical character recognition system
optical character recognition systemVijay Apurva
 
Introduction to graph class 8
Introduction to graph class 8Introduction to graph class 8
Introduction to graph class 8
Monika Rana
 
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
Prezly
 

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

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
ssuser034ce1
 
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
ssuser034ce1
 
Graph Theory
Graph TheoryGraph Theory
Graph Theory
Rashmi Bhat
 
Graph representation
Graph representationGraph representation
Graph representationTech_MX
 
Graph
GraphGraph
ae_722_unstructured_meshes.ppt
ae_722_unstructured_meshes.pptae_722_unstructured_meshes.ppt
ae_722_unstructured_meshes.ppt
Sushilkumar Jogdankar
 
Unit II_Graph.pptxkgjrekjgiojtoiejhgnltegjte
Unit II_Graph.pptxkgjrekjgiojtoiejhgnltegjteUnit II_Graph.pptxkgjrekjgiojtoiejhgnltegjte
Unit II_Graph.pptxkgjrekjgiojtoiejhgnltegjte
pournima055
 
Graphs.pptx
Graphs.pptxGraphs.pptx
Graphs.pptx
satvikkushwaha1
 
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
Muhammad Danish Badar
 
Graphs
GraphsGraphs
Graphs
Dwight Sabio
 
Unit 2: All
Unit 2: AllUnit 2: All
Unit 2: All
Hector Zenil
 
Basics of graph
Basics of graphBasics of graph
Basics of graph
Khaled Sany
 
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
Benjamin Sach
 
Data Structures and Agorithm: DS 21 Graph Theory.pptx
Data Structures and Agorithm: DS 21 Graph Theory.pptxData Structures and Agorithm: DS 21 Graph Theory.pptx
Data Structures and Agorithm: DS 21 Graph Theory.pptx
RashidFaridChishti
 
Introduction to Graph Theory
Introduction to Graph TheoryIntroduction to Graph Theory
Introduction to Graph Theory
Premsankar Chakkingal
 
Graphs
GraphsGraphs
graph_theory_1-11.pdf___________________
graph_theory_1-11.pdf___________________graph_theory_1-11.pdf___________________
graph_theory_1-11.pdf___________________
ssuser1989da
 

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
 
Data Structures and Agorithm: DS 21 Graph Theory.pptx
Data Structures and Agorithm: DS 21 Graph Theory.pptxData Structures and Agorithm: DS 21 Graph Theory.pptx
Data Structures and Agorithm: DS 21 Graph Theory.pptx
 
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
 

Recently uploaded

FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
SOFTTECHHUB
 
Assure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyesAssure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
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
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
UiPath Community Day Dubai: AI at Work..
UiPath Community Day Dubai: AI at Work..UiPath Community Day Dubai: AI at Work..
UiPath Community Day Dubai: AI at Work..
UiPathCommunity
 
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfSAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
Peter Spielvogel
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Aggregage
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
KAMESHS29
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
RinaMondal9
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
James Anderson
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
Ralf Eggert
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 

Recently uploaded (20)

FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
 
Assure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyesAssure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyes
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
UiPath Community Day Dubai: AI at Work..
UiPath Community Day Dubai: AI at Work..UiPath Community Day Dubai: AI at Work..
UiPath Community Day Dubai: AI at Work..
 
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfSAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 

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