光流运动计算Basic Stereo & Epipolar Geometry
合集下载
相关主题
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
2
https://www.youtube.com/watch?v=BDtvjKMl30w!
3
https://www.youtube.com/watch?v=5rR_9YIcg_s!
4
Plan
• Motion Field! • Patch-based / Direct Motion Estimation! • (Next: Feature Tracking)! • (Next: Layered Motion ! Models) ! • External Resource:!
• Feature-based methods
– Extract visual features (corners, textured areas) and track them over multiple frames – Sparse motion fields, but more robust tracking – Suitable when image motion is large (10s of pixels)
Slide adapted from K. Grauman.!
14
Motion field + camera motion
Length of flow vectors inversely proportional to depth Z of 3d point
Figure from Michael Black, Ph.D. Thesis
– Every motion vector points toward (or away from) v0, the vanishing point of the translation direction
• Vz is zero:
– Motion is parallel to the image plane, all the motion vectors are parallel
Image motion is a function of both the 3D motion (V) and the depth of the 3D point (Z)!
Slide adapted from K. Grauman.!
10
Motion field and parallax
• Pure translation: V is constant everywhere
Forward motion!
Rotation!
Horizontal translation!
Closer objects appear to move faster!!!
Slide adapted from Savarese and Grauman.!
16
Motion estimation techniques
3D motion vector
2D optical flow vector
! u = (u, v )
Slide adapted from Savarese.!
8
Motion field and parallax
• P(t) is a moving 3D point • Velocity of scene point: V = dP/dt • p(t) = (x(t),y(t)) is the projection of P in the image • Apparent velocity v in the image: given by components vx = dx/dt and vy = dy/dt • These components are known as the motion field of the image P(t) V P(t+dt)
Where did each pixel in image 1 go to in image 2!
Slide adapted from K. Grauman, Zelnik-Manor, Savarese.!
18
Motion Field & Optical Flow Field
• Motion Field = Real world 3D motion ! • Optical Flow Field = Projection of the motion field onto the 2d image!
To find image velocity v, differentiate p with respect to t (using quotient rule):
ZV − V z P v= f 2 Z
f Vx − Vz x vx = Z
vy = f V y − Vz y Z
p(t)
v
p(t+dt)
– Mubarak Shah’s lecture on optical flow!
• http://www.youtube.com/watch?v=5VyLAH8BhF8!
5
Video
• A video is a sequence of frames captured over time • Now our image data is a function of space (x, y) and time (t)
Motion and Optical Flow
EECS 598-08 Fall 2014! Foundations of Computer Vision! ! Readings: FP 10.6; SZ 8; TV 8! Date: 10/15/14! ! Instructor: Jason Corso (jjcorso)! web.eecs.umich.edu/~jjcorso/t/598F14!
• Direct methods
– Directly recover image motion at each pixel from spatiotemporal image brightness variations – Dense motion fields, but sensitive to appearance variations – Suitable for video and when image motion is small
!
Materials on these slides have come from many sources in addition to myself. ! Many are adaptations from Savarese, Lazebnik, Darrell, Hager, Pollefeys, Seitz, Szeliski, Saenko and Grauman. ! Individual slides reference specific sources when possible.!
20
When does it break?
The screen is stationary yet displays motion!
Slide adapted from Savarese.!
Homogeneous objects generate zero optical flow.!
Fixed sphere. Changing light source.!
f Vx − Vz x vx = Z f V y − Vz y vy = Z
1 v = ( v 0 − Vz p), Z v 0 = ( f Vx , f V y )
Slide adapted from K. Grauman.!
11
Motion field and parallax
• Pure translation: V is constant everywhere
Slide adapted from K. Grauman.!
12
Motion field and parallax
• Pure translation: V is constant everywhere
• Vz is nonzero:
1 v = ( v 0 − Vz p), Z v 0 = ( f Vx , f V y )
Non-rigid texture motion!
21
Apparent motion ~= motion field
Figure from Horn book
Slide adapted from K. Grauman.!
22
The Optical Flow Field
• The length of the motion vectors is invLeabharlann Baidursely proportional to the depth Z
Slide adapted from K. Grauman.!
13
Motion parallax
• http://psych.hanover.edu/KRANTZ/MotionParallax/ MotionParallax.html
Slide adapted from K. Grauman.!
17
Optical flow
• Definition: optical flow is the apparent motion of brightness patterns in the image • Ideally, optical flow would be the same as the motion field • Have to be careful: apparent motion can be caused by lighting changes without any actual motion
• Vz is nonzero:
1 v = ( v 0 − Vz p), Z v 0 = ( f Vx , f V y )
– Every motion vector points toward (or away from) v0, the vanishing point of the translation direction
Slide adapted from K. Grauman.!
6
Motion field
• The motion field is the projection of the 3D scene motion into the image
Slide adapted from K. Grauman; images from Russel and Norvig.!
CCD
3D motion vector
2D optical flow vector
! u = (u, v )
Slide adapted from Savarese.!
19
Optical Flow
Pierre Kornprobst's Demo !
Slide adapted from Savarese.!
Slide adapted from K. Grauman.!
points closer to the camera move more quickly across the image plane
15
Motion field + camera motion
Zoom out!
Zoom in!
Pan right to left!
7
Motion Field & Optical Flow Field
• Motion Field = Real world 3D motion ! • Optical Flow Field = Projection of the motion field onto the 2d image!
CCD
v p(t)
p(t+dt)
Slide adapted from K. Grauman.!
Motion field and parallax
P V = (Vx , V y , VZ ) p = f Z
P(t)
Quotient rule: D(f/g) = (g f’ – g’f)/g^2
9
V
P(t+dt)