+ All Categories
Home > Documents > Optical Flow - Colorado State Universitycs510/yr2014sp/more_progress/L21_Flow.pdfL21_Flow.pptx...

Optical Flow - Colorado State Universitycs510/yr2014sp/more_progress/L21_Flow.pdfL21_Flow.pptx...

Date post: 26-Sep-2020
Category:
Upload: others
View: 0 times
Download: 0 times
Share this document with a friend
9
Optical Flow CS 510 Lecture #21 April 11 h , 2014
Transcript
Page 1: Optical Flow - Colorado State Universitycs510/yr2014sp/more_progress/L21_Flow.pdfL21_Flow.pptx Author: Bruce A. Draper Created Date: 4/16/2014 3:54:58 PM ...

Optical Flow

CS 510 Lecture #21

April 11h, 2014

Page 2: Optical Flow - Colorado State Universitycs510/yr2014sp/more_progress/L21_Flow.pdfL21_Flow.pptx Author: Bruce A. Draper Created Date: 4/16/2014 3:54:58 PM ...

Where are we?

•  We know how to implement a BoW •  BoW was invented to match still images •  We can update the feature extraction step

to find STIPs (spatio-temporal IPs) – 3D corners (Laptev) – Gabor peaks (Dollár)

•  But if we can’t describe motion…

4/16/14   CS  510,  Image  Computa4on,  ©Ross  Beveridge  &  Bruce  Draper   2  

Page 3: Optical Flow - Colorado State Universitycs510/yr2014sp/more_progress/L21_Flow.pdfL21_Flow.pptx Author: Bruce A. Draper Created Date: 4/16/2014 3:54:58 PM ...

Describing Motion : Flow

•  Motion is best described as the 2D motion of surface points over time – Find an easy-to-recognize point on object – Record its (x1,y1) position at time T1

– Record its (x2,y2) position at time T2

–  Its flow vector (dx/dt, dy/dt) is (x2-x1, y2-y1) •  Of course, the devil is in the details

4/16/14   CS  510,  Image  Computa4on,  ©Ross  Beveridge  &  Bruce  Draper   3  

Page 4: Optical Flow - Colorado State Universitycs510/yr2014sp/more_progress/L21_Flow.pdfL21_Flow.pptx Author: Bruce A. Draper Created Date: 4/16/2014 3:54:58 PM ...

Example of Sparse Flow

4/16/14   CS  510,  Image  Computa4on,  ©Ross  Beveridge  &  Bruce  Draper   4  

hDp://docs.opencv.org/trunk/doc/py_tutorials/py_video/py_lucas_kanade/py_lucas_kanade.html  

Page 5: Optical Flow - Colorado State Universitycs510/yr2014sp/more_progress/L21_Flow.pdfL21_Flow.pptx Author: Bruce A. Draper Created Date: 4/16/2014 3:54:58 PM ...

Computing Sparse Flow (simple) •  Pick good points to track

– Point matching must be spatially precise •  Frame to frame movements are small •  Corners (structure tensors) were invented for this

purpose – Patterns must be unique

•  Repeated patterns must be avoided •  Checkerboards, brick walls, etc. should be avoided

– OpenCV has a goodFeaturesToTrack function •  Use image around point as template

– Find position of best match in next image – Compute flow from position of match

4/16/14   CS  510,  Image  Computa4on,  ©Ross  Beveridge  &  Bruce  Draper   5  

Page 6: Optical Flow - Colorado State Universitycs510/yr2014sp/more_progress/L21_Flow.pdfL21_Flow.pptx Author: Bruce A. Draper Created Date: 4/16/2014 3:54:58 PM ...

Sparse Flow Issues

4/16/14   CS  510,  Image  Computa4on,  ©Ross  Beveridge  &  Bruce  Draper   6  

Page 7: Optical Flow - Colorado State Universitycs510/yr2014sp/more_progress/L21_Flow.pdfL21_Flow.pptx Author: Bruce A. Draper Created Date: 4/16/2014 3:54:58 PM ...

Example of Dense Flow •  Scene from PETS

video •  Farneback 2003 •  From OpenCV

4/16/14   CS  510,  Image  Computa4on,  ©Ross  Beveridge  &  Bruce  Draper   7  

Page 8: Optical Flow - Colorado State Universitycs510/yr2014sp/more_progress/L21_Flow.pdfL21_Flow.pptx Author: Bruce A. Draper Created Date: 4/16/2014 3:54:58 PM ...

Focus of Expansion (FoE)

•  If the camera is moving into the scene, all flow field vectors point away from the point the camera is moving toward

•  This point is called the “focus of expansion”

•  Simple form of navigation (insects use it)

4/16/14   CS  510,  Image  Computa4on,  ©Ross  Beveridge  &  Bruce  Draper   8  

hDp://w

ww.hizook.com

/blog/2010/02/16/learning-­‐es4mate-­‐robot-­‐m

o4on-­‐and-­‐find-­‐unexpected-­‐objects-­‐op4cal-­‐flow  

Page 9: Optical Flow - Colorado State Universitycs510/yr2014sp/more_progress/L21_Flow.pdfL21_Flow.pptx Author: Bruce A. Draper Created Date: 4/16/2014 3:54:58 PM ...

Modeling Camera Motion

4/16/14   CS  510,  Image  Computa4on,  ©Ross  Beveridge  &  Bruce  Draper   9  

Which  way  is  the  camera  moving  in  these  scenes?  

hDp://w

ww.hizook.com

/blog/2010/02/16/learning-­‐es4mate-­‐robot-­‐m

o4on-­‐and-­‐find-­‐unexpected-­‐objects-­‐op4cal-­‐flow  


Recommended