Tracking Computer Vision Spring 2018, Lecture 24

Similar documents
Visual Tracking. Image Processing Laboratory Dipartimento di Matematica e Informatica Università degli studi di Catania.

Visual Tracking (1) Tracking of Feature Points and Planar Rigid Objects

Visual Tracking. Antonino Furnari. Image Processing Lab Dipartimento di Matematica e Informatica Università degli Studi di Catania

Computer Vision II Lecture 4

Segmentation Computer Vision Spring 2018, Lecture 27

Visual Tracking (1) Pixel-intensity-based methods

Visual Tracking (1) Feature Point Tracking and Block Matching

Autonomous Navigation for Flying Robots

COMPUTER VISION > OPTICAL FLOW UTRECHT UNIVERSITY RONALD POPPE

Computer Vision II Lecture 4

Matching. Compare region of image to region of image. Today, simplest kind of matching. Intensities similar.

Leow Wee Kheng CS4243 Computer Vision and Pattern Recognition. Motion Tracking. CS4243 Motion Tracking 1

Computer Vision Lecture 20

Two-view geometry Computer Vision Spring 2018, Lecture 10

EE795: Computer Vision and Intelligent Systems

Computer Vision Lecture 20

Nonparametric Clustering of High Dimensional Data

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

Mean Shift Tracking. CS4243 Computer Vision and Pattern Recognition. Leow Wee Kheng

Feature Tracking and Optical Flow

Feature Tracking and Optical Flow

CS201: Computer Vision Introduction to Tracking

Kanade Lucas Tomasi Tracking (KLT tracker)

Image classification Computer Vision Spring 2018, Lecture 18

Robert Collins CSE598G. Robert Collins CSE598G

Computer Vision I. Announcements. Fourier Tansform. Efficient Implementation. Edge and Corner Detection. CSE252A Lecture 13.

Automatic Image Alignment (direct) with a lot of slides stolen from Steve Seitz and Rick Szeliski

Face Tracking : An implementation of the Kanade-Lucas-Tomasi Tracking algorithm

Image processing and features

OPPA European Social Fund Prague & EU: We invest in your future.

Tracking in image sequences

Displacement estimation

Computer Vision I. Announcement. Corners. Edges. Numerical Derivatives f(x) Edge and Corner Detection. CSE252A Lecture 11

ME/CS 132: Introduction to Vision-based Robot Navigation! Low-level Image Processing" Larry Matthies"

Computer Vision Lecture 20

Kanade Lucas Tomasi Tracking (KLT tracker)

Dense Image-based Motion Estimation Algorithms & Optical Flow

Capturing, Modeling, Rendering 3D Structures

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

CS 4495 Computer Vision Motion and Optic Flow

CS664 Lecture #18: Motion

The Lucas & Kanade Algorithm

Peripheral drift illusion

Lecture 16: Computer Vision

Outline 7/2/201011/6/

Edge and corner detection

CS5670: Computer Vision

Geometric camera models and calibration

Motion and Optical Flow. Slides from Ce Liu, Steve Seitz, Larry Zitnick, Ali Farhadi

Comparison between Motion Analysis and Stereo

EE795: Computer Vision and Intelligent Systems

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

Finally: Motion and tracking. Motion 4/20/2011. CS 376 Lecture 24 Motion 1. Video. Uses of motion. Motion parallax. Motion field

Lecture 16: Computer Vision

Last week. Multi-Frame Structure from Motion: Multi-View Stereo. Unknown camera viewpoints

Eppur si muove ( And yet it moves )

Local features: detection and description May 12 th, 2015

Final Exam Study Guide

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

Colorado School of Mines. Computer Vision. Professor William Hoff Dept of Electrical Engineering &Computer Science.

Optical flow and tracking

Coarse-to-fine image registration

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

Image correspondences and structure from motion

Visual motion. Many slides adapted from S. Seitz, R. Szeliski, M. Pollefeys

Local Features: Detection, Description & Matching

EE795: Computer Vision and Intelligent Systems

Towards the completion of assignment 1

Mosaics. Today s Readings

Anno accademico 2006/2007. Davide Migliore

Tracking. Establish where an object is, other aspects of state, using time sequence Biggest problem -- Data Association

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

SE 263 R. Venkatesh Babu. Object Tracking. R. Venkatesh Babu

Computer Vision for HCI. Topics of This Lecture

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

Light transport matrices

Multi-stable Perception. Necker Cube

Dr. Ulas Bagci

Lecture 11: E-M and MeanShift. CAP 5415 Fall 2007

Application questions. Theoretical questions

CPSC 425: Computer Vision

CAP 5415 Computer Vision Fall 2012

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

CS6670: Computer Vision

CS4495 Fall 2014 Computer Vision Problem Set 5: Optic Flow

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

Local Feature Detectors

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

Local features: detection and description. Local invariant features

An Introduction to PDF Estimation and Clustering

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

All images are degraded

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

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

CS4670: Computer Vision

Feature Based Registration - Image Alignment

ECE Digital Image Processing and Introduction to Computer Vision

Prof. Feng Liu. Spring /26/2017

Clustering. Discover groups such that samples within a group are more similar to each other than samples across groups.

VC 11/12 T11 Optical Flow

Transcription:

Tracking http://www.cs.cmu.edu/~16385/ 16-385 Computer Vision Spring 2018, Lecture 24

Course announcements Homework 6 has been posted and is due on April 20 th. - Any questions about the homework? - How many of you have looked at/started/finished homework 6? This week Yannis office hours will be on Wednesday 3-6 pm. - Added an extra hour to make up for change.

Overview of today s lecture KLT tracker. Mean-shift algorithm. Kernel density estimation. Mean-shift tracker. Modern trackers.

Slide credits Most of these slides were adapted from: Kris Kitani (16-385, Spring 2017).

http://iccp2018.ece.cmu.edu/

http://iccp2018.ece.cmu.edu/

http://iccp2018.ece.cmu.edu/

All lectures and talks are free for CMU students! (You only need to pay for registration to attend the free food events.)

All lectures and talks are free for CMU students! (You only need to pay for registration to attend the free food events.) Everything in blue is free!

15-463/15-663/15-862 Computational Photography Learn about this and other unconventional cameras and build some on your own! cameras that take video at the speed of light cameras that measure depth in real time cameras that capture entire focal stacks cameras that see around corners http://graphics.cs.cmu.edu/courses/15-463/ ICCP covers all of these

Kanade-Lucas-Tomasi (KLT) tracker

https://www.youtube.com/watch?v=rwijkecpy0m

Feature-based tracking Up to now, we ve been aligning entire images but we can also track just small image regions too! (sometimes called sparse tracking or sparse alignment) How should we select the small images (features)? How should we track them from frame to frame?

History of the Kanade-Lucas-Tomasi Lucas Kanade (KLT) Tracker An Iterative Image Registration Technique with an Application to Stereo Vision. 1981 Kanade Tomasi Detection and Tracking of Feature Points. 1991 The original KLT algorithm Tomasi Shi Good Features to Track. 1994

Kanade-Lucas-Tomasi How should we track them from frame to frame? Lucas-Kanade Method for aligning (tracking) an image patch How should we select features? Tomasi-Kanade Method for choosing the best feature (image patch) for tracking

What are good features for tracking?

What are good features for tracking? Intuitively, we want to avoid smooth regions and edges. But is there a more is principled way to define good features?

What are good features for tracking? Can be derived from the tracking algorithm

What are good features for tracking? Can be derived from the tracking algorithm A feature is good if it can be tracked well

Recall the Lucas-Kanade image alignment method: error function (SSD) incremental update

Recall the Lucas-Kanade image alignment method: error function (SSD) incremental update linearize

Recall the Lucas-Kanade image alignment method: error function (SSD) incremental update linearize Gradient update

Recall the Lucas-Kanade image alignment method: error function (SSD) incremental update linearize Gradient update Update

Stability of gradient decent iterations depends on

Stability of gradient decent iterations depends on Inverting the Hessian When does the inversion fail?

Stability of gradient decent iterations depends on Inverting the Hessian When does the inversion fail? H is singular. But what does that mean?

Above the noise level both Eigenvalues are large Well-conditioned both Eigenvalues have similar magnitude

Concrete example: Consider translation model Hessian when is this singular? How are the eigenvalues related to image content?

interpreting eigenvalues l 2 l 2 >> l 1 What kind of image patch does each region represent? l 1 >> l 2 l 1

interpreting eigenvalues l 2 horizontal edge l 2 >> l 1 corner l 1 ~ l 2 flat vertical edge l 1 >> l 2 l 1

interpreting eigenvalues l 2 horizontal edge l 2 >> l 1 corner l 1 ~ l 2 flat vertical edge l 1 >> l 2 l 1

What are good features for tracking?

What are good features for tracking? big Eigenvalues means good for tracking

KLT algorithm 1. Find corners satisfying 2. For each corner compute displacement to next frame using the Lucas-Kanade method 3. Store displacement of each corner, update corner position 4. (optional) Add more corner points every M frames using 1 5. Repeat 2 to 3 (4) 6. Returns long trajectories for each corner point

Mean-shift algorithm

Mean Shift Algorithm A mode seeking algorithm Fukunaga & Hostetler (1975)

Mean Shift Algorithm A mode seeking algorithm Fukunaga & Hostetler (1975) Find the region of highest density

Mean Shift Algorithm A mode seeking algorithm Fukunaga & Hostetler (1975) Pick a point

Mean Shift Algorithm A mode seeking algorithm Fukunaga & Hostetler (1975) Draw a window

Mean Shift Algorithm A mode seeking algorithm Fukunaga & Hostetler (1975) Compute the (weighted) mean

Mean Shift Algorithm A mode seeking algorithm Fukunaga & Hostetler (1975) Shift the window

Mean Shift Algorithm A mode seeking algorithm Fukunaga & Hostetler (1975) Compute the mean

Mean Shift Algorithm A mode seeking algorithm Fukunaga & Hostetler (1975) Shift the window

Mean Shift Algorithm A mode seeking algorithm Fukunaga & Hostetler (1975) Compute the mean

Mean Shift Algorithm A mode seeking algorithm Fukunaga & Hostetler (1975) Shift the window

Mean Shift Algorithm A mode seeking algorithm Fukunaga & Hostetler (1975) Compute the mean

Mean Shift Algorithm A mode seeking algorithm Fukunaga & Hostetler (1975) Shift the window

Mean Shift Algorithm A mode seeking algorithm Fukunaga & Hostetler (1975) Compute the mean

Mean Shift Algorithm A mode seeking algorithm Fukunaga & Hostetler (1975) Shift the window

Mean Shift Algorithm A mode seeking algorithm Fukunaga & Hostetler (1975) Compute the mean

Mean Shift Algorithm A mode seeking algorithm Fukunaga & Hostetler (1975) Shift the window

Mean Shift Algorithm A mode seeking algorithm Fukunaga & Hostetler (1975) Compute the mean

Mean Shift Algorithm A mode seeking algorithm Fukunaga & Hostetler (1975) Shift the window

Mean Shift Algorithm A mode seeking algorithm Fukunaga & Hostetler (1975) Compute the mean

Mean Shift Algorithm A mode seeking algorithm Fukunaga & Hostetler (1975) Shift the window To understand the theory behind this we need to understand

Kernel density estimation

To understand the mean shift algorithm Kernel Density Estimation A method to approximate an underlying PDF from samples sum of bumps bumps samples (+) Put bump on every sample to approximate the PDF

Say we have some hidden PDF p(x) 1 2 3 4 5 6 7 8 9 10 probability density function cumulative density function

randomly sample 1 We can draw samples, using the CDF 0

randomly sample 1 0

randomly sample 1 0 samples

Now to estimate the hidden PDF place Gaussian bumps on the samples samples

samples discretized bump

samples

samples

Kernel Density Estimate approximates the original PDF 1 2 3 4 5 6 7 8 9 10 samples

Kernel Density Estimation Approximate the underlying PDF from samples from it For example Gaussian bump aka kernel but there are many types of kernels! Put bump on every sample to approximate the PDF

Kernel Function returns the distance between two points

Epanechnikov kernel Uniform kernel Normal kernel These are all radially symmetric kernels

Radially symmetric kernels can be written in terms of its profile profile

Connecting KDE and the Mean Shift Algorithm

Mean-Shift Tracking Given a set of points: and a kernel: Find the mean sample point:

Mean-Shift Algorithm Initialize While place we start shift values becomes really small 1. Compute mean-shift compute the mean compute the shift 2. Update update the point Where does this algorithm come from?

Mean-Shift Algorithm Initialize While 1. Compute mean-shift Where does this come from? 2. Update Where does this algorithm come from?

How is the KDE related to the mean shift algorithm? Recall: Kernel density estimate (radially symmetric kernels) can compute probability for any point using the KDE! We can show that: Gradient of the PDF is related to the mean shift vector The mean shift vector is a step in the direction of the gradient of the KDE mean-shift algorithm is maximizing the objective function

In mean-shift tracking, we are trying to find this which means we are trying to

We are trying to optimize this: find the solution that has the highest probability usually non-linear non-parametric How do we optimize this non-linear function?

We are trying to optimize this: usually non-linear non-parametric How do we optimize this non-linear function? compute partial derivatives gradient descent!

Compute the gradient

Gradient Expand the gradient (algebra)

Gradient Expand gradient

Gradient Expand gradient Call the gradient of the kernel function g

Gradient Expand gradient change of notation (kernel-shadow pairs) keep this in memory:

multiply it out too long! (use short hand notation)

multiply by one! collecting like terms What s happening here?

mean shift constant mean shift! The mean shift is a step in the direction of the gradient of the KDE Let Can interpret this to be gradient ascent with data dependent step size

Mean-Shift Algorithm Initialize While 1. Compute mean-shift gradient with adaptive step size 2. Update Just 5 lines of code!

Everything up to now has been about distributions over samples

Mean-shift tracker

Dealing with images Pixels for a lattice, spatial density is the same everywhere! What can we do?

Consider a set of points: Associated weights: Sample mean: Mean shift:

Initialize While Mean-Shift Algorithm (for images) 1. Compute mean-shift 2. Update

For images, each pixel is point with a weight

For images, each pixel is point with a weight

For images, each pixel is point with a weight

For images, each pixel is point with a weight

For images, each pixel is point with a weight

For images, each pixel is point with a weight

For images, each pixel is point with a weight

For images, each pixel is point with a weight

For images, each pixel is point with a weight

For images, each pixel is point with a weight

For images, each pixel is point with a weight

For images, each pixel is point with a weight

For images, each pixel is point with a weight

For images, each pixel is point with a weight

Finally mean shift tracking in video!

Goal: find the best candidate location in frame 2 center coordinate of target center coordinate of candidate target candidate there are many candidates but only one target Frame 1 Frame 2 Use the mean shift algorithm to find the best candidate location

Non-rigid object tracking hand tracking

Compute a descriptor for the target Target

Search for similar descriptor in neighborhood in next frame Target Candidate

Compute a descriptor for the new target Target

Search for similar descriptor in neighborhood in next frame Target Candidate

How do we model the target and candidate regions?

Modeling the target M-dimensional target descriptor (centered at target center) a fancy (confusing) way to write a weighted histogram Normalization factor function of inverse distance (weight) quantization function bin ID A normalized color histogram (weighted by distance) sum over all pixels Kronecker delta function

Modeling the candidate M-dimensional candidate descriptor (centered at location y) a weighted histogram at y bandwidth

Similarity between the target and candidate Distance function Bhattacharyya Coefficient Just the Cosine distance between two unit vectors

Now we can compute the similarity between a target and multiple candidate regions

target image similarity over image

target we want to find this peak image similarity over image

Objective function same as Assuming a good initial guess Linearize around the initial guess (Taylor series expansion) function at specified value derivative

Linearized objective Remember definition of this? Fully expanded

Fully expanded linearized objective Moving terms around Does not depend on unknown y Weighted kernel density estimate where Weight is bigger when

OK, why are we doing all this math?

We want to maximize this

We want to maximize this Fully expanded linearized objective where

We want to maximize this Fully expanded linearized objective doesn t depend on unknown y where

We want to maximize this Fully expanded linearized objective only need to maximize this! doesn t depend on unknown y where

We want to maximize this Fully expanded linearized objective doesn t depend on unknown y where Mean Shift Algorithm! what can we use to solve this weighted KDE?

the new sample of mean of this KDE is (new candidate location) (this was derived earlier)

Mean-Shift Object Tracking For each frame: 1. Initialize location Compute Compute 2. Derive weights 3. Shift to new candidate location (mean shift) 4. Compute 5. If return Otherwise and go back to 2

Compute a descriptor for the target Target

Search for similar descriptor in neighborhood in next frame Target Candidate

Compute a descriptor for the new target Target

Search for similar descriptor in neighborhood in next frame Target Candidate

Modern trackers

Basic reading: Szeliski, Sections 4.1.4, 5.3. References