segmentation methods
play

Segmentation methods It makes a hard decision too soon. We want to - PDF document

Readings: Mean shift paper and background segmentation paper. Segmentation and low-level grouping. Mean shift IEEE PAMI paper by Comanici and Meer, http://www.caip.rutgers.edu/~comanici/Papers/MsRobustApproach.pdf Forsyth&Ponce,


  1. Readings: Mean shift paper and background segmentation paper. Segmentation and low-level grouping. • Mean shift IEEE PAMI paper by Comanici and Meer, http://www.caip.rutgers.edu/~comanici/Papers/MsRobustApproach.pdf • Forsyth&Ponce, Ch. 14, 15.1, 15.2. Bill Freeman, MIT • Wallflower: Principles and Practice of Background Maintenance, by Kentaro Toyama, John Krumm, Barry Brumitt, Brian Meyers. 6.869 April 14, 2005 http://research.microsoft.com/users/jckrumm/Publications%202000/Wall%20Flower.pdf The generic, unavoidable problem with low-level segmentation and grouping Segmentation methods • It makes a hard decision too soon. We want to • Segment foreground from background think that simple low-level processing can • K-means clustering identify high-level object boundaries, but any • Mean-shift segmentation implementation reveals special cases where • Normalized cuts the low-level information is ambiguous. • So we should learn the low-level grouping algorithms, but maintain ambiguity and pass along a selection of candidate groupings to higher processing levels. Movie frames from which we want to extract the foreground subject A simple segmentation technique: (the textbook author’s child) Background Subtraction • If we know what the • Approach: background looks like, – use a moving average it is easy to identify to estimate background image “interesting bits” – subtract from current • Applications frame – Person in an office – large absolute values – Tracking cars on a road are interesting pixels – surveillance • trick: use morphological operations to clean up pixels 1

  2. 2 different background removal models Static Background Modeling Background estimate Foreground estimate Foreground estimate Examples Average over frames low thresh high thresh EM background estimate [MIT Media Lab Pfinder / ALIVE System] EM Static Background Modeling Static Background Modeling Examples Examples [MIT Media Lab Pfinder / ALIVE System] [MIT Media Lab Pfinder / ALIVE System] Dynamic Background Mixture of Gaussian BG model BG Pixel distribution is non-stationary: Staufer and Grimson tracker: Fit per-pixel mixture model to observed distrubution. [MIT AI Lab VSAM] [MIT AI Lab VSAM] 2

  3. Background removal issues http://research.microsoft.com/users/toyama/wallflower.pd http://research.microsoft.com/users/toyama/wallflower.pd Background Techniques Compared Background Subtraction Principles Wallflower: Principles and Practice of Background Maintenance, by Kentaro Toyama, John Krumm, Barry Brumitt, Brian Meyers. P1: P2: P3: From the Wallflower Paper P4: P5: Segmentation as clustering Greedy Clustering Algorithms • Cluster together (pixels, tokens, etc.) that belong together… • Agglomerative clustering – attach closest to cluster it is closest to – repeat • Divisive clustering – split cluster along best boundary – repeat • Dendrograms – yield a picture of output as clustering process continues 3

  4. Segmentation methods • Segment foreground from background • K-means clustering • Mean-shift segmentation • Normalized cuts Data set Dendrogram formed by agglomerative clustering using single-link clustering. K-Means K-Means • Choose a fixed number of • Algorithm clusters – fix cluster centers; allocate points to closest cluster – fix allocation; compute best • Choose cluster centers and cluster centers point-cluster allocations to • x could be any set of minimize error features for which we can • can’t do this by search, compute a distance because there are too (careful about scaling) many possible allocations. ⎧ ⎫ ∑ ∑ x j − µ i 2 ⎨ ⎬ ⎩ ⎭ i ∈ clusters j ∈ elements of i'th cluster Image Clusters on intensity (K=5) Clusters on color (K=5) Matlab k-means clustering demo K-means clustering using intensity alone and color alone 4

  5. Image Clusters on color K-means using color alone, 11 segments K-means using color alone, 11 segments. Color alone often will not yeild salient segments! Ways to include spatial relationships (a) Define a Markov Random Field (MRF), where the state to be estimated includes the segment index. Solve by graph cuts or BP. (b) Augment data to be clustered with spatial coordinates. ⎛ ⎞ Y ⎜ ⎟ K-means using colour and ⎜ ⎟ u position, 20 segments color coordinates ⎜ ⎟ = z v ⎜ ⎟ Still misses goal of perceptually x ⎜ ⎟ spatial coordinates pleasing segmentation! ⎜ ⎟ ⎝ ⎠ y Hard to pick K… Mean Shift Segmentation Segmentation methods • Segment foreground from background • K-means clustering • Mean-shift segmentation • Normalized cuts http://www.caip.rutgers.edu/~comanici/MSPAMI/msPamiResults.html 5

  6. Mean Shift Algorithm Mean Shift Segmentation Mean Shift Algorithm Mean Shift Segmentation Algorithm 1. Choose a search window size. 1. Convert the image into tokens (via color, gradients, texture measures etc). 2. Choose the initial location of the search window. 2. Choose initial search window locations uniformly in the data. 3. Compute the mean location (centroid of the data) in the search window. 3. Compute the mean shift window location for each initial position. 4. Center the search window at the mean location computed in Step 3. 4. Merge windows that end up on the same “peak” or mode. 5. Repeat Steps 3 and 4 until convergence. 5. The data these merged windows traversed are clustered together. The mean shift algorithm seeks the “mode” or point of highest density of a data distribution: *Image From: Dorin Comaniciu and Peter Meer, Distribution Free Decomposition of Multivariate Data, Pattern Analysis & Applications (1999)2:22–30 • For your homework, you will do a mean shift algorithm just in the color domain. In the slides that follow, however, both spatial and color information are used in a mean shift segmentation. Comaniciu and Meer, IEEE PAMI vol. 24, no. 5, 2002 Window in image domain Apply mean shift jointly in the image Mean Shift color&spatial Segmentation Results: (left col.) and range (right col.) domains 1 Intensities of pixels within image domain window 2 0 1 Center of mass of pixels within 3 both image and range domain 0 1 windows Window in range domain 4 Center of mass of pixels within both image and range domain windows 5 6 0 1 7 http://www.caip.rutgers.edu/~comanici/MSPAMI/msPamiResults.html 0 1 6

  7. Mean Shift color&spatial Segmentation Results: Segmentation methods • Segment foreground from background • K-means clustering • Mean-shift segmentation • Normalized cuts Graph-Theoretic Image Segmentation Graphs Representations Build a weighted graph G=(V,E) from image V:image pixels ⎡ ⎤ 0 1 0 0 1 a ⎢ ⎥ E: connections between b 1 0 0 0 0 ⎢ ⎥ pairs of nearby pixels ⎢ ⎥ 0 0 0 0 1 c ⎢ ⎥ W : probabilit y that i & j ⎢ 0 0 0 0 1 ⎥ e ij ⎢ ⎥ ⎣ ⎦ 1 0 1 1 0 belong to the same d region Adjacency Matrix * From Khurram Hassan-Shafique CAP5415 Computer Vision 2003 Boundaries of image regions defined Weighted Graphs and Their by a number of attributes Representations – Brightness/color ∞ ∞ ⎡ ⎤ 0 1 3 – Texture a ⎢ ⎥ ∞ b 1 0 4 2 ⎢ ⎥ – Motion ⎢ ⎥ 3 4 0 6 7 – Stereoscopic depth ⎢ ⎥ ∞ ∞ ⎢ 6 0 1 ⎥ – Familiar configuration c e ⎢ ⎥ ∞ ⎣ 2 7 1 0 ⎦ 6 d Weight Matrix [Malik] * From Khurram Hassan-Shafique CAP5415 Computer Vision 2003 7

  8. Eigenvectors and affinity clusters Measuring Affinity • Simplest idea: we want a • This is an eigenvalue Intensity vector a giving the ( ) problem (p. 321 of ⎧ ⎛ ⎞ ⎫ ( ) = exp − ( ) − I y ( ) 1 2 ⎨ ⎬ aff x , y ⎠ I x association between each ⎝ 2 σ i Forsyth&Ponce) ⎩ 2 ⎭ element and a cluster • - choose the • We want elements within Distance eigenvector of A with this cluster to, on the ⎧ ⎛ ⎞ ( ) ⎫ ( ) = exp − 1 ⎠ x − y 2 ⎨ ⎬ aff x , y ⎝ 2 σ d whole, have strong affinity largest eigenvalue ⎩ 2 ⎭ with one another • We could maximize Color a T Aa ⎧ ( ) ⎫ ⎛ ⎞ ( ) = exp − ( ) − c y ( ) 1 2 ⎨ ⎬ aff x , y ⎠ c x ⎝ 2 σ t • But need the constraint 2 ⎩ ⎭ a T a = 1 Example eigenvector Example eigenvector points points eigenvector eigenvector matrix matrix Some Terminology for Graph Scale affects affinity Partitioning • How do we bipartition a graph: σ =.2 ∈ ∑ ∑ = = assoc ( A, A' ) W ( u , v ) cut ( A, B) W( u , v ), ∈ ∈ ∈ u A, v A' u A, v B A and A' not necessaril y disjoint ∩ = ∅ σ =.1 σ =.2 σ =1 with A B [Malik] 8

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend