CS4670: Computer Vision Kavita Bala Lecture 10: Feature Matching and Transforms.

Slides:



Advertisements
Similar presentations
Distinctive Image Features from Scale-Invariant Keypoints
Advertisements

Object Recognition from Local Scale-Invariant Features David G. Lowe Presented by Ashley L. Kapron.
The SIFT (Scale Invariant Feature Transform) Detector and Descriptor
TP14 - Local features: detection and description Computer Vision, FCUP, 2014 Miguel Coimbra Slides by Prof. Kristen Grauman.
Instructor: Mircea Nicolescu Lecture 15 CS 485 / 685 Computer Vision.
Object Recognition with Invariant Features n Definition: Identify objects or scenes and determine their pose and model parameters n Applications l Industrial.
Patch Descriptors CSE P 576 Larry Zitnick
Lecture 11: Transformations CS4670/5760: Computer Vision Kavita Bala.
Feature extraction: Corners 9300 Harris Corners Pkwy, Charlotte, NC.
Image Warping : Computational Photography Alexei Efros, CMU, Fall 2006 Some slides from Steve Seitz
Lecture 6: Feature matching CS4670: Computer Vision Noah Snavely.
Affine Linear Transformations Prof. Graeme Bailey (notes modified from Noah Snavely, Spring 2009)
Lecture 8: Geometric transformations CS4670: Computer Vision Noah Snavely.
Image Warping : Computational Photography Alexei Efros, CMU, Fall 2008 Some slides from Steve Seitz
Image Warping : Computational Photography Alexei Efros, CMU, Fall 2005 Some slides from Steve Seitz
Lecture 4: Feature matching
Lecture 6: Image transformations and alignment CS6670: Computer Vision Noah Snavely.
Feature extraction: Corners and blobs
Feature-based object recognition Prof. Noah Snavely CS1114
Scale Invariant Feature Transform (SIFT)
Lecture 6: Image Warping and Projection CS6670: Computer Vision Noah Snavely.
Detecting Patterns So far Specific patterns (eyes) Generally useful patterns (edges) Also (new) “Interesting” distinctive patterns ( No specific pattern:
Lecture 3a: Feature detection and matching CS6670: Computer Vision Noah Snavely.
CS4670: Computer Vision Kavita Bala Lecture 8: Scale invariance.
Lecture 6: Feature matching and alignment CS4670: Computer Vision Noah Snavely.
Scale-Invariant Feature Transform (SIFT) Jinxiang Chai.
Image warping/morphing Digital Video Special Effects Fall /10/17 with slides by Y.Y. Chuang,Richard Szeliski, Steve Seitz and Alexei Efros.
Image Warping Computational Photography Derek Hoiem, University of Illinois 09/27/11 Many slides from Alyosha Efros + Steve Seitz Photo by Sean Carroll.
CSE 185 Introduction to Computer Vision
Computer vision.
Object Tracking/Recognition using Invariant Local Features Applications l Mobile robots, driver assistance l Cell phone location or object recognition.
Lecture 4: Feature matching CS4670 / 5670: Computer Vision Noah Snavely.
CSCE 643 Computer Vision: Extractions of Image Features Jinxiang Chai.
Feature extraction: Corners 9300 Harris Corners Pkwy, Charlotte, NC.
Lecture 7: Features Part 2 CS4670/5670: Computer Vision Noah Snavely.
Lecture 8: Feature matching CS6670: Computer Vision Noah Snavely.
Feature extraction: Corners and blobs. Why extract features? Motivation: panorama stitching We have two images – how do we combine them?
Project 3 questions? Interest Points and Instance Recognition Computer Vision CS 143, Brown James Hays 10/21/11 Many slides from Kristen Grauman and.
Lecture 5: Image Interpolation and Features
Local features: detection and description
CS654: Digital Image Analysis
776 Computer Vision Jan-Michael Frahm Spring 2012.
Recap from Monday DCT and JPEG Point Processing Histogram Normalization Questions: JPEG compression levels Gamma correction.
Image Warping Many slides from Alyosha Efros + Steve Seitz + Derek oeim Photo by Sean Carroll.
Image matching by Diva SianDiva Sian by swashfordswashford TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AAAAAA.
Announcements Project 1 Out today Help session at the end of class.
CS559: Computer Graphics Lecture 7: Image Warping and Morphing Li Zhang Spring 2010 Most slides borrowed from Yungyu ChuangYungyu Chuang.
Lecture 14: Feature matching and Transforms CS4670/5670: Computer Vision Kavita Bala.
Lecture 15: Transforms and Alignment CS4670/5670: Computer Vision Kavita Bala.
Image Warping 2D Geometric Transformations
Blob detection.
776 Computer Vision Jan-Michael Frahm Spring 2012.
CS262: Computer Vision Lect 09: SIFT Descriptors
Lecture 13: Feature Descriptors and Matching
Lecture 07 13/12/2011 Shai Avidan הבהרה: החומר המחייב הוא החומר הנלמד בכיתה ולא זה המופיע / לא מופיע במצגת.
Project 1: hybrid images
Image Features: Points and Regions
TP12 - Local features: detection and description
Scale and interest point descriptors
Local features: detection and description May 11th, 2017
Feature description and matching
Features Readings All is Vanity, by C. Allan Gilbert,
Recap from Friday Image Completion Synthesis Order Graph Cut Scene Completion.
Announcements Project 1 Project 2 (panoramas)
The SIFT (Scale Invariant Feature Transform) Detector and Descriptor
Announcement Project 1 1.
Lecture VI: Corner and Blob Detection
Feature descriptors and matching
Presented by Xu Miao April 20, 2005
Lecture 6: Feature matching
Presentation transcript:

CS4670: Computer Vision Kavita Bala Lecture 10: Feature Matching and Transforms

Announcements HW 1 – Some clarifications will be posted (check FAQ on piazza) HW 1 will be due a bit later (prob Fri) In class review: Fri Feb 27 Prelim: Mar

Feature descriptors We know how to detect good points Next question: How to match them? Answer: Come up with a descriptor for each point, find similar descriptors between the two images ??

Basic idea: Take 16x16 square window around detected feature Compute gradient orientation for each pixel Throw out weak edges (threshold gradient magnitude) Create histogram of surviving edge orientations Scale Invariant Feature Transform Adapted from slide by David Lowe 0 22 angle histogram

SIFT vector formation Computed on rotated and scaled version of window according to computed orientation & scale – resample the window Based on gradients weighted by a Gaussian of variance 1.5 times the window (for smooth falloff)

SIFT vector formation 4x4 array of gradient orientation histogram weighted by magnitude 8 orientations x 4x4 array = 128 dimensions Motivation: some sensitivity to spatial layout, but not too much showing only 2x2 here but is 4x4

Ensure smoothness Gaussian weight Trilinear interpolation – a given gradient contributes to 8 bins: 4 in space times 2 in orientation

Reduce effect of illumination 128-dim vector normalized to 1 Threshold gradient magnitudes to avoid excessive influence of high gradients – after normalization, clamp gradients >0.2 – renormalize

Properties of SIFT Extraordinarily robust matching technique – Can handle changes in viewpoint Up to about 60 degree out of plane rotation – Can handle significant changes in illumination Sometimes even day vs. night (below) – Fast and efficient—can run in real time – Lots of code available: ementations_of_SIFT ementations_of_SIFT

Summary Keypoint detection: repeatable and distinctive – Corners, blobs, stable regions – Harris, DoG Descriptors: robust and selective – spatial histograms of orientation – SIFT and variants are typically good for stitching and recognition – But, need not stick to one

Which features match?

Feature matching Given a feature in I 1, how to find the best match in I 2 ? 1.Define distance function that compares two descriptors 2.Test all the features in I 2, find the one with min distance

Feature distance How to define the difference between two features f 1, f 2 ? – Simple approach: L 2 distance, ||f 1 - f 2 || – can give good scores to ambiguous (incorrect) matches I1I1 I2I2 f1f1 f2f2

f1f1 f2f2 f2'f2' Feature distance How to define the difference between two features f 1, f 2 ? Better approach: ratio distance = ||f 1 - f 2 || / || f 1 - f 2 ’ || f 2 is best SSD match to f 1 in I 2 f 2 ’ is 2 nd best SSD match to f 1 in I 2 gives bad scores for ambiguous matches I1I1 I2I2

Evaluating the results How can we measure the performance of a feature matcher? feature distance

True/false positives The distance threshold affects performance – True positives = # of detected matches that are correct Suppose we want to maximize these—how to choose threshold? – False positives = # of detected matches that are incorrect Suppose we want to minimize these—how to choose threshold? false match true match feature distance How can we measure the performance of a feature matcher?

"Precisionrecall" by Walber - Own work. Licensed under CC BY-SA 4.0 via Wikimedia Commons - ionrecall.svg

Confusion Matrix

Precision vs. Recall Examples 1000 animals, 100 dogs Algorithm finds 50 (of which 40 are dogs, 10 are cats) Precision = Recall = Algorithm finds 10 (of which 10 are dogs) Precision = Recall = Algorithm returns 1000 (of which 100 are dogs) Precision = Recall =

0.7 Evaluating the results false positive rate # true positives # matching features (positives) 0.1 How can we measure the performance of a feature matcher? “recall” # false positives # unmatched features (negatives)

0.7 Evaluating the results false positive rate # true positives # matching features (positives) 0.1 # false positives # unmatched features (negatives) ROC curve (“Receiver Operator Characteristic”) How can we measure the performance of a feature matcher? “recall” AUC (area under curve)

More on feature detection/description

Lots of applications Features are used for: – Image alignment (e.g., mosaics) – 3D reconstruction – Motion tracking – Object recognition – Indexing and database retrieval – Robot navigation – … other

3D Reconstruction Internet Photos (“Colosseum”) Reconstructed 3D cameras and points

Object recognition (David Lowe)

Sony Aibo SIFT usage: Recognize charging station Communicate with visual cards Teach object recognition

Available at a web site near you… For most local feature detectors, executables are available online: – – – K. Grauman, B. Leibe

Questions?

Image alignment

What is the geometric relationship between these two images? ? Answer: Similarity transformation (translation, rotation, uniform scale)

What is the geometric relationship between these two images? ?

Very important for creating mosaics!

Richard SzeliskiImage Stitching35 Image Warping image filtering: change range of image g(x) = h(f(x)) image warping: change domain of image g(x) = f(h(x)) f x h g x f x h g x

Richard SzeliskiImage Stitching36 Image Warping image filtering: change range of image g(x) = h(f(x)) image warping: change domain of image g(x) = f(h(x)) hh f f g g

Richard SzeliskiImage Stitching37 Parametric (global) warping Examples of parametric warps: translation rotation aspect

Parametric (global) warping Transformation T is a coordinate-changing machine: p’ = T(p) What does it mean that T is global? – Is the same for any point p – can be described by just a few numbers (parameters) Let’s consider linear xforms (can be represented by a 2D matrix): T p = (x,y)p’ = (x’,y’)

Common linear transformations Uniform scaling by s: (0,0) What is the inverse?

Common linear transformations Rotation by angle θ (about the origin) (0,0) What is the inverse? For rotations: θ

2x2 Matrices What types of transformations can be represented with a 2x2 matrix? 2D mirror about Y axis? 2D mirror across line y = x?

What types of transformations can be represented with a 2x2 matrix? 2D Translation? Translation is not a linear operation on 2D coordinates NO! 2x2 Matrices

All 2D Linear Transformations Linear transformations are combinations of … – Scale, – Rotation, – Shear, and – Mirror Properties of linear transformations: – Origin maps to origin – Lines map to lines – Parallel lines remain parallel – Ratios are preserved – Closed under composition

Homogeneous coordinates Trick: add one more coordinate: homogeneous image coordinates Converting from homogeneous coordinates x y w (x, y, w) w = 1 (x/w, y/w, 1) homogeneous plane

Translation Solution: homogeneous coordinates to the rescue

Affine transformations any transformation with last row [ ] we call an affine transformation

Basic affine transformations Translate 2D in-plane rotationShear Scale

Affine Transformations Affine transformations are combinations of … – Linear transformations, and – Translations Properties of affine transformations: – Origin does not necessarily map to origin – Lines map to lines – Parallel lines remain parallel – Ratios are preserved – Closed under composition

Is this an affine transformation?