Robert Collins CSE486, Penn State. Lecture 15 Robust Estimation : RANSAC

Similar documents
Epipolar Geometry. Readings: See Sections 10.1 and 15.6 of Forsyth and Ponce. Right Image. Left Image. e(p ) Epipolar Lines. e(q ) q R.

Build Panoramas on Android Phones

Introduction Epipolar Geometry Calibration Methods Further Readings. Stereo Camera Calibration

CS 534: Computer Vision 3D Model-based recognition

Make and Model Recognition of Cars

Camera geometry and image alignment

Segmentation of building models from dense 3D point-clouds

Part 2: Analysis of Relationship Between Two Variables

3D Tranformations. CS 4620 Lecture 6. Cornell CS4620 Fall 2013 Lecture Steve Marschner (with previous instructors James/Bala)

2-View Geometry. Mark Fiala Ryerson University

EXPERIMENTAL EVALUATION OF RELATIVE POSE ESTIMATION ALGORITHMS

Summary: Transformations. Lecture 14 Parameter Estimation Readings T&V Sec Parameter Estimation: Fitting Geometric Models

VOLUMNECT - Measuring Volumes with Kinect T M

INTERPRETING THE ONE-WAY ANALYSIS OF VARIANCE (ANOVA)

Projective Geometry. Projective Geometry

One-Way Analysis of Variance

Performance Metrics for Graph Mining Tasks

UNDERSTANDING THE TWO-WAY ANOVA

WISE Power Tutorial All Exercises

Simple Regression Theory II 2010 Samuel L. Baker

How To Understand And Solve A Linear Programming Problem

The Wondrous World of fmri statistics

Object Recognition and Template Matching

Additional sources Compilation of sources:

NCSS Statistical Software Principal Components Regression. In ordinary least squares, the regression coefficients are estimated using the formula ( )

Introduction to General and Generalized Linear Models

Multivariate Analysis of Variance (MANOVA)

Data Mining Techniques Chapter 6: Decision Trees

How To Check For Differences In The One Way Anova

Univariate Regression

Comparison of Non-linear Dimensionality Reduction Techniques for Classification with Gene Expression Microarray Data

Programming Exercise 3: Multi-class Classification and Neural Networks

Least-Squares Intersection of Lines

Flow Separation for Fast and Robust Stereo Odometry

AP: LAB 8: THE CHI-SQUARE TEST. Probability, Random Chance, and Genetics

A Primer on Mathematical Statistics and Univariate Distributions; The Normal Distribution; The GLM with the Normal Distribution

How To Cluster

Multivariate Analysis of Ecological Data

Example: Credit card default, we may be more interested in predicting the probabilty of a default than classifying individuals as default or not.

The Scientific Data Mining Process

1-Point RANSAC for EKF Filtering. Application to Real-Time Structure from Motion and Visual Odometry

Why Taking This Course? Course Introduction, Descriptive Statistics and Data Visualization. Learning Goals. GENOME 560, Spring 2012

Lesson 1: Comparison of Population Means Part c: Comparison of Two- Means

Time Domain and Frequency Domain Techniques For Multi Shaker Time Waveform Replication

Introduction to Hypothesis Testing. Hypothesis Testing. Step 1: State the Hypotheses

Multivariate Normal Distribution

Study Guide for the Final Exam

Choices, choices, choices... Which sequence database? Which modifications? What mass tolerance?

Class 19: Two Way Tables, Conditional Distributions, Chi-Square (Text: Sections 2.5; 9.1)

" Y. Notation and Equations for Regression Lecture 11/4. Notation:

Descriptive Statistics

Lecture Notes Module 1

Linear Threshold Units

STATISTICA Formula Guide: Logistic Regression. Table of Contents

CHAPTER 11 CHI-SQUARE AND F DISTRIBUTIONS

Recall this chart that showed how most of our course would be organized:

T-test & factor analysis

Review Jeopardy. Blue vs. Orange. Review Jeopardy

Data Mining - Evaluation of Classifiers

Tutorial for proteome data analysis using the Perseus software platform

Recognition. Sanja Fidler CSC420: Intro to Image Understanding 1 / 28

Improving the Performance of Data Mining Models with Data Preparation Using SAS Enterprise Miner Ricardo Galante, SAS Institute Brasil, São Paulo, SP

STT 200 LECTURE 1, SECTION 2,4 RECITATION 7 (10/16/2012)

Performance Evaluation of RANSAC Family

Linear Models in STATA and ANOVA

Calculating P-Values. Parkland College. Isela Guerra Parkland College. Recommended Citation

The Basics of FEA Procedure

Elementary Statistics Sample Exam #3

Solving Systems of Linear Equations

Regression III: Advanced Methods

New Work Item for ISO Predictive Analytics (Initial Notes and Thoughts) Introduction

NEW MEXICO Grade 6 MATHEMATICS STANDARDS

Final Project Report

Testing Research and Statistical Hypotheses

Lecture 2: Homogeneous Coordinates, Lines and Conics

Lecture 9: Introduction to Pattern Analysis

Local outlier detection in data forensics: data mining approach to flag unusual schools

OUTLIER ANALYSIS. Data Mining 1

Section 14 Simple Linear Regression: Introduction to Least Squares Regression

Introduction to Pattern Recognition

Augmented Reality Tic-Tac-Toe

Tutorial 5: Hypothesis Testing

NCC-RANSAC: A Fast Plane Extraction Method for Navigating a Smart Cane for the Visually Impaired

Tracking of Small Unmanned Aerial Vehicles

Descriptive Methods Ch. 6 and 7

t Tests in Excel The Excel Statistical Master By Mark Harmon Copyright 2011 Mark Harmon

II. DISTRIBUTIONS distribution normal distribution. standard scores

Towards Using Sparse Bundle Adjustment for Robust Stereo Odometry in Outdoor Terrain

CONTENTS OF DAY 2. II. Why Random Sampling is Important 9 A myth, an urban legend, and the real reason NOTES FOR SUMMER STATISTICS INSTITUTE COURSE

Multivariate Analysis of Variance (MANOVA): I. Theory

6.3 Conditional Probability and Independence

NATIONAL GENETICS REFERENCE LABORATORY (Manchester)

DESCRIPTIVE STATISTICS. The purpose of statistics is to condense raw data to make it easier to answer specific questions; test hypotheses.

Simple Linear Regression Inference

Association Between Variables

3D Model based Object Class Detection in An Arbitrary View

Transcription:

Lecture 15 Robust Estimation : RANSAC

RECALL: Parameter Estimation: Let s say we have found point matches between two images, and we think they are related by some parametric transformation (e.g. translation; scaled Euclidean; affine). How do we estimate the parameters of that transformation? General Strategy Least-Squares estimation from point correspondences But there are problems with that approach...

Problem : Outliers Loosely speaking, outliers are points that don t fit the model. outlier outlier

Bad Data => Outliers Loosely speaking, outliers are points that don t fit the model. Points that do fit are called inliers outlier inliers outlier

Problem with Outliers Least squares estimation is sensitive to outliers, so that a few outliers can greatly skew the result. Least squares regression with outliers compare Solution: Estimation methods that are robust to outliers.

Outliers aren t the Only Problem Multiple structures can also skew the results. (the fit procedure implicitly assumes there is only one instance of the model in the data).

Robust Estimation View estimation as a two-stage process: Classify data points as outliers or inliers Fit model to inliers while ignoring outliers Example technique: RANSAC (RANdom SAmple Consensus) M. A. Fischler and R. C. Bolles (June 1981). "Random Sample Consensus: A Paradigm for Model Fitting with Applications to Image Analysis and Automated Cartography". Comm. of the ACM 24: 381--395.

Ransac Procedure

Ransac Procedure

Ransac Procedure Count = 4

Ransac Procedure

Ransac Procedure Count = 6

Ransac Procedure

Ransac Procedure Count = 19

Ransac Procedure

Ransac Procedure Count = 13

Ransac Procedure Count = 4 Count = 6 Count = 19 Count = 13

s N d T N s s d d T (Forsyth & Ponce)

How Many Samples to Choose? e = probability that a point is an outlier s = number of points in a sample N = number of samples (we want to compute this) p = desired probability that we get a good sample Solve the following for N: 1 - (1- ( 1 - e ) s ) N = p Where in the world did that come from?.

How Many Samples to Choose? e = probability that a point is an outlier s = number of points in a sample N = number of samples (we want to compute this) p = desired probability that we get a good sample 1 - (1- ( 1 - e ) s ) N = p Probability that choosing one point yields an inlier

How Many Samples to Choose? e = probability that a point is an outlier s = number of points in a sample N = number of samples (we want to compute this) p = desired probability that we get a good sample 1 - (1- ( 1 - e ) s ) N = p Probability of choosing s inliers in a row (sample only contains inliers)

How Many Samples to Choose? e = probability that a point is an outlier s = number of points in a sample N = number of samples (we want to compute this) p = desired probability that we get a good sample 1 - (1- ( 1 - e ) s ) N = p Probability that one or more points in the sample were outliers (sample is contaminated).

How Many Samples to Choose? e = probability that a point is an outlier s = number of points in a sample N = number of samples (we want to compute this) p = desired probability that we get a good sample 1 - (1- ( 1 - e ) s ) N = p Probability that N samples were contaminated.

How Many Samples to Choose? e = probability that a point is an outlier s = number of points in a sample N = number of samples (we want to compute this) p = desired probability that we get a good sample 1 - (1- ( 1 - e ) s ) N = p Probability that at least one sample was not contaminated (at least one sample of s points is composed of only inliers).

How many samples? Choose N so that, with probability p, at least one random sample is free from outliers. e.g. p=0.99 proportion of outliers e s 2 3 4 5 6 7 8 5% 2 3 3 4 4 4 5 10% 3 4 5 6 7 8 9 20% 5 7 9 12 16 20 26 25% 6 9 13 17 24 33 44 30% 7 11 17 26 37 54 78 40% 11 19 34 57 97 163 272 50% 17 35 72 146 293 588 1177

Example: N for the line-fitting problem n = 12 points Minimal sample size s = 2 2 outliers: e = 1/6 => 20% So N = 5 gives us a 99% chance of getting a pure-inlier sample Compared to N = 66 by trying every pair of points from Hartley & Zisserman

Acceptable consensus set? We have seen that we don t have to exhaustively sample subsets of points, we just need to randomly sample N subsets. However, typically, we don t even have to sample N sets! Early termination: terminate when inlier ratio reaches expected ratio of inliers T = ( 1 e) (total number of data points)

RANSAC: Picking Distance Threshold d Usually chosen empirically But when measurement error is known to be Gaussian with mean 0 and variance s 2 : Sum of squared errors follows a χ 2 distribution with m DOF, where m is the DOF of the error measure (the codimension) (dimension + codimension) = dimension of parameter space E.g., m = 1 for line fitting because error is perpendicular distance E.g., m = 2 for point distance Examples for probability p = 0.95 that point is inlier m 1 2 Model Line, fundamental matrix Homography, camera matrix d 2 3.84 s 2 5.99 s 2

After RANSAC RANSAC divides data into inliers and outliers and yields estimate computed from minimal set of inliers with greatest support Improve this initial estimate with Least Squares estimation over all inliers (i.e., standard minimization) Find inliers wrt that L.S. line, and compute L.S. one more time. from Hartley & Zisserman

Practical Example Stabilizing aerial imagery using RANSAC - find corners in two images - hypothesize matches using NCC - do RANSAC to find matches consistent with an affine transformation - take the inlier set found and estimate a full projective transformation (homography)

Stabilization Application Input: two images from an aerial video sequence. Note that the motion of the camera is disturbing

Stabilization Application Step1: extract Harris corners from both frames. We use a small threshold for R because we want LOTS of corners (fodder for our next step, which is matching). Harris corners for first frame Detailed view

Stabilization Application Step2: hypothesize matches. For each corner in image 1, look for matching intensity patch in image2 using NCC. Make sure matching pairs have highest NCC match scores in BOTH directions. best match from 1 to 2 best match from 2 to 1 best match from 1 to 2 mutually compatible! image1 best match from 2 to 1 image2

Step2: hypothesize matches. Stabilization Application yikes! As you can see, a lot of false matches get hypothesized. The job of RANSAC will be to clean this mess up.

Stabilization Application Step3: Use RANSAC to robustly fit best affine transformation to the set of point matches. y 1 transform y 0 0 1 x x x i = a x i + c y i + c y i = d x i + e y i + f How many unknowns? How many point matches are needed?

Stabilization Application Step3: Use RANSAC to robustly fit best affine transformation to the set of point matches. Affine transformation has 6 degrees of freedom. We therefore need 3 point matches [each gives 2 equations] Randomly sample sets of 3 point matches. For each, compute the unique affine transformation they define. How?

Stabilization Application How to compute affine transformation from 3 point matches? Use Least Squares! (renewed life for a nonrobust approach) Then transform all points from image1 to image2 using that computed transformation, and see how many other matches confirm the hypothesis. Repeat N times.

Stabilization Application original point matches labels from RANSAC green: inliers red: outliers

Stabilization Example Step4: Take inlier set labeled by RANSAC, and now use least squares to estimate a projective transformation that aligns the images. (we will discuss this ad nauseum in a later lecture). y y transform 1 0 0 1 x x Projective Transformation

Stabilization Example Step4: estimate projective transformation that aligns the images. Now it is easier for people (and computers) to see the moving objects.

Stabilization Examples

Stabilization Examples original point matches labels from RANSAC green: inliers red: outliers

Stabilization Examples

Stabilization Examples

Stabilization Examples original point matches labels from RANSAC green: inliers red: outliers

Stabilization Examples