Docsity

Computer Vision: Understanding Optical Flow and Motion Estimation - Prof. Shishir Shah, Study notes of Computer Science

Partial preview of the text

Download Computer Vision: Understanding Optical Flow and Motion Estimation - Prof. Shishir Shah and more Study notes Computer Science in PDF only on Docsity!

Motion Estimation

Acknowledgement: Notes by Profs. R. Szeliski, S. Seitz, L. Shapiro, and S. Shah

COSC 6373

Computer Vision

Why estimate motion?

We live in a 4-D world Wide applications  Object Tracking  Camera Stabilization  Image Mosaics  3D Shape Reconstruction (SFM)  Special Effects (Match Move)

Change detection for surveillance

  • Video frames: F1, F2, F3, …
  • Objects appear, move, disappear
  • Background pixels remain the same (simple case)
  • How do you detect the moving objects?
  • Simple answer: pixelwise subtraction

Example: Person detected entering room

  • Pixel changes detected as difference components
  • Regions are (1) person, (2) opened door, and (3) computer monitor.
  • System can know about the door and monitor. Only the person

region is “unexpected”.

Change analysis

Known regions are ignored and system attends to the

unexpected region of change. Region has bounding

box similar to that of a person. System might then

zoom in on “head” area and attempt face recognition.

Optical flow

Optical flow constraints

(grayscale images)

 Let’s look at these constraints more closely

  • brightness constancy: Q: what’s the equation?
  • small motion: (u and v are less than 1 pixel)
    • suppose we take the Taylor series expansion of I:

H(x, y) = I(x+u, y+v)

Optical flow equation

 Combining these two equations

What is I

t

? The time derivative of the image at (x,y)

How do we calculate it?

The x-component of the gradient vector.

Aperture problem

Aperture problem

Lukas-Kanade flow

 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!

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*3 equations per pixel!

Conditions for solvability

 Optimal (u, v) satisfies Lucas-Kanade

equation

When is This Solvable?

• A

T A should be invertible

  • A T A should not be too small due to noise
  • eigenvalues 1 and 2 of A T A should not be too small
  • A T A should be well-conditioned
  • 1 / 2 should not be too large ( 1 = larger eigenvalue)

Edges cause problems

  • large gradients, all the same
  • large 1 , small (^2)