CS 664 Segmentation. Daniel Huttenlocher

Similar documents
CS 664 Slides #11 Image Segmentation. Prof. Dan Huttenlocher Fall 2003

Efficient Graph-Based Image Segmentation

CS 534: Computer Vision Segmentation and Perceptual Grouping

Applications. Foreground / background segmentation Finding skin-colored regions. Finding the moving objects. Intelligent scissors

Overview. Original. The context of the problem Nearest related work Our contributions The intuition behind the algorithm. 3.

EE 701 ROBOT VISION. Segmentation

Image Segmentation continued Graph Based Methods

6.801/866. Segmentation and Line Fitting. T. Darrell

Image Analysis Lecture Segmentation. Idar Dyrdal

STUDYING THE FEASIBILITY AND IMPORTANCE OF GRAPH-BASED IMAGE SEGMENTATION TECHNIQUES

Image Segmentation. Selim Aksoy. Bilkent University

Image Segmentation. Selim Aksoy. Bilkent University

Segmentation and Grouping April 19 th, 2018

Robotics Programming Laboratory

Segmentation. Bottom Up Segmentation

Targil 12 : Image Segmentation. Image segmentation. Why do we need it? Image segmentation

Normalized cuts and image segmentation

CS 534: Computer Vision Segmentation and Perceptual Grouping

CS 534: Computer Vision Segmentation II Graph Cuts and Image Segmentation

Image Segmentation continued Graph Based Methods. Some slides: courtesy of O. Capms, Penn State, J.Ponce and D. Fortsyth, Computer Vision Book

Graph Based Image Segmentation

Grouping and Segmentation

HIGH RESOLUTION REMOTE SENSING IMAGE SEGMENTATION BASED ON GRAPH THEORY AND FRACTAL NET EVOLUTION APPROACH

Efficient Graph based Image Segmentation

ECG782: Multidimensional Digital Signal Processing

Clustering CS 550: Machine Learning

Lecture 7: Segmentation. Thursday, Sept 20

Segmentation and Grouping

Segmentation Computer Vision Spring 2018, Lecture 27

Markov Networks in Computer Vision

The goals of segmentation

Lecture 16 Segmentation and Scene understanding

Markov Networks in Computer Vision. Sargur Srihari

human vision: grouping k-means clustering graph-theoretic clustering Hough transform line fitting RANSAC

ECSE 626 Course Project : A Study in the Efficient Graph-Based Image Segmentation

Segmentation and Grouping April 21 st, 2015

Outline. Segmentation & Grouping. Examples of grouping in vision. Grouping in vision. Grouping in vision 2/9/2011. CS 376 Lecture 7 Segmentation 1

A new method for more efficient seismic image segmentation

CS 4495 Computer Vision Motion and Optic Flow

CSE 473/573 Computer Vision and Image Processing (CVIP) Ifeoma Nwogu. Lectures 21 & 22 Segmentation and clustering

Topic 4 Image Segmentation

EXAM SOLUTIONS. Image Processing and Computer Vision Course 2D1421 Monday, 13 th of March 2006,

EE795: Computer Vision and Intelligent Systems

Peripheral drift illusion

Detecting and Identifying Moving Objects in Real-Time

Motion Tracking and Event Understanding in Video Sequences

Region-based Segmentation

CHAPTER 4. ANALYSIS of GRAPH THEORETICAL IMAGE SEGMENTATION METHODS

Segmentation & Clustering

Operators-Based on Second Derivative double derivative Laplacian operator Laplacian Operator Laplacian Of Gaussian (LOG) Operator LOG

The Curse of Dimensionality

Segmentation and Grouping

Segmentation and low-level grouping.

Segmentation by Clustering

Object Recognition Using Pictorial Structures. Daniel Huttenlocher Computer Science Department. In This Talk. Object recognition in computer vision

Last update: May 4, Vision. CMSC 421: Chapter 24. CMSC 421: Chapter 24 1

Fundamentals of Digital Image Processing

Supervised texture detection in images

Grouping and Segmentation

Image Segmentation. Srikumar Ramalingam School of Computing University of Utah. Slides borrowed from Ross Whitaker

Part 3: Image Processing

COMPUTER VISION > OPTICAL FLOW UTRECHT UNIVERSITY RONALD POPPE

CS 2770: Computer Vision. Edges and Segments. Prof. Adriana Kovashka University of Pittsburgh February 21, 2017

Content-based Image and Video Retrieval. Image Segmentation

University of Florida CISE department Gator Engineering. Clustering Part 4

Salt delineation via interpreter-guided 3D seismic image segmentation

Comparison between Motion Analysis and Stereo

Segmentation by Clustering. Segmentation by Clustering Reading: Chapter 14 (skip 14.5) General ideas

CS443: Digital Imaging and Multimedia Perceptual Grouping Detecting Lines and Simple Curves

Fitting: Voting and the Hough Transform April 23 rd, Yong Jae Lee UC Davis

Computer Vision 2. SS 18 Dr. Benjamin Guthier Professur für Bildverarbeitung. Computer Vision 2 Dr. Benjamin Guthier

Clustering Part 4 DBSCAN

Segmentation by Clustering Reading: Chapter 14 (skip 14.5)

Motion and Tracking. Andrea Torsello DAIS Università Ca Foscari via Torino 155, Mestre (VE)

Some material taken from: Yuri Boykov, Western Ontario

Local Features: Detection, Description & Matching

Learning and Inferring Depth from Monocular Images. Jiyan Pan April 1, 2009

Segmentation and Grouping

CHAPTER 3 IMAGE ENHANCEMENT IN THE SPATIAL DOMAIN

Chapter 11 Representation & Description

Coarse-to-fine image registration

CS 4495 Computer Vision A. Bobick. Motion and Optic Flow. Stereo Matching

Biometrics Technology: Image Processing & Pattern Recognition (by Dr. Dickson Tong)

Using Subspace Constraints to Improve Feature Tracking Presented by Bryan Poling. Based on work by Bryan Poling, Gilad Lerman, and Arthur Szlam

Object detection using Region Proposals (RCNN) Ernest Cheung COMP Presentation

Edge and local feature detection - 2. Importance of edge detection in computer vision

Perception. Autonomous Mobile Robots. Sensors Vision Uncertainties, Line extraction from laser scans. Autonomous Systems Lab. Zürich.

Structured Light II. Thanks to Ronen Gvili, Szymon Rusinkiewicz and Maks Ovsjanikov

Computer Vision I. Announcement. Corners. Edges. Numerical Derivatives f(x) Edge and Corner Detection. CSE252A Lecture 11

Multi-stable Perception. Necker Cube

EE795: Computer Vision and Intelligent Systems

CS4733 Class Notes, Computer Vision

Classification and Detection in Images. D.A. Forsyth

A Systems View of Large- Scale 3D Reconstruction

Some Applications of Graph Algorithms in Computer Vision

Object-Based Classification & ecognition. Zutao Ouyang 11/17/2015

Feature Tracking and Optical Flow

MULTIVIEW REPRESENTATION OF 3D OBJECTS OF A SCENE USING VIDEO SEQUENCES

SYDE Winter 2011 Introduction to Pattern Recognition. Clustering

Biomedical Image Analysis. Point, Edge and Line Detection

Transcription:

CS 664 Segmentation Daniel Huttenlocher

Grouping Perceptual Organization Structural relationships between tokens Parallelism, symmetry, alignment Similarity of token properties Often strong psychophysical cues Segmentation Clustering pixels into regions Generally contiguous in image, not always Over-segmentation has proven useful, commonly termed super-pixels 2

What s This Image? 3

Beyond Figure/Ground Gestalt movement, properties and relations that form percept as a whole 4

Important Structural Relations 5

Occluding Contours and Percept 6

Importance of Context to Percept Famous Muller-Lyer Illusion 7

Grouping: Illusory Contours 8

Figure/Ground Separation Find foreground by subtracting out previously obtained background image In practice background usually not stationary, so simple subtraction not good Model background For fixed camera, Gaussian intensity model for each pixel has proven effective [Stauffer&Grimson] Test fit of observed pixel value to distribution Update background distribution at some slow rate, for inliers 9

Non-Stationary Pixels Trees, bushes, water, flags, Changes in lighting over time E.g., bimodal distribution of intensity at a given water pixel over a few minutes 10

Background Modeling Binary image of outlier pixels from Gaussian background models Small differences reliable enough to often correspond to actual objects E.g., pedestrians in this scene 11

Simple Tracker Determination of foreground/background in this manner yields data good for simple tracking E.g., Kalman filter for each object estimating position and velocity vector 12

Segmenting Single Images Find regions of image that are coherent Dual of edge detection Regions vs. boundaries Related to clustering problems Early work in image processing and clustering Many approaches Graph-based Cuts, spanning trees, MRF methods Feature space clustering Mean shift 13

Motivating Example Coherent regions independent of particular objects or recognition This image has three perceptually distinct regions Where are largest intensity differences? 14

Graph Based Formulations G=(V,E) with vertices corresponding to pixels and edges connecting neighboring pixels 4-connected or 8-conneted Weight of edge is measure of difference (or affinity) between connected pixels A segmentation, S, is a partition of V such that each C S is connected 15

Forms of Affinity Measure Intensity Distance aff ( x, y)= exp 1 2 2σ i I x ( () Iy ) ()2 aff ( x, y)= exp 1 2 2σ d x y 2 ( ) Texture aff ( x, y)= exp 1 2 2σ t cx ( () cy ) ()2 16

Important Characteristics Efficiency Run in time essentially linear in the number of image pixels With low constant factors E.g., compared to edge detection Understandable output Way to describe what algorithm does E.g., Canny edge operator and step edge plus noise Not purely local Perceptually important 17

Motivating Example Purely local criteria are inadequate Difference along border between A and B is less than differences within C Criteria based on piecewise constant regions are inadequate (e.g., Potts MRF) A B C Will arbitrarily split A into subparts 18

MST Based Approaches Graph-based representation Nodes corresponding to pixels, edge weights are intensity difference between connected pixels Compute minimum spanning tree (MST) Cheapest way to connect all pixels into single component or region Selection criterion Remove certain MST edges to form components Fixed threshold Threshold based on neighborhood How to find neighborhood 19

Measure Whole Components Consider properties of two components being merged when adding an edge [Felzenszwalb 04] Rather than MST based on local edge weights Recall Kruskal s MST algorithm adds edges from lowest to highest weight Only when connect distinct components Apply criterion based on components to further filter added edges Form of criterion limited by considering edges weight ordered 20

Measuring Component Difference Let internal difference of a component be maximum edge weight in its MST Int(C) = max e MST(C,E) w(e) Smallest weight such that all pixels of C are connected by edges of at most that weight Let difference between two components be minimum edge weight connecting them Dif(C 1, C 2 ) = min vi C 1, v j C 2 w((v i, v j )) Note: infinite if there is no such edge 21

Region Comparison Function Two components judged to be distinct when Dif(C 1, C 2 ) large relative to Int(C 1 ) or Int(C 2 ) Require that it be sufficiently larger Controlled by (non-negative) threshold function τ Region comparison function g(c 1, C 2 ) is true when regions should be distinct, i.e., when Dif(C 1, C 2 ) > MInt(C 1, C 2 ) where MInt(C 1, C 2 ) = min(int(c 1 )+τ(c 1 ), Int(C 2 )+τ(c 2 )) 22

About the Threshold Function τ Intuitively Int(C) estimates local differences over component Small components give underestimate of local difference neighboring pixels tend to be similar Thus τ should be large in this case Use a function inversely proportional to component size τ(c) = k / C k is a parameter of the method that captures scale of observation Larger k means prefer larger components Other functions possible, e.g., based on shape 23

Algorithm 0. 1. 2. 3. Sort edges of E into (e 1,, e n ), in order of nondecreasing edge weight Initialize S with one component per pixel For each e q in (e 1,, e n ) do step 3 If weight of e q small relative to internal difference of components it connects then merge components, otherwise do nothing I.e., if w(e q ) MInt(C i, C j ), where C i, C j S are distinct components connected by e q, then update S by merging C i and C j 24

Regions Found by the Algorithm A Three main regions plus a few small ones Why the algorithm stops growing these B Weight of edges between A and B large wrt max weight MST edges of A and of B Weight of edges between B and C large wrt max weight MST edge of B (but not of C) C 25

Criteria for a Good Segmentation Some predicate for comparing two regions Intuitively, evaluates whether there is evidence for a boundary between two regions A segmentation is too fine when predicate says no evidence for a boundary Some pair of neighboring regions where predicate false A segmentation is too coarse when there is some refinement that is not too fine A refinement is obtained by splitting one or more regions of a segmentation 26

Good Segmentations and the Example Splitting A, B or C would be too fine Not splitting A from B or B from C would be too coarse A B C 27

Other Algorithms and the Criteria Piecewise constant regions (or compact clusters in a color-based feature space) Too fine: arbitrarily split ramp in A into pieces Breaking high cost edges in the MST of a graph corresponding to the image Both: merge A with B or split C into multiple pieces A B C 28

Properties of the Algorithm It is fast, O(n log n) for sorting in step 0 and O(nα(n)) for the remaining steps Using union-find with path compression to represent the partition, S It produces good segmentations Neither too coarse nor too fine according to the above definitions Despite being a greedy algorithm It yields the same results regardless of the order that equal-weight edges are considered Proof a bit involved, won t discuss here 29

Components Freeze When two components do not merge, one will be a component of the final segmentation A merge decision is made for an edge e q and the two components that it connects C i, C j Say the merge does not occur because w(e q ) > Int(C i )+τ(c i ) Then any subsequent merge involving C i will also not occur, because edges are considered in nondecreasing weight order Analogous for C j, so when a merge fails one or both of the components involved freeze 30

Segmentation Not Too Fine Follows readily from fact that components freeze An edge between two components in final segmentation implies the algorithm decided not to merge when considering this edge Component that caused this decision is frozen, so appears in the final segmentation Thus the decision that was true when the edge was considered remains true for the final segmentation 31

Segmentation Not Too Coarse Means any proper refinement is too fine Suppose was a proper refinement, T, of the final segmentation, S, that is not too fine Consider the minimum weight edge, e, that is between two components A,B of T but is within a single component C of S A C e B 32

Sketch Continued All edges in MST of either A or B have weights smaller than w(e), say it is A Definition of not too fine, and predicate Thus algorithm creates A before considering e C e A B Because all edges on boundary of A, but internal to C, have weight larger than w(e) Since T not too fine, the decision criterion implies the algorithm would freeze A when considering e 33

Closely Related Problems Hard What appears to be a slight change Make Dif be quantile instead of min k-th vi C 1, v j C 2 w((v i, v j )) Desirable for addressing cheap path problem of merging based on one low cost edge Makes problem NP hard Reduction from min ratio cut Ratio of capacity to demand between nodes Other methods that we will see are also NP hard and approximated in various ways 34

Some Implementation Issues Smooth images slightly before processing Remove high variation due to digitization artifacts Sorting is dominant time in processing For known edge distribution can in principle do better by binning Treat color images as three separate images Components of segmentation are intersection of components from each of the three color planes Motivation: significant change in any color channel should result in a region boundary 35

Some Example Segmentations k=300 320 components larger than 10 k=200 323 components larger than 10 36

Some Shortcomings Smoothing can introduce problems Extra regions at boundaries Creates ramps between regions, thus merge 37

Simple Object Examples 38

Monochrome Example Components locally connected (grid graph) Sometimes not desirable 39

Clustering: Non-Local Components Points in d-dimensional space Vertex for each point, edge weights based on distance in this space Intuitively, Int measures density of clusters Smallest dilation radius such that all points in the cluster are connected When clusters separated by nearly same distance as their densities then segmentation is too fine For efficiency use a graph with O( V ) edges Use Mount s approximate nearest neighbor algorithm to find nearest neighbors 40

Clustering Gaussian Point Data Note: Gaussian not constant density Graph connecting four nearest neighbors to each vertex k = 1 3 largest clusters, 75% classified 5 largest clusters, 95% classified 41

Clustering for Image Segmentation Treat each pixel as a point in a feature space More than just local intensity or color, incorporate spatial, texture, motion or other differences Now regions of segmentation need not be connected in image Practical issue, relatively expensive to find nearest neighbors for graph Can use neighbors in some fixed distance, but restricts regions that can be found In examples here use 4 nearest neighbors 42

Example Clustering of Image Data Segmentation using difference in R,G,B values and in position Distance of 5 pixels same as 1 intensity unit Non-Local Component 43

About Clustering for Image Data Meaningful regions in image are not necessarily compact in feature space Cheap path in feature space not always apparent in image 44

Additional Example High variability in illuminated tower pixels 45

Beyond Grid Graphs Image segmentation methods using affinity (or cost) matrices For each pair of vertices v i,v j an associated weight w ij Affinity if larger when vertices more related Cost if larger when vertices less related Matrix W=[ w ij ] of affinities or costs W is large, avoid constructing explicitly For images affinities tend to be near zero except for pixels that are nearby E.g., decrease exponentially with distance W is sparse 46