Announcements Reader is in the BOOK STORE (not Comm Bldg.)

Slides:



Advertisements
Similar presentations
Single Source Shortest Paths
Advertisements

Weighted graphs Example Consider the following graph, where nodes represent cities, and edges show if there is a direct flight between each pair of cities.
DIJKSTRA’s Algorithm. Definition fwd search Find the shortest paths from a given SOURCE node to ALL other nodes, by developing the paths in order of increasing.
Finding Search Heuristics Henry Kautz. if State[node] is not in closed OR g[node] < g[LookUp(State[node],closed)] then A* Graph Search for Any Admissible.
Cutting Images: Graphs and Boundary Finding Computational Photography Derek Hoiem, University of Illinois 09/15/11 “The Double Secret”, Magritte.
The University of Ontario CS 4487/9587 Algorithms for Image Analysis Segmentation (2D) Acknowledgements: Alexei Efros, Steven Seitz.
Kapitel 13 “Interactive Segmentation” – p. 1 Interactive Segmentation  Live-wire approach  Random walker segmentation TexPoint fonts used in EMF. Read.
Graph-Based Image Segmentation
Graph-based image segmentation Václav Hlaváč Czech Technical University in Prague Faculty of Electrical Engineering Department of Cybernetics Prague, Czech.
Active Contours (SNAKES) Back to boundary detection –This time using perceptual grouping. This is non-parametric –We’re not looking for a contour of a.
Lecture 6 Image Segmentation
UnInformed Search What to do when you don’t know anything.
CS 206 Introduction to Computer Science II 11 / 10 / 2008 Instructor: Michael Eckmann.
Snakes Goes from edges to boundaries. Edge is strong change in intensity. Boundary is boundary of an object. –Smooth (more or less) –Closed. –…
Greedy Algorithms Reading Material: Chapter 8 (Except Section 8.5)
Image Segmentation Today’s Readings Intelligent Scissors, Mortensen et. al, SIGGRAPH 1995Intelligent Scissors From Sandlot ScienceSandlot Science.
Shortest Path Problems Directed weighted graph. Path length is sum of weights of edges on path. The vertex at which the path begins is the source vertex.
Image Segmentation Today’s Readings Forsyth & Ponce, Chapter 14
Announcements Mailing list: –you should have received messages Office hours onlineonline –start next week.
CS 206 Introduction to Computer Science II 03 / 30 / 2009 Instructor: Michael Eckmann.
Segmentation and Clustering Today’s Readings Forsyth & Ponce, Chapter 7 (plus lots of optional references in the slides) From Sandlot ScienceSandlot Science.
Announcements Project 3 questions Photos after class.
The Shortest Path Problem
Using Dijkstra’s Algorithm to Find a Shortest Path from a to z 1.
Chapter 9 – Graphs A graph G=(V,E) – vertices and edges
Cutting Images: Graphs and Boundary Finding Computational Photography Derek Hoiem, University of Illinois 09/14/10 “The Double Secret”, Magritte.
The University of Ontario CS 433/653 Algorithms for Image Analysis Segmentation (2D) Acknowledgements: Alexei Efros, Steven Seitz.
Lecture 2: Edge detection CS4670: Computer Vision Noah Snavely From Sandlot ScienceSandlot Science.
Minimum Spanning Trees CSE 2320 – Algorithms and Data Structures Vassilis Athitsos University of Texas at Arlington 1.
1 Optimal Cycle Vida Movahedi Elder Lab, January 2008.
Intelligent Scissors for Image Composition Anthony Dotterer 01/17/2006.
Lecture 4: Image Resampling and Reconstruction CS4670: Computer Vision Kavita Bala.
Search Tamara Berg CS 560 Artificial Intelligence Many slides throughout the course adapted from Dan Klein, Stuart Russell, Andrew Moore, Svetlana Lazebnik,
CS 206 Introduction to Computer Science II 11 / 16 / 2009 Instructor: Michael Eckmann.
Brent M. Dingle, Ph.D Game Design and Development Program Mathematics, Statistics and Computer Science University of Wisconsin - Stout Edge Detection:
Cutting Images: Graphs and Boundary Finding Computational Photography Derek Hoiem, University of Illinois 09/20/12 “The Double Secret”, Magritte.
Shortest Paths.
Image Segmentation Today’s Readings Szesliski Chapter 5
Cutting Images: Graphs and Boundary Finding
Announcements CS accounts Project 1 is out today
Shortest Paths and Minimum Spanning Trees
CSC317 Shortest path algorithms
Programming Abstractions
Heuristic Search Introduction to Artificial Intelligence
CS4670/5670: Image Scissors Noah Snavely Today’s Readings
Cinda Heeren / Geoffrey Tien
Artificial Intelligence
Short paths and spanning trees
Programming Abstractions
Computational Geometry Capter:1-2.1
Shortest Paths.
Algorithms (2IL15) – Lecture 5 SINGLE-SOURCE SHORTEST PATHS
What to do when you don’t know anything know nothing
Lecture 31: Graph-Based Image Segmentation
Announcements Photos right now Project 3 questions
Seam Carving Project 1a due at midnight tonight.
Segmentation (continued)
Announcements Project 4 questions Evaluations.
Announcements Project 1 is out today
Lecture 14 Shortest Path (cont’d) Minimum Spanning Tree
Announcements Project 4 out today (due Wed March 10)
CSC 380: Design and Analysis of Algorithms
Graph Algorithms: Shortest Path
Shortest Paths.
Implementation of Dijkstra’s Algorithm
Announcements Project 1 is out today help session at the end of class.
Lecture 10 Graph Algorithms
Lecture 13 Shortest Path (cont’d) Minimum Spanning Tree
More Graphs Lecture 19 CS2110 – Fall 2009.
Presentation transcript:

Announcements Reader is in the BOOK STORE (not Comm Bldg.) Mailing list: cse455@cs.washington.edu you should have received messages Office hours online start next week this week: by appt. only Project 1 out today (due in two weeks) posted on course web page help session today Your ID card should open Sieg 327 check to make sure ASAP test

Image Scissors Today’s Readings Aging Helen Mirren Today’s Readings Intelligent Scissors, Mortensen et. al, SIGGRAPH 1995

Extracting objects How could this be done? hard to do manually hard to do automatically (“image segmentation”) easy to do semi-automatically

Intelligent Scissors (demo)

Intelligent Scissors Approach answers a basic question Q: how to find a path from seed to mouse that follows object boundary as closely as possible? A: define a path that stays as close as possible to edges

Intelligent Scissors Questions Basic Idea Define edge score for each pixel edge pixels have low cost Find lowest cost path from seed to mouse mouse seed Questions How to define costs? How to find the path?

Intelligent Scissors Questions Basic Idea Define edge score for each pixel edge pixels have low cost Find lowest cost path from seed to mouse mouse seed Questions How to define costs? How to find the path?

Path Search (basic idea) Graph Search Algorithm Computes minimum cost path from seed to all other pixels

Path Search (basic idea) Graph Search Algorithm Computes minimum cost path from seed to all other pixels

Path Search (basic idea)

Let’s look at this more closely Treat the image as a graph q c p Graph node for every pixel p link between every adjacent pair of pixels, p,q cost c for each link Note: each link has a cost this is a little different than the figure before where each pixel had a cost

Defining the costs q c p Want to hug image edges: how to define cost of a link? the link should follow the intensity edge

Defining the costs s q c r p Want to hug image edges: how to define cost of a link? the link should follow the intensity edge want intensity to change rapidly  to the link c  – |intensity of r – intensity of s|

Defining the costs q c p c can be computed using a cross-correlation filter assume it is centered at p A couple more modifications Scale the filter response by length of link c. Why? Make c positive Set c = (max-|filter response|*length) where max = maximum |filter response|*length over all pixels in the image

Defining the costs q c w p -1 1 c 1 -1 w p c can be computed using a cross-correlation filter assume it is centered at p A couple more modifications Scale the filter response by length of link c. Why? Make c positive Set c = (max-|filter response|*length) where max = maximum |filter response|*length over all pixels in the image

Dijkstra’s shortest path algorithm 5 3 1 4 9 2 link cost Algorithm init node costs to , set p = seed point, cost(p) = 0 expand p as follows: for each of p’s neighbors q that are not expanded set cost(q) = min( cost(p) + cpq, cost(q) )

Dijkstra’s shortest path algorithm 4 9 5 5 3 1 4 9 2 1 1 1 3 3 2 3 Algorithm init node costs to , set p = seed point, cost(p) = 0 expand p as follows: for each of p’s neighbors q that are not expanded set cost(q) = min( cost(p) + cpq, cost(q) ) if q’s cost changed, make q point back to p put q on the ACTIVE list (if not already there)

Dijkstra’s shortest path algorithm 4 9 5 2 5 3 1 4 9 2 3 5 2 1 1 3 3 3 4 3 2 3 Algorithm init node costs to , set p = seed point, cost(p) = 0 expand p as follows: for each of p’s neighbors q that are not expanded set cost(q) = min( cost(p) + cpq, cost(q) ) if q’s cost changed, make q point back to p put q on the ACTIVE list (if not already there) set r = node with minimum cost on the ACTIVE list repeat Step 2 for p = r

Dijkstra’s shortest path algorithm 4 3 6 5 2 5 3 1 4 9 2 3 5 3 2 1 1 3 3 3 4 4 3 2 3 Algorithm init node costs to , set p = seed point, cost(p) = 0 expand p as follows: for each of p’s neighbors q that are not expanded set cost(q) = min( cost(p) + cpq, cost(q) ) if q’s cost changed, make q point back to p put q on the ACTIVE list (if not already there) set r = node with minimum cost on the ACTIVE list repeat Step 2 for p = r

Dijkstra’s shortest path algorithm Properties It computes the minimum cost path from the seed to every node in the graph. This set of minimum paths is represented as a tree Running time, with N pixels: O(N2) time if you use an active list O(N log N) if you use an active priority queue (heap) takes fraction of a second for a typical (640x480) image Once this tree is computed once, we can extract the optimal path from any point to the seed in O(N) time. it runs in real time as the mouse moves What happens when the user specifies a new seed?

Results Peter Davis Jason Dang http://www.cs.washington.edu/education/courses/455/08wi/projects/project1/artifacts/index.html

Help session—Ryan