Image Alignment and Mosaicing Feature Tracking and the Kalman Filter.

Slides:



Advertisements
Similar presentations
Real-Time Template Tracking
Advertisements

Mobile Robot Localization and Mapping using the Kalman Filter
Image Registration  Mapping of Evolution. Registration Goals Assume the correspondences are known Find such f() and g() such that the images are best.
Active Shape Models Suppose we have a statistical shape model –Trained from sets of examples How do we use it to interpret new images? Use an “Active Shape.
CSCE 643 Computer Vision: Template Matching, Image Pyramids and Denoising Jinxiang Chai.
Spatial Filtering (Chapter 3)
Uncertainty Representation. Gaussian Distribution variance Standard deviation.
Computer Vision Optical Flow
Motion Tracking. Image Processing and Computer Vision: 82 Introduction Finding how objects have moved in an image sequence Movement in space Movement.
Motion Analysis (contd.) Slides are from RPI Registration Class.
CSci 6971: Image Registration Lecture 4: First Examples January 23, 2004 Prof. Chuck Stewart, RPI Dr. Luis Ibanez, Kitware Prof. Chuck Stewart, RPI Dr.
Announcements Quiz Thursday Quiz Review Tomorrow: AV Williams 4424, 4pm. Practice Quiz handout.
CSCE 641 Computer Graphics: Image Sampling and Reconstruction Jinxiang Chai.
Announcements Project1 artifact reminder counts towards your grade Demos this Thursday, 12-2:30 sign up! Extra office hours this week David (T 12-1, W/F.
Computing motion between images
Kalman Filtering COS 323. On-Line Estimation Have looked at “off-line” model estimation: all data is availableHave looked at “off-line” model estimation:
Lecture 11: Structure from motion CS6670: Computer Vision Noah Snavely.
Optical flow and Tracking CISC 649/849 Spring 2009 University of Delaware.
Kalman Filtering COS 323, Spring 05. Kalman Filtering Assume that results of experiment (i.e., optical flow) are noisy measurements of system stateAssume.
Image Pyramids Pre-filter images to collect information at different scalesPre-filter images to collect information at different scales More efficient.
2D Fourier Theory for Image Analysis Mani Thomas CISC 489/689.
Optical Flow Estimation
Lecture 8: Image Alignment and RANSAC
Lecture 19: Optical flow CS6670: Computer Vision Noah Snavely
Motion Estimation Today’s Readings Trucco & Verri, 8.3 – 8.4 (skip 8.3.3, read only top half of p. 199) Numerical Recipes (Newton-Raphson), 9.4 (first.
Estimation and the Kalman Filter David Johnson. The Mean of a Discrete Distribution “I have more legs than average”
Course AE4-T40 Lecture 5: Control Apllication
Matching Compare region of image to region of image. –We talked about this for stereo. –Important for motion. Epipolar constraint unknown. But motion small.
Tracking with Linear Dynamic Models. Introduction Tracking is the problem of generating an inference about the motion of an object given a sequence of.
Computational Photography: Image Registration Jinxiang Chai.
Optical Flow Digital Photography CSE558, Spring 2003 Richard Szeliski (notes cribbed from P. Anandan)
CSCE 641 Computer Graphics: Image Registration Jinxiang Chai.
Overview and Mathematics Bjoern Griesbach
Optical flow Combination of slides from Rick Szeliski, Steve Seitz, Alyosha Efros and Bill Freeman.
1 Formation et Analyse d’Images Session 7 Daniela Hall 7 November 2005.
Image Representation Gaussian pyramids Laplacian Pyramids
Image Stitching Ali Farhadi CSE 455
Physics 114: Lecture 15 Probability Tests & Linear Fitting Dale E. Gary NJIT Physics Department.
Chapter 15 Modeling of Data. Statistics of Data Mean (or average): Variance: Median: a value x j such that half of the data are bigger than it, and half.
TP15 - Tracking Computer Vision, FCUP, 2013 Miguel Coimbra Slides by Prof. Kristen Grauman.
Computer vision: models, learning and inference Chapter 19 Temporal models.
Optical Flow Donald Tanguay June 12, Outline Description of optical flow General techniques Specific methods –Horn and Schunck (regularization)
Computer vision: models, learning and inference Chapter 19 Temporal models.
Computer Vision - A Modern Approach Set: Tracking Slides by D.A. Forsyth The three main issues in tracking.
The Measurement of Visual Motion P. Anandan Microsoft Research.
Modern Navigation Thomas Herring
Curve-Fitting Regression
Human-Computer Interaction Kalman Filter Hanyang University Jong-Il Park.
CS 782 – Machine Learning Lecture 4 Linear Models for Classification  Probabilistic generative models  Probabilistic discriminative models.
December 9, 2014Computer Vision Lecture 23: Motion Analysis 1 Now we will talk about… Motion Analysis.
Templates, Image Pyramids, and Filter Banks
NCAF Manchester July 2000 Graham Hesketh Information Engineering Group Rolls-Royce Strategic Research Centre.
Motion Estimation Today’s Readings Trucco & Verri, 8.3 – 8.4 (skip 8.3.3, read only top half of p. 199) Newton's method Wikpedia page
Image Alignment and Mosaicing. Image Alignment Applications Local alignment:Local alignment: – Tracking – Stereo Global alignment:Global alignment: –
Motion Estimation Today’s Readings Trucco & Verri, 8.3 – 8.4 (skip 8.3.3, read only top half of p. 199) Newton's method Wikpedia page
The Unscented Kalman Filter for Nonlinear Estimation Young Ki Baik.
VANET – Stochastic Path Prediction Motivations Route Discovery Safety Warning Accident Notifications Strong Deceleration of Tra ffi c Flow Road Hazards.
Motion and Optical Flow
PSG College of Technology
Announcements more panorama slots available now
Image Registration 박성진.
Announcements Questions on the project? New turn-in info online
Kalman Filtering COS 323.
Announcements more panorama slots available now
Intensity Transformation
Kalman Filter: Bayes Interpretation
The Discrete Kalman Filter
Image Registration  Mapping of Evolution
Image Stitching Linda Shapiro ECE/CSE 576.
Image Stitching Linda Shapiro ECE P 596.
Presentation transcript:

Image Alignment and Mosaicing Feature Tracking and the Kalman Filter

Image Alignment Applications Local alignment:Local alignment: – Tracking – Stereo Global alignment:Global alignment: – Camera jitter elimination – Image enhancement – Panoramic mosaicing

Image Enhancement OriginalEnhanced Anandan

Panoramic Mosaicing Anandan

Correspondence Approaches Optical flowOptical flow CorrelationCorrelation Correlation + optical flowCorrelation + optical flow Any of the above, iterated (e.g. Lucas-Kanade)Any of the above, iterated (e.g. Lucas-Kanade) Any of the above, coarse-to-fineAny of the above, coarse-to-fine

Correspondence Approaches Optical flowOptical flow CorrelationCorrelation Correlation + optical flowCorrelation + optical flow Any of the above, iterated (e.g. Lucas-Kanade)Any of the above, iterated (e.g. Lucas-Kanade) Any of the above, coarse-to-fineAny of the above, coarse-to-fine

Optical Flow for Image Registration Compute local matchesCompute local matches Least-squares fit to motion modelLeast-squares fit to motion model Problem: outliersProblem: outliers

Outlier Rejection Least squares very sensitive to outliersLeast squares very sensitive to outliers

Outlier Rejection Robust estimation: tolerant of outliersRobust estimation: tolerant of outliers In general, methods based on absolute value rather than square: minimize  |x i - f |, not  (x i - f ) 2In general, methods based on absolute value rather than square: minimize  |x i - f |, not  (x i - f ) 2

Robust Fitting In general, hard to computeIn general, hard to compute Analytic solutions in a few casesAnalytic solutions in a few cases – Mean  Median – Solution for fitting lines

Approximation to Robust Fitting Compute least squaresCompute least squares Assign weights based on average deviationAssign weights based on average deviation – Simplest: weight = 1 if deviation < 2.5 , 0 otherwise – Smoother version: weight = G  (deviation) Weighted least squaresWeighted least squares IterateIterate

Alternative Approximation to Robust Fitting Least median of squares:Least median of squares: – Select n random subsets of data points – Perform least-squares fit on each – Compute average deviation for each – Select fit with median deviation

Correspondence Approaches Optical flowOptical flow CorrelationCorrelation Correlation + optical flowCorrelation + optical flow Any of the above, iterated (e.g. Lucas-Kanade)Any of the above, iterated (e.g. Lucas-Kanade) Any of the above, coarse-to-fineAny of the above, coarse-to-fine

Correlation / Search Methods Assume translation onlyAssume translation only Given images I 1, I 2Given images I 1, I 2 For each translation ( t x, t y ) computeFor each translation ( t x, t y ) compute Select translation that maximizes cSelect translation that maximizes c Depending on window size, local or globalDepending on window size, local or global

Cross-Correlation Statistical definition of correlation:Statistical definition of correlation: Disadvantage: sensitive to local variations in image brightnessDisadvantage: sensitive to local variations in image brightness

Normalized Cross-Correlation Normalize to eliminate brightness sensitivity: whereNormalize to eliminate brightness sensitivity: where

Sum of Squared Differences More intuitive measure:More intuitive measure: Negative sign so that higher values mean greater similarityNegative sign so that higher values mean greater similarity Expand:Expand:

Local vs. Global Correlation with local windows not too expensiveCorrelation with local windows not too expensive High cost if window size = whole imageHigh cost if window size = whole image But computation looks like convolutionBut computation looks like convolution – FFT to the rescue!

Correlation

Fourier Transform with Translation

Therefore, if I 1 and I 2 differ by translation,Therefore, if I 1 and I 2 differ by translation, So, F -1 (F 1 /F 2 ) will have a peak at (  x,  y)So, F -1 (F 1 /F 2 ) will have a peak at (  x,  y)

Phase Correlation In practice, use cross power spectrumIn practice, use cross power spectrum Compute inverse FFT, look for peaksCompute inverse FFT, look for peaks [Kuglin & Hines 1975][Kuglin & Hines 1975]

Phase Correlation AdvantagesAdvantages – Fast computation – Low sensitivity to global brightness changes (since equally sensitive to all frequencies)

Phase Correlation DisadvantagesDisadvantages – Sensitive to white noise – No robust version – Translation only Extensions to rotation, scaleExtensions to rotation, scale But not local motionBut not local motion Not too bad in practice with small local motionsNot too bad in practice with small local motions

Correspondence Approaches Optical flowOptical flow CorrelationCorrelation Correlation + optical flowCorrelation + optical flow Any of the above, iterated (e.g. Lucas-Kanade)Any of the above, iterated (e.g. Lucas-Kanade) Any of the above, coarse-to-fineAny of the above, coarse-to-fine

Correlation plus Optical Flow Use e.g. phase correlation to find average translation (may be large)Use e.g. phase correlation to find average translation (may be large) Use optical flow to find local motionsUse optical flow to find local motions

Correspondence Approaches Optical flowOptical flow CorrelationCorrelation Correlation + optical flowCorrelation + optical flow Any of the above, iterated (e.g. Lucas-Kanade)Any of the above, iterated (e.g. Lucas-Kanade) Any of the above, coarse-to-fineAny of the above, coarse-to-fine

Correspondence Approaches Optical flowOptical flow CorrelationCorrelation Correlation + optical flowCorrelation + optical flow Any of the above, iterated (e.g. Lucas-Kanade)Any of the above, iterated (e.g. Lucas-Kanade) Any of the above, coarse-to-fineAny of the above, coarse-to-fine

Image Pyramids Pre-filter images to collect information at different scalesPre-filter images to collect information at different scales More efficient computation, allows larger motionsMore efficient computation, allows larger motions

Image Pyramids Szeliski

Pyramid Creation “Gaussian” Pyramid“Gaussian” Pyramid “Laplacian” Pyramid“Laplacian” Pyramid – Created from Gaussian pyramid by subtraction L i = G i – expand(G i+1 ) Szeliski

Octaves in the Spatial Domain Bandpass Images Lowpass Images Szeliski

Blending Blend over too small a region: seamsBlend over too small a region: seams Blend over too large a region: ghostingBlend over too large a region: ghosting

Multiresolution Blending Different blending regions for different levels in a pyramid [Burt & Adelson]Different blending regions for different levels in a pyramid [Burt & Adelson] – Blend low frequencies over large regions (minimize seams due to brightness variations) – Blend high frequencies over small regions (minimize ghosting)

Pyramid Blending Szeliski

Minimum-Cost Cuts Instead of blending high frequencies along a straight line, blend along line of minimum differences in image intensitiesInstead of blending high frequencies along a straight line, blend along line of minimum differences in image intensities

Minimum-Cost Cuts Moving object, simple blending  blur [Davis 98]

Minimum-Cost Cuts Minimum-cost cut  no blur [Davis 98]

Feature Tracking Local regionLocal region Take advantage of many framesTake advantage of many frames – Prediction, uncertainty estimation – Noise filtering – Handle short occlusions

Kalman Filtering Assume that results of experiment (i.e., optical flow) are noisy measurements of system stateAssume that results of experiment (i.e., optical flow) are noisy measurements of system state Model of how system evolvesModel of how system evolves Prediction / correction frameworkPrediction / correction framework Optimal combination of system model and observationsOptimal combination of system model and observations Rudolf Emil Kalman Acknowledgment: much of the following material is based on the SIGGRAPH 2001 course by Greg Welch and Gary Bishop (UNC)

Simple Example Measurement of a single point z 1Measurement of a single point z 1 Variance  1 2 (uncertainty  1 )Variance  1 2 (uncertainty  1 ) Best estimate of true positionBest estimate of true position Uncertainty in best estimateUncertainty in best estimate

Simple Example Second measurement z 2, variance  2 2Second measurement z 2, variance  2 2 Best estimate of true positionBest estimate of true position Uncertainty in best estimateUncertainty in best estimate

Online Weighted Average Combine successive measurements into constantly-improving estimateCombine successive measurements into constantly-improving estimate Uncertainty decreases over timeUncertainty decreases over time Only need to keep current measurement, last estimate of state and uncertaintyOnly need to keep current measurement, last estimate of state and uncertainty

Terminology In this example, position is state (in general, any vector)In this example, position is state (in general, any vector) State can be assumed to evolve over time according to a system model or process model (in this example, “nothing changes”)State can be assumed to evolve over time according to a system model or process model (in this example, “nothing changes”) Measurements (possibly incomplete, possibly noisy) according to a measurement modelMeasurements (possibly incomplete, possibly noisy) according to a measurement model Best estimate of state with covariance PBest estimate of state with covariance P

Linear Models For “standard” Kalman filtering, everything must be linearFor “standard” Kalman filtering, everything must be linear System model:System model: The matrix  k is state transition matrixThe matrix  k is state transition matrix The vector  k represents additive noise, assumed to have covariance QThe vector  k represents additive noise, assumed to have covariance Q

Linear Models Measurement model:Measurement model: Matrix H is measurement matrixMatrix H is measurement matrix The vector  is measurement noise, assumed to have covariance RThe vector  is measurement noise, assumed to have covariance R

PV Model Suppose we wish to incorporate velocitySuppose we wish to incorporate velocity

Prediction/Correction Predict new statePredict new state Correct to take new measurements into accountCorrect to take new measurements into account

Kalman Gain Weighting of process model vs. measurementsWeighting of process model vs. measurements Compare to what we saw earlier:Compare to what we saw earlier:

Results: Position-Only Model MovingStill [Welch & Bishop]

Results: Position-Velocity Model [Welch & Bishop] MovingStill

Extension: Multiple Models Simultaneously run many KFs with different system modelsSimultaneously run many KFs with different system models Estimate probability each KF is correctEstimate probability each KF is correct Final estimate: weighted averageFinal estimate: weighted average

Results: Multiple Models [Welch & Bishop]

Results: Multiple Models [Welch & Bishop]

Results: Multiple Models [Welch & Bishop]

Extension: SCAAT H be different at different times H be different at different times – Different sensors, types of measurements – Sometimes measure only part of state Single Constraint At A Time (SCAAT)Single Constraint At A Time (SCAAT) – Incorporate results from one sensor at once – Alternative: wait until you have measurements from enough sensors to know complete state (MCAAT) – MCAAT equations often more complex, but sometimes necessary for initialization

UNC HiBall 6 cameras, looking at LEDs on ceiling6 cameras, looking at LEDs on ceiling LEDs flash over timeLEDs flash over time [Welch & Bishop]

Extension: Nonlinearity (EKF) HiBall state model has nonlinear degrees of freedom (rotations)HiBall state model has nonlinear degrees of freedom (rotations) Extended Kalman Filter allows nonlinearities by:Extended Kalman Filter allows nonlinearities by: – Using general functions instead of matrices – Linearizing functions to project forward – Like 1 st order Taylor series expansion – Only have to evaluate Jacobians (partial derivatives), not invert process/measurement functions

Other Extensions On-line noise estimationOn-line noise estimation Using known system input (e.g. actuators)Using known system input (e.g. actuators) Using information from both past and futureUsing information from both past and future Non-Gaussian noise and particle filteringNon-Gaussian noise and particle filtering