Imports cameras, images and point cloud of a Bundler scene
Closed, ArchivedPublic


Project: Blender Extensions
Tracker: Py Scripts Upload
Blender: 2.62
Category: Import Export
Python: 3.1
Script name:
Author(s): Konrad Kölzer
Status: Open


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:

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 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.



Great project!
But i’m can’t import bundler.rd.out (from vsfm) to blender
I have error
Traceback (most recent call last): File “/home/bm/.config/blender/2.69/scripts/addons/”, line 282, in execute load(self, context, path) File “/home/bm/.config/blender/2.69/scripts/addons/”, line 254, in load bfr = load_scene(scene_path) File “/home/bm/.config/blender/2.69/scripts/addons/”, line 151, in load_scene bfr = BundleFileReader(os.path.join(filepath, “bundle”, “bundle.out”)) File “/home/bm/.config/blender/2.69/scripts/addons/”, line 90, in init f = open(filepath, “r”)
FileNotFoundError: [Errno 2] No such file or directory: ‘/home/bm/test2/v3/ver3.nvm.cmvs/bundle/bundle.out’

location: <unknown location>:-1

My blender version is 2.69.
Fix it please.

Hey brothermechanic,

I ran into this problem as well. The importer expects a certain file name and file structure. That being said if you try to use the scene the author provided to check out exactly what the addon expects.

You'll need to find where bundler saved a few files: your image directory, your .out file and your list.txt file
Once you've found these files follow the below instructions:

Rename your file to bundle.out
Put your bundle.out file in a directory called bundle
Take the bundle folder and copy it to your image directory
Copy your list.txt file to your directory
Now try to see if the importer will work :)

Now I'm running into the problem of not being able to see the images in the viewport, despite setting shading to glsl and setting the viewport mode to texture display XD



If you have problems making the images appear in the viewport, check this link:

Added lights in the scene and seems to have fixed the issues.

Hi, rayfigs!
Thank you so much !!! I do it!
I don't know where is new fixed version (i get that
But i follow your instructions of file placement and get it!!!
Thank you!

Is it possible to add forsed select focal leight and sensor size of cameras, and import without image planes?

You can modify/extend the to your needs.

Import without image planes

Just comment out the call to addImagePlane() in line 242 and 243.

Forcing a specific focal length

If you know sensor size and focal length in mm, you should replace line 236 and 237 with the following code:

bcamera.angle_x = math.atan(sensor_width / (focal_length * 2.0)) * 2.0
bcamera.angle_y = math.atan(sensor_height / (focal_length * 2.0)) * 2.0

sensor_width and sensor_height are the sensor width and height in mm. focal_length is the focal length in mm. As you can see in the existing code of script, I am using the same equations, however I use the image resolution and focal length in pixel.

Thank's for reply
This is not so simply for me
I do this changes in scrept, but get this error
Traceback (most recent call last):

File "/home/yeti/.config/blender/2.74/scripts/addons/", line 282, in execute
  load(self, context, path)
File "/home/yeti/.config/blender/2.74/scripts/addons/", line 255, in load
  addToBlenderScene(bfr, scene_path) 
File "/home/yeti/.config/blender/2.74/scripts/addons/", line 248, in addToBlenderScene

NameError: name 'planeObj' is not defined

location: <unknown location>:-1

Then i uncoment planes and all import as usually
and cameras do not have trye fical leight and sensor
This is what i want

And it will be usefull if camera settings will be as import option
Thank you anyway

Sorry, I forgot something. You are getting the error, because if you are commenting out line 242 and 243, you also need to comment out line 254. Last but not least I added some code to pass the focal length and sensor size in mm to Blender.

The resulting addToBlenderScene() funciton should look like this then:

def addToBlenderScene(bfr, scene_path):
    global xrot
    print("Adding point cloud...")
    name = "Point_Cloud"
    mesh =

    points = [point.position for point in bfr.points]
    mesh.from_pydata(points, [], [])
    meshobj = add_obj(mesh, name)
    meshobj.matrix_world = xrot

    # Adding cameras and image planes:
    for index, camera in enumerate(bfr.cameras):
        camera_name = "Camera %d" % index
        # Load image:
        bimage =
            os.path.join(scene_path, camera.image_path))
        width, height = bimage.size

        # Add camera:
        bcamera =
        bcamera.sensor_width = 22.3
        bcamera.sensor_height = 14.9
        bcamera.lens = 18.0
        bcamera.angle_x = math.atan(bcamera.sensor_width / (bcamera.lens * 2.0)) * 2.0
        bcamera.angle_y = math.atan(bcamera.sensor_height / (bcamera.lens * 2.0)) * 2.0
        cameraObj = add_obj(bcamera, camera_name)
        cameraObj.matrix_world = xrot *

        # Add image plane:
        #planeObj = addImagePlane(camera, bimage, width, height,
        #                         camera.focal_length, "Image Plane %d" % index)

        # Group image plane and camera:
        group ="Camera Group %d" % index)

Thank you for help.

Last question.

The image name is "0000X.jpg" (for ex), its camera name is "Camera X"
Can you modify your script that cameras have names like its images, like "Camera-0000X"?
It will be more properly i think, and more useful to work.
Thank you for script!

no activity 18 months, Archived.