我正在准备一个自定义Android相机应用程序,并希望调整触摸事件相机的曝光/亮度。默认值看起来比默认相机稍暗。我尝试使用whiteBalance(自动)功能,但它没有帮助。正在尝试使用像
这样的曝光params.setExposureCompensation(params.getExposureCompensation());
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
if(params.isAutoExposureLockSupported()) {
params.setAutoExposureLock(false);
}
}
但我不理解曝光功能之间的区别,
getExposureCompensation(),getMaxExposureCompensation(),getExposureCompensationStep()
答案 0 :(得分:1)
首先,您实际上并没有设置曝光。
params.setExposureCompensation(params.getExposureCompensation());
将曝光设置为先前的值,即永远不会改变。您需要做的是在params.getMinExposureCompensation()
和params. getMaxExposureCompensation()
其次,docs
清楚地解释了曝光功能之间的差异 getExposureCompensation
获取当前的曝光补偿指数。 目前的曝光补偿指数。范围是getMinExposureCompensation()到getMaxExposureCompensation()。 0表示不调整曝光。
getMaxExposureCompensation
获取最大曝光补偿指数。(> = 0)
getExposureCompensationStep
曝光补偿步骤。应用程序可以通过乘以曝光补偿指数和步长来获得EV。例如:如果曝光补偿指数为-6且步长为0.333333333,则EV为-2。
此处EV
代表曝光值