4
$\begingroup$

I want to use photos in Blender, but I need to know camera information (sensor, focal, etc. for camera that was used to capture these photos), there is no Exif data inside these photos. I wonder if there is an equation or way to detect camera information visually (not exact, but near enough), depending on distance or perspective, etc.

$\endgroup$
10
$\begingroup$

You can get the angle of view with the Blam add-on

You can get them both (sensor size and focal length) at one time, but only the common factor of the equation.

With the mentioned add-on, that you can freely download, you are able to match the camera look starting from a bunch of grease pencil layers. If your photo has three vanishing points as the one below, you should provide three different layers, one per axis.

Enter image description here

After that you can start the camera calibration with the button on the left, and you'll get the focal length value automatically applied to the active camera.

Enter image description here

You can see from this quick modeling that the geometry is following the correct perspective deformation.

Enter image description here

And even the length of the edges results in more or less the same as you expect from a cube.

Enter image description here

Now comes the hardest part, as there is no uniform relation between the focal length of a lens and the angle of view, since the size of the camera sensor also determines the angle of view.

So in order to get the right value showed in the Exif data of the camera's focal length you must at least know the size of its sensor... (I may be wrong; there are a lots of things to consider. I hope someone who has more knowledge can help here. A related question is https://photo.stackexchange.com/questions/21616/how-can-i-calculate-focal-length-from-a-photograph).

Here's the scene after feeding the fields with the camera's real sensor size and focal length: the camera has to be slightly moved away from the subject to match the previous result.

Enter image description here

Sorry, the properties panel is in my own language, anyway it's saying:

  • Camera Model NIKON D32000
  • Focal length = 38 mm
  • Focal length 35 mm = 57 mm
  • ....

Image credits to Miguel Á. Padriñán, you can download it here.

$\endgroup$
  • 2
    $\begingroup$ BLAM is a fantastic add-on. :-) And you explained this well. $\endgroup$ – Mentalist May 8 '16 at 13:19
  • 2
    $\begingroup$ @Carlo One more thing to add to this excellent answer: keep in mind that Blam does not deal with lens distortion. All lenses in the real world have some kind of distortion, and to accurately integrate CG images and photographs, either the original image has to be un-distorted or the CG elemnts have to be distorted to match. More info here $\endgroup$ – cegaton May 8 '16 at 13:55
  • 1
    $\begingroup$ @Carlo Blam will help you determine the Field of View and should be thought of in degrees. (if you click on the box right next to the lens value you can switch it to field of view. Knowing that value you can determine the lens according to the sensor size using any of the charts available on the internet (like this one), or using blender just change to the sensor size you think was used to make the picture, then enter the field of view, and blender will determine the lens. $\endgroup$ – cegaton May 8 '16 at 14:41
  • $\begingroup$ Thanks for your answer, I'm using this addon, but your answer was really helpful, ....thanks again $\endgroup$ – Almoontaha May 13 '16 at 22:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.