如何找出一个机器人摄像头的孔径角 [英] How to find out the aperture angle of an android camera

查看:246
本文介绍了如何找出一个机器人摄像头的孔径角的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有可能找出摄像机装置的运行期间的孔径角。我曾试图用 getParameters()。getHorizo​​ntalViewAngle()的功能,但它返回360.0度。一个现实的价值将是45度这样的事情。

Is it possible to find out the aperture angle of the camera devices during runtime. I had tried to use the getParameters().getHorizontalViewAngle() function but it returned 360.0 degrees. A realistic value would be 45 degrees or something like this.

有没有人有这样的经历? THX

Does anyone have experiences with this? Thx

推荐答案

我可以告诉你的是,你不能信任的getHorizo​​ntalViewingAngle()。从理论上讲,这个功能应该得到正确的值,但许多手机(从我的经验)有只是一个随机值硬codeD那里。这可能是360,像你的情况,10(另一部手机,我听到的),或者具有相同的水平和垂直可视角度,这可能是不正确的。唯一可靠的方式做到这一点是测量或确定从光学的每个并且要支持所有的手机。

What I can tell you is that you cannot trust the getHorizontalViewingAngle(). Theoretically, this function should get the correct value, but many phones (from my experience) have just a random value hardcoded there. It may be 360, like in your case, 10 (another phone I heard of), or have the same vertical and horizontal viewing angles, which cannot be correct. The only reliable way to do it is to measure or determine from the optics for each and every phone you want to support.

检查@垫球注释如何衡量它,看看这个帖子有关iPhone如何计算它(假设你对芯片尺寸和所有其余的细节)

Check @mat-ball comment for how to measure it and look at this post about iPhone on how to calculate it (suppose you have details about the chip size and all the rest)

http://falklumo.blogspot.com/ 2010/06 /苹果iPhone-4-相机specs.html

这其中的原因是Android API中的功能是需要有一个非空值,并为手机被承认为Android的手机,它必须通过一些自动测试。而厂家只需填写一个值,以确保他们的API实现的验证。 <一href="http://developer.android.com/reference/android/hardware/Camera.Parameters.html#getHorizontalViewAngle" rel="nofollow">http://developer.android.com/reference/android/hardware/Camera.Parameters.html#getHorizontalViewAngle()

The reason for that is the function in the Android API is required to have a non-null value, and for the phone to be recognized as android-phone, it must pass some automatic tests. And the manufacturers just fill in a value to make sure their API implementation is validated. http://developer.android.com/reference/android/hardware/Camera.Parameters.html#getHorizontalViewAngle()

抱歉dissapointing你,但这是事实:)

Sorry for dissapointing you, but this is the truth :)

修改

如果你想使用这个放大或缩小的时候,提炼出动态的视角,不使用getHVA(),即使当它到达一个rasonable价值,因为它的不可以改变的放大,正如人们所想。

If you want to use this when zooming in or out, to extract the dynamic viewing angle, do not use getHVA() even when it gets a rasonable value, because it is not changing with the zoom, as one would suppose.

这篇关于如何找出一个机器人摄像头的孔径角的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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