Tag Archives: structure from motion

Open source Structure-from-Motion and Multi-View Stereo tools with C++

Structure-from-Motion (SFM) is genuinely an interesting topic in computer vision, Basically making 3D structure from something 2D is absolutely mesmerizing 🙂

There two open source yet very robust tools for SFM, which sometimes compiling them might be complicated, here I will share my experience with you.




Download the glew from SF at http://glew.sourceforge.net/. Do NOT get it from Github as to seems to have some problems.



Install DevIl Image library

open makefile and enable siftgpu_enable_cuda

now go to bin directory and libsiftgpu.so to your vsfm bin directory


you can see the some of my results here:

Note: if you don’t have cuda or Nvidia driver you can use your CPU but then you have to limit your file image size and sift binary should be available in your vsfm/bin directory.

Download http://www.cs.ubc.ca/~lowe/keypoints/siftDemoV4.zip and make it and copy the sift binary to vsfm/bin.


The installation fo this one is almost straightforward except you need the latest version of Ceres Solver (do not use the one binary package from Ubuntu they are old and they won’t work). So download and make and install the Ceres Solver using the following:

Now in the colmap CMakeList.txt add the following line:

just before “find_package(Ceres REQUIRED)”

and now you can make and install it. You can see some of my results here:

In the next post, I will show you how can you do that in OpenCV.

The moon is sphere! structure from motion confirms that :)

So the other day I saw this beautiful 360-degree video of the moon and I decided to see what would I get if I apply SFM (structure from motion) algorithm to the images in the video. So I extracted the image frame by frame from the video and feed the to SFM algorithm and the result was exactly what I expected! a perfect sphere. you can download the model from here

You can open it with Meshlab