[Addon] Camera matching add-on for modeling based on photographs

That’s true, they are pretty short. I just tried with example and the camera’s all tilty.


@BladeBorge i just did a calibration from the first image you provided, and i got a closer match by just aiming more carefully when placing the line segments. it’s not perfect however, and my guess is that the image has been cropped and/or perspective corrected (the latter based on the fact that the vertical features of the building are all practically vertical in the photo).

blam will not work well for all kinds of input images, i can’t stress this enough. understanding the limitations will save you a lot of trouble and a lot of time spent trying to get perfect results for “impossible” images.



Something’s gotta be wrong over on my end. I went back and marked the lines as precisely as possible.



Could you note what your camera presets are? Maybe mine are defunct.

here’s my test .blend file matchingtest.blend (1.16 MB)

Hmmm, I opened your .blend, didn’t mess with any of the markings, hit calibrate and got this error message


that should be fixed in recent versions. try getting the latest.

Hey stuffmatic, thanks for your patience on helping me get to the bottom of this. I downloaded that latest version and it got rid of the error but my camera is still tilted as all get out even using your .blend file. I think I might need to download a whole new version of Blender, cause something is conflicting with BLAM like crazy.

I just discovered that you’re right, certain builds won’t work with BLAM. I was using only the test png provided by stuffmatic and even that would not work. The camera would never line up with the rectangle house. Then I downloaded a couple of builds of blender and one that worked is r43220, 2.61.1 on OS X, the freestyle build from tkroo

http://graphicall.org/124/download

and this one worked with the test png.

Great to know, thanks FaradayCage!

@FaradayCage Could you send me a link to a build that doesn’t work as well? I think I’ve got an idea about what’s causing the problems. Thanks.

I’ve been mostly using this build on OS X, and BLAM doesn’t work here:

http://graphicall.org/592

but also the blender build designated 2.61.0 r42614 didn’t work either. That is the official 64 bit OS X download from blender.org as of today.

I coaxed a single point perspective to work from a micro 4/3 camera, but oddly the camera is upside down, though above the grid floor in blender. The 3D reconstruction of a mesh is sort of working, but looks very odd. However, when using the wire house png for testing and the blender camera preset, the 3D reconstruction worked well. What are the most critical bits of data that affect this, I wonder?

‘No active camera’ after pressing ‘Calibrating…’, camera present and active. Anything wrong (except it does not work D ) ?

I found that it worked great but Movie Clip Editor is picky about file names. And my Ipod camera is a 44.9mm equivalent lens at 35mm film plane.

I think I might need to download a whole new version of Blender, cause something is conflicting with BLAM like crazy.


tempurpedic cloud luxe reviews | tempur cloud supreme | craftmatic bed cost

Hello. I recorded a short video showing how to prepare photo using Google Sketchup and Gimp - after the operation blam will work perfectly at first attempt :slight_smile:

[video]https://www.youtube.com/watch?v=P1_5LiEKDUo&feature=g-upl&context=G2966409AUAAAAAAAAAA[/video]

Thank you very much stuffmatic

I wish the addon would support camera shifting; besides that it’s pretty handy.

@rozmiarek What do you mean by camera shifting?

Hello everybody, and thank to Per for this Add on.
I get this error after drawing lines with grease pencil and pressing the calibrate camera button:

bpy.ops.view3d.object_as_camera()
Traceback (most recent call last):
File “C:\Users\bullx\AppData\Roaming\Blender Foundation\Blender\2.62\scripts\addons\blam.py”, line 1651, in execute
if not activeSpace.clip.grease_pencil:
AttributeError: ‘NoneType’ object has no attribute ‘grease_pencil’

location:<unknown location>:-1

i’ve tryed several ways without success.
can somebody give me a suggestion?
thank you.

I’m using blender 2.62 on windows 7 btw

he means probably: Moving/Shifting (up/down/left/right) the Lens without moving the Camera Back. Used a lot in architectural Photography to avoid Buildings (don’t know english word) getting smaller at top of image. Rotate the Lens, without moving Back, would be Tilting. Read about Shift - Photography.

(Edit: if not, i would as well like to know what he means :wink:

sorry guys,
I can not undertand where i should use grease pencil.
in blender 2.62 if i load my reference photo in UV image editor i do not see the BLAM toolbox here, I can only find it in the movie clip editor window.
BUT in the movie editor window i do not have grease pencil whit layers available, so I’m a little bit confused.
Any help?
thank you.