5

I want to calculate the angle of view (or field of view) from a photograph, without knowing anything about the camera (or lens).

Please have a look at this example: example

It is assumed the angle between the line CENTER-LEFT and CENTER-RIGHT is 90° in reality.

What I do know:

  • The width and height of the image (in px).
  • The distances C-VPleft and C-VPright (in px).
  • The distance C-CENTER (in m).
  • The real angles between LEFT-CENTER-RIGHT. (So in reality and not in the picture.)

I have no other information.

Any help is appreciated.

Thanks!

  • 1
    You may get more responses if you post an example image with the distances and angles marked on that you know. – dav1dsm1th Dec 19 '14 at 0:21
  • This question is now useless as the example image is no longer accessible. If you still have the image, maybe you can upload it to the question? – Priyadi Jul 30 '17 at 7:56
  • @Priyadi: this question is from some years ago, but I found the image and uploaded the image again. (Maybe you get a https warning, sorry about that.) I hope you get the info you need. – Dick Aug 7 '17 at 7:00
  • Upload the image using the forum tool to insert images. – Rafael Aug 7 '17 at 15:56
1

I will assume that the picture was taken with the optical axis of the lens perpendicular to the film/sensor plane, and that this axis goes through the center of the picture. This assumptions could be invalid if you used a view camera, a tilt-shift-lens, or if the picture was unsymmetrically cropped.

Let a be the distance (in pixels) between the left vanishing point (VP left) and the center of the picture. Let b be the distance between VP right and the center of the picture. Then, per the geometric mean theorem, the focal length of the lens (still in pixels) is

f = √(a b)

From here you can get the horizontal field of view by

HFoV = 2 atan(w/(2 f))

Where w is the width of the picture, in pixels. The problem here is that the point VP left is given by the intersection of two almost-parallel lines. This may lead to inaccuracies in the estimate of a, which affect the quality of your final result.

  • Hi, it does not work. Problem is, that the distance of the vanishing points changes in relation to the angle in which the camera points, regardless of the field of view. I'll try another approach. Thanks for your input. – Dick Dec 30 '14 at 12:47
  • Yes, both the a and b distances change. However, their geometric mean does not change, and that is the key to finding the field of view! – Edgar Bonet Dec 31 '14 at 20:10
  • Than I probably don't know what unit it is that I am calculating. Is it pixels or degrees? – Dick Jan 2 '15 at 11:26
  • The focal length f is in the same units as a, b and w: probably pixels, although you can use whatever unit you want (e.g. cm on the monitor) as long as you use it consistently. The field of view is an angle, thus it is measured in angular units, typically either degrees or radians. The specific unit you get depends on the implementation of the atan() function. C.f. the manual of your software/calculator. – Edgar Bonet Jan 3 '15 at 14:39

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.