确定智能手机摄像头的视角 [英] Determine angle of view of smartphone camera

查看:214
本文介绍了确定智能手机摄像头的视角的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图确定Droid Incredible智能手机相机视野的大小。我需要知道这个值,我正在开发的应用程序。有人知道我怎么能找到/计算它的程序吗?

解决方案

除非有一些API调用(我不是Android程序员,我不知道)只需从已知距离捕捉标尺的图片,查看图片中显示了多少标尺,然后使用三角学来找到 this





现在你有两个距离l和d。使用一些简单的测角器,可以获得:



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


$ b b

因此


$ b

α= 2 * atan可以计算您的相机的水平视野。当然测量垂直f.o.v。除非你需要在垂直位置查看对象,否则完全一样。



然后你可以在程序中将它硬编码为一个常量。 (一个命名常量,当然,所以很容易改变:-p)


I'm trying to determine the degree size of the field-of-view of a Droid Incredible smartphone's camera. I need to know this value for an application that I'm developing. Does anyone know how I can find out/calculate it programmatically?

解决方案

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:

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)

这篇关于确定智能手机摄像头的视角的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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