Android摄像头取光传感器值 [英] android camera get light sensor value
问题描述
我知道如何从光传感器使用得到勒克斯值 android.hardware.sensor
。
I know how to get a lux value from the light sensor using android.hardware.sensor
.
我看到了<一个href="https://play.google.com/store/apps/details?id=lightmeter.hardware.lightsensor&feature=search_result#?t=W251bGwsMSwxLDEsImxpZ2h0bWV0ZXIuaGFyZHdhcmUubGlnaHRzZW5zb3IiXQ"相对=nofollow>测光表的工具在市场上。该应用程序的描述说,它可以从摄像机照度值。它是如何能做到这一点?
I saw light meter tools on the market. The application description said it can get the lux value from the camera. How can it do that?
此外,我怎么可以设置快门速度和光圈?
Also how can I set the shutter speed and the aperture?
推荐答案
看看的 Camera.Parameters
类。
它拥有相机支持所有功能。也许 setExposureCompensation
。
我不知道很多关于摄影,但我的猜测是,曝光补偿是改变光圈和速度。
It has all functions supported by the Camera. Probably setExposureCompensation
.
I don't know much about photography but my guess would be that exposure compensation is changing aperture or speed.
这可能是因为你所提到的工具使用捆绑本机库。也有看看如何在 Camera.Parameters
中给出的函数类的工作(检查Android源$ C $ C)。
It could be that the tool you mentioned is using a bundled native library. Also have a look at how the functions given in Camera.Parameters
class work (check android source code).
您还可以使用环境光传感器取得勒克斯单位的光强度(如果这是你的项目的范围之内)。从Android电子文档:
you can also use Ambient light sensor to get the light level in lux units (if this is within the scope of your project). From android documentation:
Sensor.TYPE_LIGHT:
Sensor.TYPE_LIGHT:
值[0]:在SI单位勒克斯环境光照水平
values[0]: Ambient light level in SI lux units
您可以找到有关文档中的光传感器的更多信息。
You can find more information about the light sensor in the documentation.
这篇关于Android摄像头取光传感器值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!