- You need to install ceres-solver in order to do the bundle adjustment: https://code.google.com/p/ceres-solver/
The current code is tested using version 1.7.0, that you can download from: https://code.google.com/p/ceres-solver/downloads/detail?name=ceres-solver-1.7.0.tar.gz&can=1&q=
- Compilation
After installing ceres-solver, please cd into the directory, and then compile our code by one of the following two ways.
-
Compile via cmake: cmake . make
-
Compile via compile.sh: ./compile.sh
There are two main functions RGBDsfm.m and ObjectAdjustment.m
-
RGBDsfm is used to run SFM on an RGB-D sequence.
-
ObjectAdjustment is used to run the Generalized Bundle Adjustment using semantic object anotaiton. It is required to run RGBDsfm first before running this ObjectAdjustment.
Our typical work process is to run RGBDsfm to get the pose estimations automatically, and then use our online object annotator to annotate the sequence, and finally run ObjectAdjustment again to get a better pose estimation.
To run RGBDsfm and ObjectAdjustment, you just need to input a sequence name from the SUN3D database. A full list of name is provided in the project website: http://sun3d.cs.princeton.edu
Examples: RGBDsfm('hotel_umd/maryland_hotel3'); ObjectAdjustment('hotel_umd/maryland_hotel3');
In the code RGBDsfm.m and ObjectAdjustment.m, there is two variables pointing to where the input and output paths are. You can set it to your local directory if you download the data in your own disk, e.g.:
write2path = '/user_folder/sun3d/data/sfm/';
SUN3Dpath = '/user_folder/fs/sun3d/data/scene/scene_final/';
For the input folder, you can also directly load the data from our server directly, by setting it to be:
SUN3Dpath = 'http://sun3d.csail.mit.edu/data/';
You need to change the IO functions in order to load your own sequences based on your own format. We suggest you convert your own sequences into our format, as we experimented with it a lot and find that it is very reliable and easy to understand.