Digital Image Processing

Slides:



Advertisements
Similar presentations
Lecture 24: Segmentation CS6670: Computer Vision Noah Snavely From Sandlot ScienceSandlot Science.
Advertisements

I Images as graphs Fully-connected graph – node for every pixel – link between every pair of pixels, p,q – similarity w ij for each link j w ij c Source:
Graph-Based Image Segmentation
1 s-t Graph Cuts for Binary Energy Minimization  Now that we have an energy function, the big question is how do we minimize it? n Exhaustive search is.
Graph-based image segmentation Václav Hlaváč Czech Technical University in Prague Faculty of Electrical Engineering Department of Cybernetics Prague, Czech.
Lecture 6 Image Segmentation
Image segmentation. The goals of segmentation Group together similar-looking pixels for efficiency of further processing “Bottom-up” process Unsupervised.
CS448f: Image Processing For Photography and Vision Graph Cuts.
Lecture 21: Spectral Clustering
Algorithms & Applications in Computer Vision Lihi Zelnik-Manor Lecture 11: Structure from Motion.
Segmentation. Terminology Segmentation, grouping, perceptual organization: gathering features that belong together Fitting: associating a model with observed.
Normalized Cuts and Image Segmentation Jianbo Shi and Jitendra Malik, Presented by: Alireza Tavakkoli.
Region Segmentation. Find sets of pixels, such that All pixels in region i satisfy some constraint of similarity.
Segmentation CSE P 576 Larry Zitnick Many slides courtesy of Steve Seitz.
Announcements Project 2 more signup slots questions Picture taking at end of class.
Today: Image Segmentation Image Segmentation Techniques Snakes Scissors Graph Cuts Mean Shift Wednesday (2/28) Texture analysis and synthesis Multiple.
From Pixels to “Blobs” : Rendering and Image Processing Alexei Efros.
Segmentation Graph-Theoretic Clustering.
Lecture 10: Stereo and Graph Cuts
Lecture 18: Context and segmentation CS6670: Computer Vision Noah Snavely.
Image Segmentation A Graph Theoretic Approach. Factors for Visual Grouping Similarity (gray level difference) Similarity (gray level difference) Proximity.
Image Segmentation Today’s Readings Forsyth & Ponce, Chapter 14
Perceptual Organization: Segmentation and Optical Flow.
Segmentation and Clustering Today’s Readings Forsyth & Ponce, Chapter 7 (plus lots of optional references in the slides) From Sandlot ScienceSandlot Science.
Announcements vote for Project 3 artifacts Project 4 (due next Wed night) Questions? Late day policy: everything must be turned in by next Friday.
Announcements Project 3 questions Photos after class.
Segmentation via Graph Cuts
Graph-based Segmentation
Image Segmentation Rob Atlas Nick Bridle Evan Radkoff.
Presenter : Kuang-Jui Hsu Date : 2011/5/3(Tues.).
Segmentation using eigenvectors
CSSE463: Image Recognition Day 34 This week This week Today: Today: Graph-theoretic approach to segmentation Graph-theoretic approach to segmentation Tuesday:
Segmentation using eigenvectors Papers: “Normalized Cuts and Image Segmentation”. Jianbo Shi and Jitendra Malik, IEEE, 2000 “Segmentation using eigenvectors:
Chapter 14: SEGMENTATION BY CLUSTERING 1. 2 Outline Introduction Human Vision & Gestalt Properties Applications – Background Subtraction – Shot Boundary.
Lecture 2: Edge detection CS4670: Computer Vision Noah Snavely From Sandlot ScienceSandlot Science.
Brent M. Dingle, Ph.D Game Design and Development Program Mathematics, Statistics and Computer Science University of Wisconsin - Stout Quick Review.
Digital Image Processing
Brent M. Dingle, Ph.D Game Design and Development Program Mathematics, Statistics and Computer Science University of Wisconsin - Stout Edge Detection.
Brent M. Dingle, Ph.D Game Design and Development Program Mathematics, Statistics and Computer Science University of Wisconsin - Stout Edge Detection:
Digital Image Processing
Brent M. Dingle, Ph.D Game Design and Development Program Mathematics, Statistics and Computer Science University of Wisconsin - Stout Image Processing.
CS654: Digital Image Analysis Lecture 28: Advanced topics in Image Segmentation Image courtesy: IEEE, IJCV.
 In the previews parts we have seen some kind of segmentation method.  In this lecture we will see graph cut, which is a another segmentation method.
CS 2750: Machine Learning Clustering Prof. Adriana Kovashka University of Pittsburgh January 25, 2016.
Normalized Cuts and Image Segmentation Patrick Denis COSC 6121 York University Jianbo Shi and Jitendra Malik.
Image segmentation.
Document Clustering with Prior Knowledge Xiang Ji et al. Document Clustering with Prior Knowledge. SIGIR 2006 Presenter: Suhan Yu.
Course Introduction to Medical Imaging Segmentation 1 – Mean Shift and Graph-Cuts Guy Gilboa.
Brent M. Dingle, Ph.D Game Design and Development Program Mathematics, Statistics and Computer Science University of Wisconsin - Stout Color Image.
K-Means Segmentation.
Image Segmentation Today’s Readings Szesliski Chapter 5
Segmentation by clustering: normalized cut
Exercise class 13 : Image Segmentation
CSSE463: Image Recognition Day 34
Image Warping (Geometric Transforms)
Image gradients and edges
CS 2750: Machine Learning Clustering
Segmentation Graph-Theoretic Clustering.
Grouping.
Lecture 31: Graph-Based Image Segmentation
Announcements Photos right now Project 3 questions
Seam Carving Project 1a due at midnight tonight.
Image Segmentation CS 678 Spring 2018.
Spectral Clustering Eric Xing Lecture 8, August 13, 2010
Segmentation (continued)
Announcements Project 4 questions Evaluations.
Announcements Project 4 out today (due Wed March 10)
Announcements Project 1 is out today help session at the end of class.
CSSE463: Image Recognition Day 34
“Traditional” image segmentation
Presentation transcript:

Digital Image Processing Segmentation via Graphs DRAFT Brent M. Dingle, Ph.D. 2015 Game Design and Development Program Mathematics, Statistics and Computer Science University of Wisconsin - Stout Material in this presentation is largely based on/derived from presentations by: Sventlana Lazebnik, and Noah Snavely

Lecture Objectives Previously Today Image Manipulation and Enhancement Filtering Interpolation Warping Morphing Image Compression Image Analysis Edge Detection Smart Scissors Stereo Image processing Segmentation Today Segmentation - Graph Based source: Noah Snavely

Recall: Image Segmentation Group similar looking pixels together for efficiency of additional processing Separate image into coherent objects

Recall: Stereo as a Minimization Prob { { match cost smoothness cost Want each pixel to find a good match in the other image Adjacent pixels should (usually) move about the same amount

Related: Binary Segmentation Separate an image into foreground and background source: Noah Snavely

Related: Binary Segmentation Separate an image into foreground and background User sketches some strokes on foreground and background How do we classify the rest of the pixels based on those lines? source: Noah Snavely

Binary Segmentation as Min Energy Define a labeling, L: as an assignment of each pixel with a 0 or 1 label background or foreground Problem: Find the labeling that minimizes match cost smoothness cost Goal: establish a function to measure how similar a pixel is to the foreground (or background)

{ : “distance” from pixel to background pixels usually computed by creating a color model from user-labeled pixels : “distance” from pixel to foreground pixels source: Noah Snavely

source: Noah Snavely

Neighboring pixels should generally have the same labels Unless the pixels have very different intensities = 10.0 = 0.1 : similarity in intensity of p and q source: Noah Snavely

Solve with max flow / min cut Once all is in place We can solve using max flow / min cut algorithm

Graph min cut problem Given a weighted graph G with source and sink nodes (s and t), partition the nodes into two sets, S and T such that the sum of edge weights spanning the partition is minimized and s S and t T source: Noah Snavely

Segmentation by min cut s (“foreground”) (“background”) Graph node for each pixel, link between adjacent pixels specify a few pixels as foreground and background create an infinite cost link from each bg pixel to the t node create an infinite cost link from each fg pixel to the s node create finite cost links from s and t to each other node compute min cut that separates s from t The min-cut max-flow theorem [Ford and Fulkerson 1956] source: Noah Snavely

Segmentation by min cut The partitions S and T formed by the min cut give the optimal foreground and background segmentation i.e., the resulting labels minimize

Related / More info Grabcut Intelligent Scissors Rother et. al., SIGGRAPH 2004 Intelligent Scissors Mortensen et. al, SIGGRAPH 1995

Fully Automatic [Shi and Malik] q Cpq c p Fully connected graph Node for every pixel Edge between every pair of pixels or every pair of sufficiently close pixels Each edge is weighted by the similarity (affinity) of the two nodes Similarity is inversely proportional to difference in color and position

Segmentation by graph partitioning wij i j A B C Break Graph into Segments Delete links that cross between segments Easiest to break links that have low affinity similar pixels should be in the same segments dissimilar pixels should be in different segments Source: S. Seitz

Measuring affinity Suppose we represent each pixel by a feature vector x, and define a distance function appropriate for this feature representation Then we can convert the distance between two feature vectors into an affinity with the help of a generalized Gaussian kernel:

Scale affects affinity Small σ: group only nearby points Large σ: group far-away points

Graph cut Set of edges whose removal makes a graph disconnected B A Set of edges whose removal makes a graph disconnected Cost of a cut: sum of weights of cut edges Any graph cut gives us a segmentation Find a minimum cut Gives us a “good” segmentation Source: S. Seitz

Example: Minimum Cut We can do segmentation by finding the minimum cut in a graph Efficient algorithms exist for doing this Minimum cut example

Example: Minimum Cut We can do segmentation by finding the minimum cut in a graph Efficient algorithms exist for doing this Minimum cut example

Normalized cut Drawback: minimum cut tends to cut off very small, isolated components Ideal Cut Cuts with lesser weight than the ideal cut * Slide from Khurram Hassan-Shafique CAP5415 Computer Vision 2003

Normalized Cuts B A Normalized Cut a cut penalizes large segments fix by normalizing for size of segments volume(A) = sum of costs of all edges that touch A J. Shi and J. Malik. Normalized cuts and image segmentation. PAMI 2000

Interpretation as a Dynamical System Treat the links as springs and shake the system elasticity proportional to cost vibration “modes” correspond to segments can compute these by solving an eigenvector problem http://www.cis.upenn.edu/~jshi/papers/pami_ncut.pdf

Interpretation as a Dynamical System Treat the links as springs and shake the system elasticity proportional to cost vibration “modes” correspond to segments can compute these by solving an eigenvector problem http://www.cis.upenn.edu/~jshi/papers/pami_ncut.pdf

Color Image Segmentation

More Details: Normalized cut Let W be the adjacency matrix of the graph Let D be the diagonal matrix with diagonal entries D(i, i) = Σj W(i, j) Then the normalized cut cost can be written as where y is an indicator vector whose value should be 1 in the ith position if the ith feature point belongs to A and a negative constant otherwise J. Shi and J. Malik. Normalized cuts and image segmentation. PAMI 2000

Normalized cut Finding the exact minimum of the normalized cut cost is NP-complete, but if we relax y to take on arbitrary values, then we can minimize the relaxed cost by solving the generalized eigenvalue problem (D − W)y = λDy The solution y is given by the generalized eigenvector corresponding to the second smallest eigenvalue Intutitively, the ith entry of y can be viewed as a “soft” indication of the component membership of the ith feature Can use 0 or median value of the entries as the splitting point (threshold), or find threshold that minimizes the Ncut cost

Normalized cut algorithm Represent the image as a weighted graph G = (V,E), compute the weight of each edge, and summarize the information in D and W Solve (D − W)y = λDy for the eigenvector with the second smallest eigenvalue Use the entries of the eigenvector to bipartition the graph To find more than two clusters: Recursively bipartition the graph Run k-means clustering on values of several eigenvectors

Example result

Questions? Beyond D2L Examples and information can be found online at: http://docdingle.com/teaching/cs.html Continue to more stuff as needed

Extra Reference Stuff Follows

Credits Much of the content derived/based on slides for use with the book: Digital Image Processing, Gonzalez and Woods Some layout and presentation style derived/based on presentations by Donald House, Texas A&M University, 1999 Sventlana Lazebnik, UNC, 2010 Noah Snavely, Cornell University, 2012 Xin Li, WVU, 2014 George Wolberg, City College of New York, 2015 Yao Wang and Zhu Liu, NYU-Poly, 2015