Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iPhone SDK - get/calculate camera field of view (FOV) (Augmented Reality)

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.

like image 867
quano Avatar asked Sep 04 '10 16:09

quano


1 Answers

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

like image 98
twerdster Avatar answered Oct 02 '22 01:10

twerdster