Robust fitting Prof. Noah Snavely CS1114

Slides:



Advertisements
Similar presentations
Summary of Friday A homography transforms one 3d plane to another 3d plane, under perspective projections. Those planes can be camera imaging planes or.
Advertisements

Robot Vision SS 2005 Matthias Rüther 1 ROBOT VISION Lesson 3: Projective Geometry Matthias Rüther Slides courtesy of Marc Pollefeys Department of Computer.
Polygons and the convex hull Prof. Noah Snavely CS1114
Image alignment Image from
Multiple View Geometry
Lecture 6: Feature matching CS4670: Computer Vision Noah Snavely.
Affine Linear Transformations Prof. Graeme Bailey (notes modified from Noah Snavely, Spring 2009)
Object Recognition with Invariant Features n Definition: Identify objects or scenes and determine their pose and model parameters n Applications l Industrial.
Image transformations, Part 2 Prof. Noah Snavely CS1114
Geometric Optimization Problems in Computer Vision.
Lecture 10: Cameras CS4670: Computer Vision Noah Snavely Source: S. Lazebnik.
Feature-based object recognition Prof. Noah Snavely CS1114
Fitting a Model to Data Reading: 15.1,
Lecture 8: Image Alignment and RANSAC
Automatic Image Alignment (feature-based) : Computational Photography Alexei Efros, CMU, Fall 2006 with a lot of slides stolen from Steve Seitz and.
Lecture 10: Robust fitting CS4670: Computer Vision Noah Snavely.
Computing transformations Prof. Noah Snavely CS1114
כמה מהתעשייה? מבנה הקורס השתנה Computer vision.
Automatic Camera Calibration
Image Stitching Ali Farhadi CSE 455
CSE 185 Introduction to Computer Vision
Chapter 6 Feature-based alignment Advanced Computer Vision.
CSC 589 Lecture 22 Image Alignment and least square methods Bei Xiao American University April 13.
Computer Vision - Fitting and Alignment
Advanced Computer Vision Feature-based Alignment Lecturer: Lu Yi & Prof. Fuh CSIE NTU.
IMAGE MOSAICING Summer School on Document Image Processing
Image stitching Digital Visual Effects Yung-Yu Chuang with slides by Richard Szeliski, Steve Seitz, Matthew Brown and Vaclav Hlavac.
Example: line fitting. n=2 Model fitting Measure distances.
CSCE 643 Computer Vision: Structure from Motion
Computer Vision : CISC 4/689 Going Back a little Cameras.ppt.
EECS 274 Computer Vision Model Fitting. Fitting Choose a parametric object/some objects to represent a set of points Three main questions: –what object.
Geometric Transformations
Computer Vision - Fitting and Alignment (Slides borrowed from various presentations)
Fitting image transformations Prof. Noah Snavely CS1114
CSE 185 Introduction to Computer Vision Feature Matching.
776 Computer Vision Jan-Michael Frahm Spring 2012.
Robust Estimation Course web page: vision.cis.udel.edu/~cv April 23, 2003  Lecture 25.
Fitting.
Optimization and least squares Prof. Noah Snavely CS1114
CSCI 631 – Foundations of Computer Vision March 15, 2016 Ashwini Imran Image Stitching.
EE 7730 Parametric Motion Estimation. Bahadir K. Gunturk2 Parametric (Global) Motion Affine Flow.
Invariant Local Features Image content is transformed into local feature coordinates that are invariant to translation, rotation, scale, and other imaging.
SIFT.
Recognizing objects Prof. Noah Snavely CS1114
776 Computer Vision Jan-Michael Frahm Spring 2012.
SIFT Scale-Invariant Feature Transform David Lowe
University of Ioannina
Fitting a transformation: feature-based alignment
Nearest-neighbor matching to feature database
Lecture 7: Image alignment
Feature description and matching
A special case of calibration
Image Stitching Slides from Rick Szeliski, Steve Seitz, Derek Hoiem, Ira Kemelmacher, Ali Farhadi.
Features Readings All is Vanity, by C. Allan Gilbert,
Object recognition Prof. Graeme Bailey
Nearest-neighbor matching to feature database
More Image Manipulation
SIFT.
Lecture 8: Image alignment
CENG 789 – Digital Geometry Processing 11- Least-Squares Solutions
Lecture 8: Image alignment
CSE 185 Introduction to Computer Vision
Feature descriptors and matching
Calibration and homographies
Back to equations of geometric transformations
CS5760: Computer Vision Lecture 9: RANSAC Noah Snavely
CS5760: Computer Vision Lecture 9: RANSAC Noah Snavely
Image Stitching Linda Shapiro ECE/CSE 576.
Lecture 11: Image alignment, Part 2
Image Stitching Linda Shapiro ECE P 596.
Presentation transcript:

Robust fitting Prof. Noah Snavely CS1114

Administrivia  A4 due on Friday (please sign up for demo slots)  A5 will be out soon  Prelim 2 is coming up, Tuesday, 4/10 2

Roadmap  What’s left (next 6.5 weeks): –2 assignments (A5, A6) –1 final project –3 quizzes –2 prelims 3

Tricks with convex hull  What else can we do with convex hull?  Answer: sort!  Given a list of numbers (x 1, x 2, … x n ), create a list of 2D points: (x 1, x 1 2 ), (x 2, x 2 2 ), … (x n, x n 2 )  Find the convex hull of these points – the points will be in sorted order  What does this tell us about the running time of convex hull? 4

Tricks with convex hull  This is called a reduction from sorting to convex hull 5

Next couple weeks  How do we detect an object in an image?  Combines ideas from image transformations, least squares, and robustness 6

Invariant local features  Find features that are invariant to transformations –geometric invariance: translation, rotation, scale –photometric invariance: brightness, exposure, … Feature Descriptors (Slides courtesy Steve Seitz)

Object matching in three steps 1.Detect features in the template and search images 2.Match features: find “similar-looking” features in the two images 3.Find a transformation T that explains the movement of the matched features 8 sift

Image transformations 9

2D Linear Transformations  Can be represented with a 2D matrix  And applied to a point using matrix multiplication 10

Image transformations  Rotation is around the point (0, 0) – the upper-left corner of the image 11  This isn’t really what we want…

Translation  We really want to rotate around the center of the image  Approach: move the center of the image to the origin, rotate, then the center back  (Moving an image is called “translation”)  But translation isn’t linear… 12

Homogeneous coordinates  Add a 1 to the end of our 2D points (x, y)  (x, y, 1)  “Homogeneous” 2D points  We can represent transformations on 2D homogeneous coordinates as 3D matrices 13

Translation 14  Other transformations just add an extra row and column with [ ] scale rotation

Correct rotation  Translate center to origin  Rotate  Translate back to center 15

Affine transformations  A 2D affine transformation has the form:  Can be thought of as a 2x2 linear transformation plus translation  This will come up again soon in object detection… 16

Fitting affine transformations  We will fit an affine transformation to a set of feature matches –Problem: there are many incorrect matches 17

Back to fitting  Simple case: fitting a line 18

Linear regression  But what happens here? 19 How do we fix this?

20 Least squares fitting This objective function measures the “goodness” of a hypothesized line

Beyond least squares  We need to change our objective function  Needs to be robust to outliers 21

Beyond least squares  Idea: count the number of points that are “close” to the line 22

Testing goodness  Idea: count the number of points that are “close” to the line 23

Testing goodness  Idea: count the number of points that are “close” to the line 24 Score = 2

Testing goodness  Idea: count the number of points that are “close” to the line 25

Testing goodness  Idea: count the number of points that are “close” to the line 26 Score = 3

Testing goodness  Idea: count the number of points that are “close” to the line 27

Testing goodness  Idea: count the number of points that are “close” to the line 28 Score = 7

Testing goodness  How can we tell if a point agrees with a line?  Compute the distance the point and the line, and threshold 29

Testing goodness  If the distance is small, we call this point an inlier to the line  If the distance is large, it’s an outlier to the line  For an inlier point and a good line, this distance will be close to (but not exactly) zero  For an outlier point or bad line, this distance will probably be large  Objective function: find the line with the most inliers (or the fewest outliers) 30

Optimizing for inlier count  How do we find the best possible line? 31 Score = 7

Algorithm (RANSAC) 1.Select two points at random 2.Solve for the line between those point 3.Count the number of inliers to the line L 4.If L has the highest number of inliers so far, save it 5.Repeat for N rounds, return the best L 32

Testing goodness  This algorithm is called RANSAC (RANdom SAmple Consensus) – example of a randomized algorithm  Used in an amazing number of computer vision algorithms  Requires two parameters: –The agreement threshold (how close does an inlier have to be?) –The number of rounds (how many do we need?) 33

Questions? 34

Next time 35