16
Some Applications of Graph Some Applications of Graph Algorithms in Computer Vision Algorithms in Computer Vision Yakov Keselman DePaul University, CTI [email protected]

Some Applications of Graph Algorithms in Computer Visionfacweb.cs.depaul.edu/.../pdf/yakov_tutorial4.pdf · 2004-11-26 · Some Applications of Graph Algorithms in Computer Vision

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Some Applications of Graph Algorithms in Computer Visionfacweb.cs.depaul.edu/.../pdf/yakov_tutorial4.pdf · 2004-11-26 · Some Applications of Graph Algorithms in Computer Vision

Some Applications of GraphSome Applications of GraphAlgorithms in Computer Vision Algorithms in Computer Vision

Yakov Keselman DePaul University, [email protected]

Page 2: Some Applications of Graph Algorithms in Computer Visionfacweb.cs.depaul.edu/.../pdf/yakov_tutorial4.pdf · 2004-11-26 · Some Applications of Graph Algorithms in Computer Vision

Visual Computing Workshop 25/21/2004

Computer Vision Problems (1)Computer Vision Problems (1)

Some problems that I would like to address now (and solve in the future).

• Segmentation:given an image,partition it into anumber ofregions, so thateach regioncorresponds toan object.

Page 3: Some Applications of Graph Algorithms in Computer Visionfacweb.cs.depaul.edu/.../pdf/yakov_tutorial4.pdf · 2004-11-26 · Some Applications of Graph Algorithms in Computer Vision

Visual Computing Workshop 35/21/2004

Computer Vision Problems (2)Computer Vision Problems (2)

Some problems that I would like to address now (and solve in the future).

• Perceptual Grouping:given a set of edgefragments, group someof those fragments toobtain contours of somemeaningful objects.

Page 4: Some Applications of Graph Algorithms in Computer Visionfacweb.cs.depaul.edu/.../pdf/yakov_tutorial4.pdf · 2004-11-26 · Some Applications of Graph Algorithms in Computer Vision

Visual Computing Workshop 45/21/2004

Computer Vision Problems (3)Computer Vision Problems (3)

Some problems that will be addressed in a subsequent talk by Dr. Sven Dickinson:

• Object Matching: given two objects, find a correspondence at the level of their parts.

• Object Abstraction: given a set of objects, compute an abstract representation of the collection that retains perceptually significant features.

Page 5: Some Applications of Graph Algorithms in Computer Visionfacweb.cs.depaul.edu/.../pdf/yakov_tutorial4.pdf · 2004-11-26 · Some Applications of Graph Algorithms in Computer Vision

Visual Computing Workshop 55/21/2004

Problems that can be Addressed Problems that can be Addressed with Graph Algorithmswith Graph Algorithms

• Segmentation• Perceptual Grouping• Object Matching• Object Abstraction

• And many, many more …

• All graphs that I will consider in the remainder of the talk will be connected (will consist of one piece).

Page 6: Some Applications of Graph Algorithms in Computer Visionfacweb.cs.depaul.edu/.../pdf/yakov_tutorial4.pdf · 2004-11-26 · Some Applications of Graph Algorithms in Computer Vision

Visual Computing Workshop 65/21/2004

Representing Images as Graphs Representing Images as Graphs Based on PixelsBased on Pixels

• Idea: treat each pixel as a graph node. Connect nearby pixels by edges. Edge weights are proportional to the difference in pixel intensities.

Page 7: Some Applications of Graph Algorithms in Computer Visionfacweb.cs.depaul.edu/.../pdf/yakov_tutorial4.pdf · 2004-11-26 · Some Applications of Graph Algorithms in Computer Vision

Visual Computing Workshop 75/21/2004

Minimum Spanning Trees (1)Minimum Spanning Trees (1)

• The minimum spanning tree (MST) of an edge-weighted graph is a tree (no cycles) that spans all nodes of the graph and of minimum total weight among all such trees.

• MST’s are used in segmentation and clustering.

Page 8: Some Applications of Graph Algorithms in Computer Visionfacweb.cs.depaul.edu/.../pdf/yakov_tutorial4.pdf · 2004-11-26 · Some Applications of Graph Algorithms in Computer Vision

Visual Computing Workshop 85/21/2004

Minimum Spanning Trees (2)Minimum Spanning Trees (2)

• An MST can be constructed by “deleting” all edges from the graph, and adding them one-by-one, starting from the minimum-weight edge, checking that the new edge does not result in a cycle.

Page 9: Some Applications of Graph Algorithms in Computer Visionfacweb.cs.depaul.edu/.../pdf/yakov_tutorial4.pdf · 2004-11-26 · Some Applications of Graph Algorithms in Computer Vision

Visual Computing Workshop 95/21/2004

Outline of an MSTOutline of an MST--based Imagebased ImageSegmentation AlgorithmSegmentation Algorithm

• Authors: Pedro F. Felzenszwalb, Daniel P. Huttenlocher• Objective: obtain regions (connected components) that

hopefully correspond to objects in the image.– Form the weighted graph: nodes are pixels, edges are

between adjacent pixels, edge weights are differences between pixel intensities.

– Start with a graph with the same nodes but no edges (as many components as there are nodes).

– Add one edge at a time, of a minimum weight, that connects two different disconnected components.

• Go on until the difference between adjacent components becomes too large (the value is determined by a parameter).

Thus, the main difference between this algorithm and the MST algorithm is that here we don't go all the way to the end (one component), but instead stop short, when some image-based properties of the components become too different.

Page 10: Some Applications of Graph Algorithms in Computer Visionfacweb.cs.depaul.edu/.../pdf/yakov_tutorial4.pdf · 2004-11-26 · Some Applications of Graph Algorithms in Computer Vision

Visual Computing Workshop 105/21/2004

An illustration of the MSTAn illustration of the MST--Based Based Segmentation AlgorithmSegmentation Algorithm

• The main difference between the segmentation algorithm and the MST algorithm is that here we stop short of constructing the full minimum spanning tree, obtaining “uniform” regions.

Page 11: Some Applications of Graph Algorithms in Computer Visionfacweb.cs.depaul.edu/.../pdf/yakov_tutorial4.pdf · 2004-11-26 · Some Applications of Graph Algorithms in Computer Vision

Visual Computing Workshop 115/21/2004

Results From the PaperResults From the Paper

• The algorithm can also produce regions of non-uniform color due to some tricks used.

• In general, the objective is to balance the internal intensity variation within a region and external intensity variation between adjacent regions.

• Paper can be found at: http://citeseer.ist.psu.edu/felzenszwalb98efficiently.html

• What do you think of the results?

Page 12: Some Applications of Graph Algorithms in Computer Visionfacweb.cs.depaul.edu/.../pdf/yakov_tutorial4.pdf · 2004-11-26 · Some Applications of Graph Algorithms in Computer Vision

Visual Computing Workshop 125/21/2004

Results on My ImagesResults on My Images

Page 13: Some Applications of Graph Algorithms in Computer Visionfacweb.cs.depaul.edu/.../pdf/yakov_tutorial4.pdf · 2004-11-26 · Some Applications of Graph Algorithms in Computer Vision

Visual Computing Workshop 135/21/2004

Minimum Mean CyclesMinimum Mean Cycles

• A minimum mean cycle in a weighted graph is a cycle of the minimum average (mean) weight.

• With appropriately defined edge weights, minimum mean cycle is likely to correspond to a closed contour (silhouette) of an object.

• On the other hand, a cycle of minimum total weight is likely to correspond to a small spot that does not correspond to an object.

• Besides, a minimum mean cycle is much easier to find algorithmically.

Page 14: Some Applications of Graph Algorithms in Computer Visionfacweb.cs.depaul.edu/.../pdf/yakov_tutorial4.pdf · 2004-11-26 · Some Applications of Graph Algorithms in Computer Vision

Visual Computing Workshop 145/21/2004

Segmenting Images with Segmenting Images with Minimum Mean CyclesMinimum Mean Cycles

• Authors: Ian H. Jermyn, Hiroshi Ishikawa• Paper can be found at:

http://citeseer.ist.psu.edu/jermyn99globally.html

• Note that the graph defined by the authors is somewhat different from the pixel-based graph I introduced earlier. Details are in the paper.

Page 15: Some Applications of Graph Algorithms in Computer Visionfacweb.cs.depaul.edu/.../pdf/yakov_tutorial4.pdf · 2004-11-26 · Some Applications of Graph Algorithms in Computer Vision

Visual Computing Workshop 155/21/2004

Perceptual Grouping with Perceptual Grouping with Minimum Mean CyclesMinimum Mean Cycles

• Some results obtained for graphs based on image edge fragments (an image edge fragment is a node; the degree of perceptual “coherence” determines the weight of the graph edge).

Page 16: Some Applications of Graph Algorithms in Computer Visionfacweb.cs.depaul.edu/.../pdf/yakov_tutorial4.pdf · 2004-11-26 · Some Applications of Graph Algorithms in Computer Vision

Visual Computing Workshop 165/21/2004

ConclusionsConclusions

• The language of graphs can be used to formulate a variety of problems that arise in Computer Vision.

• Graph algorithms are abundant and give good results on many Computer Vision problems.

• Because segmentation and grouping often depend on higher-level knowledge, graph algorithms are just a starting point in the quest to find better Computer Vision algorithms.

• Any questions? Comments?