iPhone SDK - 获取/计算摄像机视野(FOV)(增强现实) [英] iPhone SDK - get/calculate camera field of view (FOV) (Augmented Reality)

查看:793
本文介绍了iPhone SDK - 获取/计算摄像机视野(FOV)(增强现实)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法找出或计算视野(FOV)iPhone摄像头通过调用API?

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?

推荐答案

我拍了一张照片我从一个我测量的距离测量的纸。
然后我看看这张纸的大小与其在照片中的图像的比例。

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厘米,你可以完全拍摄(即,以便它占用正好的屏幕大小)约40cm x 60cm的对象

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度
水平FOV: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 degrees Horizontal FOV: 2*atan(21.5/2 /56.5) -> 42 degrees

这篇关于iPhone SDK - 获取/计算摄像机视野(FOV)(增强现实)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆