Some material taken from: Yuri Boykov, Western Ontario

Similar documents
CS 664 Lecture 2 Distance Transforms. Prof. Dan Huttenlocher Fall 2003

CS 664 Flexible Templates. Daniel Huttenlocher

CS664 Lecture #21: SIFT, object recognition, dynamic programming

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

CS 664 Segmentation. Daniel Huttenlocher

Mathematical Morphology and Distance Transforms. Robin Strand

Regularization and Markov Random Fields (MRF) CS 664 Spring 2008

k-means A classical clustering algorithm

Template Matching Rigid Motion

Algorithms for Markov Random Fields in Computer Vision

A New Bayesian Framework for Object Recognition

Template Matching Rigid Motion. Find transformation to align two images. Focus on geometric features

Raghuraman Gopalan Center for Automation Research University of Maryland, College Park

Feature Detectors and Descriptors: Corners, Lines, etc.

CS664 Lecture #16: Image registration, robust statistics, motion

Combinatorial optimization and its applications in image Processing. Filip Malmberg

Announcements. Image Segmentation. From images to objects. Extracting objects. Status reports next Thursday ~5min presentations in class

Computer Vision I - Basics of Image Processing Part 1

Announcements. CS 188: Artificial Intelligence Spring Generative vs. Discriminative. Classification: Feature Vectors. Project 4: due Friday.

Image Registration Lecture 4: First Examples

10/03/11. Model Fitting. Computer Vision CS 143, Brown. James Hays. Slides from Silvio Savarese, Svetlana Lazebnik, and Derek Hoiem

ASYMPTOTIC COMPLEXITY

EE368/CS232 Digital Image Processing Winter

Topic 6 Representation and Description

CS 534: Computer Vision Segmentation and Perceptual Grouping

LARGE MARGIN CLASSIFIERS

Clustering Color/Intensity. Group together pixels of similar color/intensity.

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

Feature Matching and Robust Fitting

EE795: Computer Vision and Intelligent Systems

CS664 Lecture #19: Layers, RANSAC, panoramas, epipolar geometry

CS 5540 Spring 2013 Assignment 3, v1.0 Due: Apr. 24th 11:59PM

Learning Two-View Stereo Matching

CHAPTER 4: CLUSTER ANALYSIS

Segmentation Computer Vision Spring 2018, Lecture 27

Hierarchical Clustering 4/5/17

CPSC 340: Machine Learning and Data Mining. Robust Regression Fall 2015

CSE 417 Branch & Bound (pt 4) Branch & Bound

CS5670: Computer Vision

Semi-supervised learning and active learning

Multi-Label Moves for Multi-Label Energies

A 3D Point Cloud Registration Algorithm based on Feature Points

Morphological Image Processing

Task Description: Finding Similar Documents. Document Retrieval. Case Study 2: Document Retrieval

Elaborazione delle Immagini Informazione multimediale - Immagini. Raffaella Lanzarotti

CS6670: Computer Vision

9.913 Pattern Recognition for Vision. Class 8-2 An Application of Clustering. Bernd Heisele

Roundoff Errors and Computer Arithmetic

Announcements. CS 188: Artificial Intelligence Spring Classification: Feature Vectors. Classification: Weights. Learning: Binary Perceptron

CS 4649/7649 Robot Intelligence: Planning

1 Probability Review. CS 124 Section #8 Hashing, Skip Lists 3/20/17. Expectation (weighted average): the expectation of a random quantity X is:

CPSC 340: Machine Learning and Data Mining. Density-Based Clustering Fall 2016

L16. Scan Matching and Image Formation

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

Perceptron as a graph

CS264: Homework #4. Due by midnight on Wednesday, October 22, 2014

CSE 410 Computer Systems. Hal Perkins Spring 2010 Lecture 12 More About Caches

Segmentation: Clustering, Graph Cut and EM

Lecture 5 Finding meaningful clusters in data. 5.1 Kleinberg s axiomatic framework for clustering

Geometric data structures:

CS443: Digital Imaging and Multimedia Binary Image Analysis. Spring 2008 Ahmed Elgammal Dept. of Computer Science Rutgers University

CSE 573: Artificial Intelligence Autumn 2010

MIT 801. Machine Learning I. [Presented by Anna Bosman] 16 February 2018

CS 340 Lec. 4: K-Nearest Neighbors

Chamfer matching. More on template matching. Distance transform example. Computing the distance transform. Shape based matching.

Optimization and least squares. Prof. Noah Snavely CS1114

Algorithms for Sensor-Based Robotics: Sampling-Based Motion Planning

Bioimage Informatics

Learning and Recognizing Visual Object Categories Without First Detecting Features

Methods and Models for Combinatorial Optimization Exact methods for the Traveling Salesman Problem

Invariant shape similarity. Invariant shape similarity. Invariant similarity. Equivalence. Equivalence. Equivalence. Equal SIMILARITY TRANSFORMATION

ADVANCED MACHINE LEARNING MACHINE LEARNING. Kernel for Clustering kernel K-Means

Processing of binary images

Locality- Sensitive Hashing Random Projections for NN Search

Outline. CS38 Introduction to Algorithms. Approximation Algorithms. Optimization Problems. Set Cover. Set cover 5/29/2014. coping with intractibility

Machine Learning and Data Mining. Clustering (1): Basics. Kalev Kask

x y

#$ % $ $& "$%% " $ '$ " '

Review for the Final

EE795: Computer Vision and Intelligent Systems

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

Motion Estimation. There are three main types (or applications) of motion estimation:

CSE 417 Network Flows (pt 4) Min Cost Flows

Pseudo code of algorithms are to be read by.

Lecture 28 Intro to Tracking

Recall: Blob Merge/Split Lecture 28

Classification: Feature Vectors

Nearest Neighbor Classification. Machine Learning Fall 2017

Today s topic CS347. Results list clustering example. Why cluster documents. Clustering documents. Lecture 8 May 7, 2001 Prabhakar Raghavan

CS281 Section 3: Practical Optimization

Lecture 10: SVM Lecture Overview Support Vector Machines The binary classification problem

Image Features: Local Descriptors. Sanja Fidler CSC420: Intro to Image Understanding 1/ 58

ASYMPTOTIC COMPLEXITY

Today s class. Roots of equation Finish up incremental search Open methods. Numerical Methods, Fall 2011 Lecture 5. Prof. Jinbo Bi CSE, UConn

EE795: Computer Vision and Intelligent Systems

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

Mathematical Programming and Research Methods (Part II)

Image processing. Reading. What is an image? Brian Curless CSE 457 Spring 2017

Three-Dimensional Sensors Lecture 6: Point-Cloud Registration

Math background. 2D Geometric Transformations. Implicit representations. Explicit representations. Read: CS 4620 Lecture 6

Transcription:

CS664 Lecture #22: Distance transforms, Hausdorff matching, flexible models Some material taken from: Yuri Boykov, Western Ontario

Announcements The SIFT demo toolkit is available from http://www.evolution.com/product/oem/d ownload/?ch=vision Usage instructions are at http://www.evolution.com/product/oem/downl oad/vision_usage.masn Including a list of supported cameras Implementation w/o GUI is at http://www.cs.ubc.ca/~lowe/keypoints/ Next quiz on Tuesday 11/15 2

Chamfer matching Consider features as point sets Suppose we assign each model feature the distance to the nearest image feature y P D P (x) = min y P x - y Intuition: from each image feature (point in the image) we grow out a cone Chamfer distance: x X D P (x) Works, but must efficiently minimize it over many placements of the model 3

DP to the rescue! Lots of computation is re-used, both within and across model placements Places in the image near to image features are good, places far away are bad This can be computed once only, from the image, and widely re-used Within and across model placements You can think of this as blurring the binary features 4

Distance transform Depends upon distance measure We will assume the L 1 distance for simplicity Commonly computed on a grid Γ using D P (x) = min y Γ ( x - y + 1 P (y) ) Where 1 P (y) = 0 when y P, otherwise 2 1 2 3 1 0 1 2 1 0 1 2 1 2 2 3 5

L 1 DT Algorithm Two pass O(n) algorithm for 1D L 1 norm (for simplicity just distance) 1. Initialize: For all j D[j] 1 P [j] 2. Forward: For j from 1 up to n-1 D[j] min(d[j],d[j-1]+1) 3. Backward: For j from n-2 down to 0 D[j] min(d[j],d[j+1]+1) 0 0 0 0 1 0 1 2 3 0 1 1 0 1 0 1 2 1 0 1 6

Morphological operations DT related to mathematical morphology A field with a very high ratio of terminology to content Local operations on binary images Example: count the number of nearby 1 s Make a binary decision based on this Erosion, dilation, etc. Most interesting variant is Conway s Life 7

DT and Morphological Dilation Dilation operation replaces each point of P with some fixed point set Q Dilation by a disc C d of radius d replaces each point with a disc A point is in the dilation of P by C d (P C d ) exactly when the distance transform value is no more than d (for appropriate disc) x P C d D P (x) d 2 1 2 1 0 1 3 2 0 1 0 1 1 1 0 0 1 1 1 1 1 1 0 1 1 0 1 2 1 2 2 3 1 1 1 0 1 0 0 0 1 1 1 1 1 1 1 0 8

Chamfer measure DT in Matching Sum of distance transform values Probe DT at locations specified by model and sum resulting values Hausdorff distance (and generalizations) Max-min distance which can be computed efficiently using distance transform Generalization to quantile of distance transform values more useful in practice Iterated closest point (ICP) like methods Assume closest point corresponds 9

Easy if Correspondence Known 1 7 2 3 1 2 7 3... 10

Don t Know Correspondence Guess and Try to Improve 11

Slow Problems with ICP Can take many iterations Each iteration slow due to search for correspondences Fitzgibbons: improve this by distance transform No convergence guarantees Can get stuck in local minima Not much to do about this Can be improved by using robust distance measures (e.g., truncated quadratic) 12

Hausdorff Distance Classical definition Directed distance (not symmetric) h(a,b) = max a A min b B a-b Distance (symmetry) H(A,B) = max(h(a,b), h(b,a)) Minimization term is simply a distance transform of B h(a,b) = max a A D B (a) Maximize over selected values of DT Classical distance not robust, single bad match dominates value 13

Best match Hausdorff Matching Minimum fractional Hausdorff distance over given space of transformations Good matches Above some fraction (rank) and/or below some distance Each point in (quantized) transformation space defines a distance Search over transformation space Efficient branch-and-bound pruning to skip transformations that cannot be good 14

Hausdorff Matching Partial (or fractional) Hausdorff distance to address robustness to outliers Rank rather than maximum h k (A,B) = kth a A min b B a-b = kth a A D B (a) K-th largest value of D B at locations given by A Often specify as fraction f rather than rank 0.5, median of distances; 0.75, 75 th percentile 1,1,2,2,3,3,3,3,4,4,5,12,14,15.25.5.75 1.0 15

Spatially Coherent Matching Hausdorff and Chamfer matching do not measure degree of connectivity E.g., edge chains versus isolated points Spatially coherent matching approach Separate features into three subsets Matchable Near image features Boundary Matchable but near un-matchable Un-matchable Far from image features 16

Flexible models Classical recognition doesn t handle non-rigid motions at all well Pictorial structures Parts + springs Appearance models 17

Model definition Parts are V={v 1,,v n }, graph vertices Configuration L=(l 1,, l n ) Specifying locations of the parts Appearance parameters A=(a 1,, a n ) Model for each part Edge e ij, (v i,v j ) E for connected parts Explicit dependency between part locations l i, l j Connection parameters C={c ij e ij E} Spring parameters for each pair of connected parts 18

Flexible Template Algorithms Difficulty depends on structure of graph General case exponential time Consider special case in which parts translate with respect to common origin E.g., useful for faces Parts V= {v 1, v n } Distinguished central part v 1 Spring c i1 connecting v i to v 1 Quadratic cost for spring 19

Central Part Energy Function Location L=(l 1,, l n ) specifies where each part positioned in image Best location min L (Σ i m i (l i ) + d i (l i,l 1 )) Part cost m i (l i ) Measures degree of mismatch of appearance a i when part v i placed at location l i Deformation cost d i (l i,l 1 ) Spring cost c i1 of part v i measured with respect to central part v 1 Note deformation cost zero for part v 1 (wrt self) 20

Consider Case of 2 Parts min l1,l2 (m 1 (l 1 ) + m 2 (l 2 )+ l 2 T 2 (l 1 ) 2 ) Here, T 2 (l 1 ) transforms l 1 to ideal location wrt l 2 (offset) min l1 (m 1 (l 1 ) + min l2 (m 2 (l 2 )+ l 2 T 2 (l 1 ) 2 )) But min x (f(x) + x y 2 ) is a distance transform min l1 (m 1 (l 1 ) + D m2 (T 2 (l 1 )) Sequential rather than simultaneous min Don t need to consider each pair of positions for the two parts because a distance 21