Project: Blender Extensions
Tracker: Py Scripts Upload
Category: Import Export
Script name: import_bundler.py
Author(s): Konrad Kölzer
This script imports a Bundler scene into Blender. Bundler is a free structure-from-motion software developed at the University of Washington that automatically generates an image-based representation using unordered images as input (see more here: http://phototour.cs.washington.edu/bundler/).
A Bundler scene consists of a set of images with reconstructed camera parameters (position, orientation and focal length) and a point cloud that represents a rough estimate of the scene geometry. The import_bundler.py script loads the cameras and point cloud into Bundler. Associated images are added as textured quads in fron of the camera. Imported Bundler scenes can be used as a sketch for 3d modeling.
The script can be installed as Blender addon in "File > User Preferences > Addons > Install addon...". After that it is displayed as single entry. Click on the checkbox on the right to enable the addon. Now you can start the Import by selecting "File > Import > Bundler (bundle.out)".
Setting up Bundler is not easy, so feel free to use one of the following scenes for testing:
After you installed the addon, just click on "File > Import > Bundler (bundle.out)". Now you can select the bundle.out file of your Bundler scene. After the import, you should see something like this:
If something went wrong, please let me know.
Some details about the imported data:
- The whole scene is rotated 90 degrees about the X axis to convert the Up-vector convention from Y-axis (Bundler) to Z-axis (Blender).
- The image quads are added in front of the camera at a distance of 1 Blender unit. You can adjust this distance by scaling the image quad (camera position is used as scale center)
- Each camera-image pair is in an individual group. This is useful for finding camera pose or images in huge scenes.
Current limitations of the import:
- The cameras in Blender represent the aspect ratio of the output, not the aspect ratio of the image.
- To see the images you have to switch the Viewport shading to Texture first.