270 likes | 279 Views
Lecture 21: Structure and Motion from Video CAP 5415. Today. Focus on a modern system for recovering the camera parameters and scene structure from a video. Video. Basic Steps. Make Initial Matches between Images Estimate Camera Positions Estimate Scene Shape Re-Render.
E N D
Today • Focus on a modern system for recovering the camera parameters and scene structure from a video
Basic Steps • Make Initial Matches between Images • Estimate Camera Positions • Estimate Scene Shape • Re-Render
Making Matches • The first step is to find matching points in the images (All images from Pollefeys)
Making Matches • Requirement: • Find points that can be tracked reliably between frames • remember optical flow?
Let’s analyze what’s going on Window or aperture • All rows are linearly-dependent • Cannot recover motion • One eigenvalue will be zero Edge
Can we recover the motion now? Window or aperture
Finding good points for tracking • Compute this matrix at all points • Look for points where both eigenvalues are large M
Tracking Points • First, identify good points • Track using SSD tracker • Fortunately, the displacements will be small in a video
Next Step:Refine Matches • Need to clean up initial set of matches • Can use geometry • How?
Next Step:Refine Matches • Need to clean up initial set of matches • Can use geometry • Remember Epipolar geometry? • What matrix expresses it?
When the cameras are calibrated • The vectors , , and are coplanar • Can be expressed as (Image from Forsyth and Ponce)
What if the cameras aren't calibrated • The relationship still holds, but we have to calibrate the cameras first. • Those calibration matrices, combined with the essential matrix are known as the fundamental matrix • Encodes information from the intrinsic and extrinsic parameters • Also Rank 2
Finding the fundamental matrix • Basic algorithm: 8-point algorithm • Find 8 corresponding points in the images • Once you have the corresponding p and p' points, • Is linear in F
Using the fundamental matrix • Can use fundamental matrix to identify the epipolar lines • Can use epipolar lines to find bad matches • One problem: • Bad matches lead to poor estimates of fundamental matrix • Solution: Use RANSAC algorithm • Iteratively fits matrices with subsets of points • Finds subsets that satisfy the constraints well
Next Step: Estimate Motion • Choose two images • Align world with first camera • The geometry of the second camera can be found from the fundamental matrix
Triangulating Points • Because of noise, points won't line up exactly • Find the 3D location of a pair by minimizing the difference between the projected location and actual location
Triangulating Points • Because of noise, points won't line up exactly • Find the 3D location of a pair by minimizing the difference between the projected location and actual location
Result • Coarse estimate of geometry of the scene • Camera locations
Next: Dense Geometry • Overview: • Calculate Stereo between pairs of images • Fuse Estimates • Need to rectify images first
Stereo • Optimize stereo along scanlines • Does not consider smoothness across scanlines • Once the depth is fused across views, a mesh can be created
Conclusion • This is a nice system that shows how the concepts that we have studied can be put together into a complete system