Determine Angle of View of Smartphone Camera

Determine angle of view of smartphone camera

Unless there's some API call for that (I'm not an Android programmer, I wouldn't know), I would just snap a picture of a ruler from a known distance away, see how much of the ruler is shown in the picture, then use trigonometry to find the angle like this:

Sample Image

now you have the two distances l and d from the figure. With some simple goniometry, one can obtain:

tan(α/2) = (l/2)/d,

hence

α = 2*atan(l/2d)

So with this formula you can calculate the horizontal field-of-view of your camera. Of course measuring the vertical f.o.v. goes exactly the same way except that you then need to view the object in its vertical position.

Then you can hard-code it as a constant in your program. (A named constant, of course, so it'd be easy to change :-p)

What is the angle the WP7 Camera sees?

Please see this post

How to find out the aperture angle of an android camera

in WP7, there is no API function to get that, and no other option than

  • Ask user introduce it (they never know)
  • Make a list of phones you support and obtain/measure it for each one. Store it in your app. (crazy!)

(I am doing the same kind of stuff and we invested a lot in finding automatic calibration methods, without success.)

EDIT

Cheers and love for bill and microsoft co.

How can i calculate the field of view of the camera of a phone?

I think you will never match the FOV definition for every device. (Compare this answer for iPhone.)

Every device is different when using android. Take your device, do the math (or take the results from anywhere else) and decide yourself to choose a reasonable FOV angle.

Maybe you could take account of Camera.Parameters.getSupportedPictureSizes() for getting the camera ratio, but that should be all you can do.

camera: image projection

Web search shows that the values returned by getVerticalViewAngle() cannot be blindly trusted on all devices; also note that you should take into account the zoom level and aspect ratio, see Determine angle of view of smartphone camera



Related Topics



Leave a reply



Submit