views:

352

answers:

2

Is there a way to find out or calculate the field of view (FOV) an iPhone camera has through calls to the APIs? Or is it something you have to physically and manually find out for yourself?

If it cannot be fetched or calculated with the APIs, but instead has to be hard-coded into an app, then what's the best way to find out what kind of device an app is running on? Different devices have different FOV (iPhone 4 has larger FOV than previous versions.) Also, how big are the FOVs of each device, exactly?

I'm asking because I'm thinking of making an augmented reality app, and knowing the FOV is essential.

+1  A: 

This answer uses some math and camera info to determine a value.

Looking at ARKit it hardcodes .7392 radians (133.056 degrees). When I was researching AR I just held the phone camera up and lined the edges up with some landmarks and then measured the angle. My estimation on a 3GS was 95 degrees.

Searching around on the internet there seem to be wildly varying claims. This might be explained by people having different models of the phone. I have found no official source of information on this topic from apple.

If I were to do this again I would borrow the various phone models and use a system of measuring against landmarks on the horizon. Not can beat hard numbers you measured yourself.

Jon Steinmetz
I too have noticed the different claims, and I was thinking the same thing, but would like to avoid the hassle of getting hold of devices if I could.
quano
+1  A: 

I took a photo of a piece of paper that i had measured from a distance that i also measured. I then looked at the ratio of the size of the piece of paper to its image in the photo.

My values were at 56 cm you can fully photograph (i.e. so that it takes up exactly the screen size) an object that is about 40cm x 60cm

Using that i did some simple trig and arrived at: Vertical FOV: 2*atan(58.5/2 / 56.5) -> ~55 degrees Horizontal FOV: 2*atan(21.5/2 /56.5) -> 42 degrees

twerdster
What device did you use?
quano
I used an iPhone 4 which has a camera aspect ration of 4/3 which agrees quite well with 55/42
twerdster