Feature descriptors. Alain Pagani Prof. Didier Stricker. Computer Vision: Object and People Tracking

Similar documents
2D Image Processing Feature Descriptors

Category vs. instance recognition

Local Features: Detection, Description & Matching

CS4670: Computer Vision

Object Detection Design challenges

Templates and Background Subtraction. Prof. D. Stricker Doz. G. Bleser

CS 4495 Computer Vision A. Bobick. CS 4495 Computer Vision. Features 2 SIFT descriptor. Aaron Bobick School of Interactive Computing

Feature descriptors and matching

Object Category Detection: Sliding Windows

Object Category Detection. Slides mostly from Derek Hoiem

SIFT: SCALE INVARIANT FEATURE TRANSFORM SURF: SPEEDED UP ROBUST FEATURES BASHAR ALSADIK EOS DEPT. TOPMAP M13 3D GEOINFORMATION FROM IMAGES 2014

Harder case. Image matching. Even harder case. Harder still? by Diva Sian. by swashford

CAP 5415 Computer Vision Fall 2012


Motion Estimation and Optical Flow Tracking

SURF. Lecture6: SURF and HOG. Integral Image. Feature Evaluation with Integral Image

Image Features. Work on project 1. All is Vanity, by C. Allan Gilbert,

SCALE INVARIANT FEATURE TRANSFORM (SIFT)

Local invariant features

Image matching. Announcements. Harder case. Even harder case. Project 1 Out today Help session at the end of class. by Diva Sian.

Harder case. Image matching. Even harder case. Harder still? by Diva Sian. by swashford

Lecture 10 Detectors and descriptors

Feature Descriptors. CS 510 Lecture #21 April 29 th, 2013

CEE598 - Visual Sensing for Civil Infrastructure Eng. & Mgmt.

Scale Invariant Feature Transform

Scale Invariant Feature Transform

The SIFT (Scale Invariant Feature

Local Patch Descriptors

Local features: detection and description. Local invariant features

SUMMARY: DISTINCTIVE IMAGE FEATURES FROM SCALE- INVARIANT KEYPOINTS

Computer Vision for HCI. Topics of This Lecture

Outline 7/2/201011/6/

Introduction. Introduction. Related Research. SIFT method. SIFT method. Distinctive Image Features from Scale-Invariant. Scale.

Building a Panorama. Matching features. Matching with Features. How do we build a panorama? Computational Photography, 6.882

Human detection using histogram of oriented gradients. Srikumar Ramalingam School of Computing University of Utah

HISTOGRAMS OF ORIENTATIO N GRADIENTS

Feature Detection. Raul Queiroz Feitosa. 3/30/2017 Feature Detection 1

Key properties of local features

Feature Based Registration - Image Alignment

SIFT - scale-invariant feature transform Konrad Schindler

Local features and image matching. Prof. Xin Yang HUST

Ulas Bagci

Local features: detection and description May 12 th, 2015

Local Image Features

Midterm Wed. Local features: detection and description. Today. Last time. Local features: main components. Goal: interest operator repeatability

Bias-Variance Trade-off (cont d) + Image Representations

Modern Object Detection. Most slides from Ali Farhadi

Edge and corner detection

EE368 Project Report CD Cover Recognition Using Modified SIFT Algorithm

Local Features Tutorial: Nov. 8, 04

BSB663 Image Processing Pinar Duygulu. Slides are adapted from Selim Aksoy

Augmented Reality VU. Computer Vision 3D Registration (2) Prof. Vincent Lepetit

Beyond Bags of features Spatial information & Shape models

Object Recognition with Invariant Features

Patch Descriptors. CSE 455 Linda Shapiro

EECS150 - Digital Design Lecture 14 FIFO 2 and SIFT. Recap and Outline

Local Image Features

School of Computing University of Utah

Motion illusion, rotating snakes

Lecture 4.1 Feature descriptors. Trym Vegard Haavardsholm

Features Points. Andrea Torsello DAIS Università Ca Foscari via Torino 155, Mestre (VE)

An Implementation on Histogram of Oriented Gradients for Human Detection

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

Discriminative classifiers for image recognition

Local Feature Detectors

Deformable Part Models

Histogram of Oriented Gradients for Human Detection

Computer Vision. Recap: Smoothing with a Gaussian. Recap: Effect of σ on derivatives. Computer Science Tripos Part II. Dr Christopher Town

Histograms of Oriented Gradients

Computational Optical Imaging - Optique Numerique. -- Multiple View Geometry and Stereo --

Obtaining Feature Correspondences

Patch Descriptors. EE/CSE 576 Linda Shapiro

Object Recognition II

Local Image Features

Anno accademico 2006/2007. Davide Migliore

A Novel Extreme Point Selection Algorithm in SIFT

Window based detectors

Advanced Video Content Analysis and Video Compression (5LSH0), Module 4

Prof. Feng Liu. Spring /26/2017

EE795: Computer Vision and Intelligent Systems

Feature Detectors and Descriptors: Corners, Lines, etc.

CS4495/6495 Introduction to Computer Vision. 8C-L1 Classification: Discriminative models

The bits the whirl-wind left out..

CS 558: Computer Vision 4 th Set of Notes

AK Computer Vision Feature Point Detectors and Descriptors

Feature Matching and Robust Fitting

Evaluation and comparison of interest points/regions

Image Matching. AKA: Image registration, the correspondence problem, Tracking,

Chapter 3 Image Registration. Chapter 3 Image Registration

Coarse-to-fine image registration

Scale Invariant Feature Transform by David Lowe

Implementing the Scale Invariant Feature Transform(SIFT) Method

Comparison of Feature Detection and Matching Approaches: SIFT and SURF

Local Image preprocessing (cont d)

Scale Invariant Feature Transform (SIFT) CS 763 Ajit Rajwade

Edge and Texture. CS 554 Computer Vision Pinar Duygulu Bilkent University

Automatic Image Alignment (feature-based)

Mobile Human Detection Systems based on Sliding Windows Approach-A Review

CSE 252B: Computer Vision II

convolution shift invariant linear system Fourier Transform Aliasing and sampling scale representation edge detection corner detection

Transcription:

Feature descriptors Alain Pagani Prof. Didier Stricker Computer Vision: Object and People Tracking 1

Overview Previous lectures: Feature extraction Today: Gradiant/edge Points (Kanade-Tomasi + Harris) Blob (incl. scale) Feature Descriptors Why? Point matching Region and image matching 2

Matching with Features Problem: For each point correctly recognize the corresponding one? We need a reliable and distinctive descriptor 3

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

Feature descriptors We know how to detect good points Next question: How to match them?? Lots of possibilities (this is a popular research area) Simple option: match square windows around the point State of the art approach: SIFT David Lowe, UBC http://www.cs.ubc.ca/~lowe/keypoints/

Invariance vs. discriminability Invariance: Descriptor shouldn t change even if image is transformed Discriminability: Descriptor should be highly unique for each point

Image transformations Geometric Rotation Scale Affine Photometric Intensity change

Invariance Most feature descriptors are designed to be invariant to Translation, 2D rotation, scale They can usually also handle Limited 3D rotations (SIFT works up to about 60 degrees) Limited affine transformations (some are fully affine invariant) Limited illumination/contrast changes

How to achieve invariance Need both of the following: 1. Make sure your detector is invariant 2. Design an invariant feature descriptor Simplest descriptor: a single pixel value What s this invariant to? Is this unique? Next simplest descriptor: a square window of pixels Is this unique? What s this invariant to? Let s look at some better approaches

Comparing two patches L1- Sum of Absolute Differences (SAD) L2 - Sum Square difference Cross-Correlation 10

Common window-based approaches Sum of Absolute Differences (SAD) L1 norm Sum of Squared Differences (SSD) L2 norm 5/19/2014 Lecture 3D Computer Vision 11

Common window-based approaches Normalized Cross-Correlation (NCC) Zero-Mean Normalized Cross-Correlation (ZNCC) 5/19/2014 Lecture 3D Computer Vision 12

Recall NCC write regions as vectors region A region B a b vector a vector b 5/19/2014 Lecture 3D Computer Vision 13

Cross-Correlation Affine photometric transformation: I a I + b Output in range +1-1 Not invariant to changes in a,b 14

(Zero Mean) Normalized Cross-Correlation Make each patch zero mean: Affine photometric transformation: I a I + b Then make unit variance: 15

Example with NCC epipolar line 5/19/2014 Lecture 3D Computer Vision 16

Example with NCC left image band right image band 1 0.5 cross correlation 0 5/19/2014 Lecture 3D Computer Vision 17 x

Example with NCC target region left image band right image band 1 0.5 cross correlation 0 Why is it not as good as before? 5/19/2014 Lecture 3D Computer Vision 18 x

SIFT Scale Invariant Feature Transform 19

Orientation assignment: Scale Invariant Feature Transform Basic idea: Take 16x16 square window around detected feature Compute edge orientation for each pixel Throw out weak edges (threshold gradient magnitude) Create histogram of surviving edge orientations David Lowe IJCV 2004 0 2 angle histogram This figure shows just 8x8 of the 16x16 squares Adapted from slide by David Lowe 20

Orientation Assignment Create histogram of gradient directions, within a region around the keypoint, at selected scale: 36 bins (i.e., 10 o per bin) 0 2 Histogram entries are weighted by (i) gradient magnitude and (ii) a Gaussian function with σ equal to 1.5 times the scale of the keypoint. 21

Orientation assignment 22

Orientation assignment 23

Orientation assignment 24

Orientation assignment σ=1.5*scale of the keypoint 25

Orientation assignment 26

Orientation assignment Note: accurate peak position is determined by fitting 27

Orientation assignment 28

4. Keypoint Descriptor 8 bins 29

4. Keypoint Descriptor (cont d) 1. Take a 16 x16 window around detected interest point. (8 bins) 2. Divide into a 4x4 grid of cells. 3. Compute histogram in each cell. 16 histograms x 8 orientations = 128 features 30

4. Keypoint Descriptor (cont d) Each histogram entry is weighted by (i) gradient magnitude and (ii) a Gaussian function with σ equal to 0.5 times the width of the descriptor window. 31

4. Keypoint Descriptor (cont d) Partial Voting: distribute histogram entries into adjacent bins (i.e., additional robustness to shifts) Each entry is added to all bins, multiplied by a weight of 1-d, where d is the distance from the bin it belongs. 32

4. Keypoint Descriptor (cont d) Descriptor depends on two main parameters: (1) number of orientations r (2) n x n array of orientation histograms rn 2 features SIFT: r=8, n=4 128 features 33

4. Keypoint Descriptor (cont d) Invariance to linear illumination changes: Normalization to unit length is sufficient. 128 features 34

4. Keypoint Descriptor (cont d) Non-linear illumination changes: Saturation affects gradient magnitudes more than orientations Threshold entries to be no larger than 0.2 and renormalize to unit length 128 features 35

Robustness to viewpoint changes Match features after random change in image scale and orientation, with 2% image noise, and affine distortion. Find nearest neighbor in database of 30,000 features. Additional robustness can be achieved using affine invariant region detectors. 36

Distinctiveness Vary size of database of features, with 30 degree affine change, 2% image noise. Measure % correct for single nearest neighbor match. 37

Matching SIFT features 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. I 1 I 2 38

Matching SIFT features (cont d) f 1 f 2 I 1 I 2 39

Matching SIFT features (cont d) A better distance measure is the following: SSD(f 1, f 2 ) / SSD(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 f 1 f ' 2 f 2 I 1 I 2 40

Matching SIFT features (cont d) Accept a match if SSD(f 1, f 2 ) / SSD(f 1, f 2 ) < t t=0.8 has given good results in object recognition. 90% of false matches were eliminated. Less than 5% of correct matches were discarded 41

SIFT Steps - Review (1) Scale-space extrema detection Extract scale and rotation invariant interest points (i.e., keypoints). (2) Keypoint localization Determine location and scale for each interest point. Eliminate weak keypoints (3) Orientation assignment Assign one or more orientations to each keypoint. (4) Keypoint descriptor Use local image gradients at the selected scale. D. Lowe, Distinctive Image Features from Scale-Invariant Keypoints, International Journal of Computer Vision, 60(2):91-110, 2004. Cited > 10.000 times 42

SIFT flow 43

Maxima in D 44

Remove low contrast 45

Remove edges 46

SIFT descriptor 47

48

SIFT Scale Invariant Feature Transform 1 Empirically found 2 to show very good performance, invariant to image rotation, scale, intensity change, and to moderate affine transformations Scale = 2.5 Rotation = 45 0 1 D.Lowe. Distinctive Image Features from Scale-Invariant Keypoints. Accepted to IJCV 492004 2 K.Mikolajczyk, C.Schmid. A Performance Evaluation of Local Descriptors. CVPR 2003

Summary 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 50

HOG Histogram of Oriented Gradients 51

52 Slides from Sminchisescu

Window-based models: Building an object model Simple holistic descriptions of image content grayscale / color histogram vector of pixel intensities 53 Kristen Grauman

Window-based models: Building an object model Pixel-based representations sensitive to small shifts Color or grayscale-based appearance description can be sensitive to illumination and intra-class appearance variation 54 Kristen Grauman

Window-based models: Building an object model Consider edges, contours, and (oriented) intensity gradients 55 Kristen Grauman

Window-based models: Building an object model Consider edges, contours, and (oriented) intensity gradients Summarize local distribution of gradients with histogram Locally orderless: offers invariance to small shifts and rotations Contrast-normalization: try to correct for variable illumination 56 Kristen Grauman

Histograms Gradient histograms measure the orientations and strengths of image gradients within an image region Global descriptor for the complete body Very high-dimensional Typically ~4000 dimensions 57

HOG: use in detection, tracking Very promising results on challenging data sets Phases 1. Learning Phase 2. Detection Phase 58

Descriptor 1. Compute gradients on an image region of 64x128 pixels 2. Compute histograms on cells of typically 8x8 pixels (i.e. 8x16 cells) 3. Normalize histograms within overlapping blocks of cells (typically 2x2 cells, i.e. 7x15 blocks) 4. Concatenate histograms 59

Gradients Convolution with [-1 0 1] filters No smoothing Compute gradient magnitude+direction Per pixel: color channel with greatest magnitude -> final gradient 60

Cell histograms 9 bins for gradient orientations (0-180 degrees) Filled with magnitudes Interpolated trilinearly: Bilinearly into spatial cells Linearly into orientation bins 61

Linear and Bilinear interpolation for subsampling Linear: Bilinear: 62

Histogram interpolation example θ=85 degrees Distance to bin centers Bin 70 -> 15 degrees Bin 90 -> 5 degress Ratios: 5/20=1/4, 15/20=3/4 Distance to bin centers Left: 2, Right: 6 Top: 2, Bottom: 6 Ratio Left-Right: 6/8, 2/8 Ratio Top-Bottom: 6/8, 2/8 Ratios: 6/8*6/8 = 36/64 = 9/16 6/8*2/8 = 12/64 = 3/16 2/8*6/8 = 12/64 = 3/16 2/8*2/8 = 4/64 = 1/16 63

Blocks Overlapping blocks of 2x2 cells Cell histograms are concatenated and then normalized Note that each cell several occurrences with different normalization in final descriptor Normalization Different norms possible We add a normalization epsilon to avoid division by zero 64

Blocks Gradient magnitudes are weighted according to a Gaussian spatial window Distant gradients contribute less to the histogram 65

Final Descriptor Concatenation of Blocks Visualization: 66

Linear SVM for pedestrian detection using the HOG descriptor

Slides by Pete Barnum Navneet Dalal and Bill Triggs, Histograms of Oriented Gradients for Human Detection, CVPR05

centered diagonal uncentered cubic-corrected Sobel Slides by Pete Barnum Navneet Dalal and Bill Triggs, Histograms of Oriented Gradients for Human Detection, CVPR05

Histogram of gradient orientations -Orientation Slides by Pete Barnum Navneet Dalal and Bill Triggs, Histograms of Oriented Gradients for Human Detection, CVPR05

8 orientations X= 15x7 cells Slides by Pete Barnum Navneet Dalal and Bill Triggs, Histograms of Oriented Gradients for Human Detection, CVPR05

pedestrian Slides by Pete Barnum Navneet Dalal and Bill Triggs, Histograms of Oriented Gradients for Human Detection, CVPR05

Engineering Developing a feature descriptor requires a lot of engineering Testing of parameters (e.g. size of cells, blocks, number of cells in a block, size of overlap) Normalization schemes (e.g. L1, L2-Norms etc., gamma correction, pixel intensity normalization) An extensive evaluation of different choices was performed, when the descriptor was proposed It s not only the idea, but also the engineering effort 73

Next time: Background detection Thank you! 74