1 / 126

CSCE 643 Computer Vision: Lucas-Kanade Registration

CSCE 643 Computer Vision: Lucas-Kanade Registration. Jinxiang Chai. Appearance-based Tracking. Slide from Robert Collins. Image Registration. This requires solving image registration problems Lucas-Kanade is one of the most popular frameworks for image registration

jasont
Télécharger la présentation

CSCE 643 Computer Vision: Lucas-Kanade Registration

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CSCE 643 Computer Vision: Lucas-Kanade Registration Jinxiang Chai

  2. Appearance-based Tracking Slide from Robert Collins

  3. Image Registration • This requires solving image registration problems • Lucas-Kanade is one of the most popular frameworks for image registration - gradient based optimization - iterative linear system solvers - applicable to a variety of scenarios, including optical flow estimation, parametric motion tracking, AAMs, etc.

  4. Pixel-based Registration:Optical flow Will start by estimating motion of each pixel separately Then will consider motion of entire image

  5. Problem Definition: Optical Flow How to estimate pixel motion from image H to image I?

  6. Problem Definition: Optical Flow How to estimate pixel motion from image H to image I? • Solve pixel correspondence problem • given a pixel in H, look for nearby pixels of the same color in I

  7. Problem Definition: Optical Flow How to estimate pixel motion from image H to image I? • Solve pixel correspondence problem • given a pixel in H, look for nearby pixels of the same color in I Key assumptions • color constancy: a point in H looks the same in I • For grayscale images, this is brightness constancy • small motion: points do not move very far This is called the optical flow problem

  8. Optical Flow Constraints Let’s look at these constraints more closely • brightness constancy: Q: what’s the equation?

  9. Optical Flow Constraints Let’s look at these constraints more closely • brightness constancy: Q: what’s the equation? H(x,y) - I(x+u,v+y) = 0

  10. Optical Flow Constraints Let’s look at these constraints more closely • brightness constancy: Q: what’s the equation? H(x,y) - I(x+u,v+y) = 0 • small motion: (u and v are less than 1 pixel) • suppose we take the Taylor series expansion of I:

  11. Optical Flow Constraints Let’s look at these constraints more closely • brightness constancy: Q: what’s the equation? H(x,y) - I(x+u,v+y) = 0 • small motion: (u and v are less than 1 pixel) • suppose we take the Taylor series expansion of I:

  12. Optical Flow Equation Combining these two equations

  13. Optical Flow Equation Combining these two equations

  14. Optical Flow Equation Combining these two equations

  15. Optical Flow Equation Combining these two equations

  16. Optical Flow Equation Combining these two equations In the limit as u and v go to zero, this becomes exact

  17. Optical Flow Equation How many unknowns and equations per pixel?

  18. Optical Flow Equation How many unknowns and equations per pixel? Intuitively, what does this constraint mean?

  19. Optical Flow Equation How many unknowns and equations per pixel? Intuitively, what does this constraint mean? • The component of the flow in the gradient direction is determined • The component of the flow parallel to an edge is unknown

  20. Optical Flow Equation How many unknowns and equations per pixel? Intuitively, what does this constraint mean? • The component of the flow in the gradient direction is determined • The component of the flow parallel to an edge is unknown

  21. Ambiguity

  22. Ambiguity Stripes moved upwards 6 pixels Stripes moved left 5 pixels

  23. Ambiguity Stripes moved upwards 6 pixels Stripes moved left 5 pixels How to address this problem?

  24. Solving the Aperture Problem How to get more equations for a pixel? • Basic idea: impose additional constraints • most common is to assume that the flow field is smooth locally • one method: pretend the pixel’s neighbors have the same (u,v) • If we use a 5x5 window, that gives us 25 equations per pixel!

  25. RGB Version How to get more equations for a pixel? • Basic idea: impose additional constraints • most common is to assume that the flow field is smooth locally • one method: pretend the pixel’s neighbors have the same (u,v) • If we use a 5x5 window, that gives us 25 equations per pixel!

  26. Lukas-Kanade Flow Prob: we have more equations than unknowns

  27. Solution: solve least squares problem Lukas-Kanade Flow Prob: we have more equations than unknowns

  28. Solution: solve least squares problem Lukas-Kanade Flow Prob: we have more equations than unknowns • minimum least squares solution given by solution (in d) of:

  29. Lukas-Kanade Flow • The summations are over all pixels in the K x K window • This technique was first proposed by Lukas & Kanade (1981)

  30. Lukas-Kanade Flow • When is this Solvable? • ATA should be invertible • ATA should not be too small due to noise • eigenvalues l1 and l2 of ATA should not be too small • ATA should be well-conditioned • l1/ l2 should not be too large (l1 = larger eigenvalue)

  31. Lukas-Kanade Flow • When is this Solvable? • ATA should be invertible • ATA should not be too small due to noise • eigenvalues l1 and l2 of ATA should not be too small • ATA should be well-conditioned • l1/ l2 should not be too large (l1 = larger eigenvalue) Look familiar?

  32. Lukas-Kanade Flow • When is this Solvable? • ATA should be invertible • ATA should not be too small due to noise • eigenvalues l1 and l2 of ATA should not be too small • ATA should be well-conditioned • l1/ l2 should not be too large (l1 = larger eigenvalue) Look familiar? Harris Corner detection criterion!

  33. Edge Bad for motion estimation - large l1, small l2

  34. Low Texture Region Bad for motion estimation: - gradients have small magnitude - small l1, small l2

  35. High Textured Region Good for motion estimation: - gradients are different, large magnitudes - large l1, large l2

  36. Good Features to Track This is a two image problem BUT • Can measure sensitivity by just looking at one of the images! • This tells us which pixels are easy to track, which are hard • very useful later on when we do feature tracking... For more detail, check “Good feature to Track”, Shi and Tomasi, CVPR 1994

  37. Errors in Lucas-Kanade What are the potential causes of errors in this procedure? • Suppose ATA is easily invertible • Suppose there is not much noise in the image

  38. Errors in Lucas-Kanade What are the potential causes of errors in this procedure? • Suppose ATA is easily invertible • Suppose there is not much noise in the image When our assumptions are violated • Brightness constancy is not satisfied • The motion is not small • A point does not move like its neighbors • Optical flow in local window is not constant.

  39. Errors in Lucas-Kanade What are the potential causes of errors in this procedure? • Suppose ATA is easily invertible • Suppose there is not much noise in the image When our assumptions are violated • Brightness constancy is not satisfied • The motion is not small • A point does not move like its neighbors • Optical flow in local window is not constant.

  40. Revisiting the Small Motion Assumption Is this motion small enough? • Probably not—it’s much larger than one pixel (2nd order terms dominate) • How might we solve this problem?

  41. Iterative Refinement Iterative Lukas-Kanade Algorithm • Estimate velocity at each pixel by solving Lucas-Kanade equations • Warp H towards I using the estimated flow field - use image warping techniques • Repeat until convergence

  42. Idea I: Iterative Refinement Iterative Lukas-Kanade Algorithm • Estimate velocity at each pixel by solving Lucas-Kanade equations • Warp H towards I using the estimated flow field - use image warping techniques • Repeat until convergence

  43. Idea II: Reduce the Resolution!

  44. u=1.25 pixels u=2.5 pixels u=5 pixels u=10 pixels image H image I image H image I Gaussian pyramid of image H Gaussian pyramid of image I Coarse-to-fine Motion Estimation

  45. Upsample & warp run iterative L-K . . . image J image I image H image I Gaussian pyramid of image H Gaussian pyramid of image I Coarse-to-fine Optical Flow Estimation run iterative L-K

  46. Errors in Lucas-Kanade What are the potential causes of errors in this procedure? • Suppose ATA is easily invertible • Suppose there is not much noise in the image When our assumptions are violated • Brightness constancy is not satisfied • The motion is not small • A point does not move like its neighbors • Optical flow in local window is not constant.

  47. Lucas Kanade Tracking • Assumption of constant flow (pure translation) for all pixels in a larger window might be unreasonable

  48. Lucas Kanade Tracking • Assumption of constant flow (pure translation) for all pixels in a larger window might be unreasonable • However, we can easily generalize Lucas-Kanade approach to other 2D parametric motion models (like affine or projective)

  49. Beyond Translation So far, our patch can only translate in (u,v) What about other motion models? • rotation, affine, perspective

  50. Warping Review Figure from Szeliski book

More Related