Android 相机 ISO 设置/快门速度
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/3550136/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Camera ISO setting/ shutter speed
提问by Will
I am looking for a way to change the light sensitivity of my Evo 4G camerea. I know it is not the camera's shutter speed because it is a digital camera. The next most relevant aspect is the ISO setting, but the Android SDK does not have a way to manipulate it. Does any one know an alternative? i.e scene mode, exposure or effects
我正在寻找一种方法来改变我的 Evo 4G 摄像头的感光度。我知道这不是相机的快门速度,因为它是数码相机。下一个最相关的方面是 ISO 设置,但 Android SDK 没有办法操作它。有谁知道另一种选择?即场景模式、曝光或效果
**parameter.set("iso", int) sets the iso.
**parameter.set("iso", int) 设置iso。
Does anyone have the run down on what scene mode values represents?
有没有人了解场景模式值代表什么?
Thanks for the input. I have looked over those pages numerous times. I was looking for a function similar to parameter.set("iso", int) because this function was successful in changing the iso setting. The camera does not have aperture as a setting. Maybe I can manipulate some firmware files.
感谢您的投入。我已经多次翻阅这些页面。我正在寻找一个类似于 parameter.set("iso", int) 的函数,因为这个函数成功地改变了 iso 设置。相机没有光圈作为设置。也许我可以操作一些固件文件。
回答by Nicholas Ng
Sorry it's late but might be helpful for others
对不起,晚了,但可能对其他人有帮助
To set aperture:
设置光圈:
Camera.Parameters params = camera.getParameters();
params.set("mode", "m");
params.set("aperture", "28"); //can be 28 32 35 40 45 50 56 63 71 80 on default zoom
params.set("shutter-speed", 9); // depends on camera, eg. 1 means longest
params.set("iso", 200);
回答by codezjx
You can use mCamera.getParameters().flatten()
to see all the settings your camera support.
您可以使用mCamera.getParameters().flatten()
来查看您的相机支持的所有设置。
In my situation, the key of the ISO parameter is "iso-speed-values".
在我的情况下,ISO 参数的关键是“iso-speed-values”。
You can use String isoSpeedValues = mCamera.getParameters().get("iso-speed-values")
to get all the support values.
您可以使用String isoSpeedValues = mCamera.getParameters().get("iso-speed-values")
获取所有支持值。
And use mCamera.getParameters().set("iso-speed", value)
to set a specify value.
并用于mCamera.getParameters().set("iso-speed", value)
设置指定值。
But I can't find any parameter to set a Shutter Speed(Exposure Time). Any idea?
但是我找不到任何参数来设置快门速度(曝光时间)。任何的想法?
回答by Yoni Samlan
Try Camera.Parameter's exposure compensation calls.
试试 Camera.Parameter 的曝光补偿调用。
EDIT (5/2015) Android 5.0 added APIs for this in android.hardware.camera2. See PkmX's lcamerafor an example.
编辑 (5/2015) Android 5.0 为此在android.hardware.camera2 中添加了 API 。有关示例,请参阅PkmX 的 lcamera。