Saturday, April 9, 2016

Structure from Motion 10 (SfM10)

SfM10 (Structure from Motion 10) builds a sparse 3d scene reconstruction given a set of still frames and a focal length (for each frame). Of course, it also computes the camera poses (rotation and translation) for each camera/view.

The Structure from Motion pipeline in SfM10 is as follows:
- For each camera/view, extract the features using SIFT.
- For each camera pair, compute the matches.
- For each camera pair, compute the good matches by removing outliers and keeping only the inliers. This is done using A Contrario RANSAC aka AC-RANSAC.
- Initialize the 3d scene with an adequate initial pair. The initial pair should be chosen so that the corresponding two views are not related by a homography, in other words, the baseline should be large enough (while having a good number of matches).
- Remove the spurious (low-confidence) 3d points. If the separation angle between the rays emanating from a given 3d point to the camera centers is below some threshold, the 3d point is considered unreliable and is therefore removed from the 3d reconstruction.
- Perform Bundle Adjustment on camera poses and the 3d points. The non-linear cost function is minimized with LBFGS instead of the more widely used Levenberg-Marquardt (just to be different).
- For each remaining camera:
-- Compute the camera pose using EPnP and add measurements to existing 3d points. This is called "resectioning" in Computer Vision lingo.
-- Add the 3d points seen by the camera.
-- Remove the spurious (low confidence) 3d points.
-- Perform Bundle Adjustment.

Everything has been implemented from scratch except the LBFGS solver which comes from Lis: Library of Iterative Solvers for Linear Systems.

Here are some examples of sparse 3d reconstructions obtained by SfM10:

The fire hydrant test sequence: three 1280x720 frames.

The sparse 3d reconstruction using SFM10.

The cemetery test sequence: eight 1280x720 frames.

The sparse 3d reconstruction using SFM10.

The windows executable (guaranteed to be virus free) is available for free via the 3D Software Page.

No comments:

Post a Comment