问题描述
有没有办法通过调用 API 来找出或计算 iPhone 相机的视野 (FOV)?还是您必须亲自和手动找出自己的东西?
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?
如果无法使用 API 获取或计算它,而是必须将其硬编码到应用程序中,那么找出应用程序在哪种设备上运行的最佳方法是什么?不同的设备有不同的 FOV(iPhone 4 的 FOV 比以前的版本更大.)还有,每个设备的 FOV 到底有多大?
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?
我之所以这么问是因为我正在考虑制作增强现实应用,并且了解 FOV 至关重要.
I'm asking because I'm thinking of making an augmented reality app, and knowing the FOV is essential.
推荐答案
我拍了一张纸的照片,这张纸是从我测量过的距离测得的.然后我查看了这张纸的尺寸与照片中图像的比例.
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.
我的值为 56 厘米,您可以完全拍摄(即,使其正好占据屏幕尺寸)大约 40 厘米 x 60 厘米的物体
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
使用它我做了一些简单的触发并到达:垂直 FOV:2*atan(58.5/2/56.5) -> ~55 度水平视野:2*atan(21.5/2/56.5) -> 42 度
Using that i did some simple trig and arrived at:Vertical FOV: 2*atan(58.5/2 / 56.5) -> ~55 degreesHorizontal FOV: 2*atan(21.5/2 /56.5) -> 42 degrees
这篇关于iPhone SDK - 获取/计算相机视野 (FOV)(增强现实)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!