Git Product home page Git Product logo

spherical-sfm's Introduction

Spherical Structure-from-Motion

Elfin Forest

Code for our papers:

Baker, L., S. Mills, S. Zollmann, and J. Ventura, "CasualStereo: Casual Capture of Stereo Panoramas with Spherical Structure-from-Motion", IEEE Conference on Virtual Reality and 3D User Interfaces (VR), 2020.

Ventura, J., "Structure from Motion on a Sphere", European Conference on Computer Vision (ECCV), 2016.

Dependencies

  • OpenCV 3+
  • Ceres solver
  • Eigen 3+
  • Polynomial
  • CUDA (for stereo panorama stitcher)

Building

mkdir build ;
cd build ;
cmake .. ;
make -j8 ;

The panorama stitcher app is disabled by default, since it requires CUDA which may not be available on all machines. To enable it:

mkdir build ;
cd build ;
cmake .. -DBUILD_STITCHER=TRUE ;
make -j8 ;

Usage

If your images have radial distortion, first undistort them using:

undistort_images -intrinsics <path to intrinsics with distortion> -intrinsicsout <path for output intrinsics file> -video <path to video> -output <path ot folder for undistorted images> -rotate <rotation>

The "rotate" parameter is the number of clockwise 90 degree rotations to apply (useful for iPhone videos, for example).

To run the spherical structure-from-motion pipeline:

run_spherical_sfm -intrinsics <path to intrinsics> -video <path to video> -output <path to output>

The video path can be an image filename specifier such as %06d.png. The intrinsics file should contain the focal length, center x, and center y separated by spaces.

To make the stereo panoramas:

make_stereo_panorama -intrinsics <path to intrinsics> -video <path to video> -output <path to output>

Capture tips

  • Hold the camera in an outstretched hand and turn in a roughly level and complete circle (close the loop). Don't go too far over the loop closure point (no more than 30 degrees beyond the starting point).

Examples

You can view these example panoramas in a WebVR-compatible browser or headset.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.