Vad*_*ick 5 shutter android-camera2 exposure exposure-time
我们正在构建一个相机应用,我们想使用手动曝光。我们不希望曝光算法设置ISO和曝光时间;取而代之的是,我们希望它告诉我们我们设置的手动曝光与根据算法得出的正确曝光之间的区别。这样,我们可以在计算中考虑到这一点。
iOS具有这样的API ExposureTargetOffset。Android camera2是否有这样的API?
我不认为camera2库有这样的API。但是,您可以计算 ISO 和曝光值以及算法值之间的差异。
请按照以下步骤操作:
this.previewCaptureSession.setRepeatingRequest(previewSession.build(),
customCaptureCallback, this.cameraHandler);
Run Code Online (Sandbox Code Playgroud)
CameraCaptureSession.CaptureCallback customCaptureCallback = new CameraCaptureSession.CaptureCallback() {
@Override
public void onCaptureCompleted(@NonNull CameraCaptureSession session,
@NonNull CaptureRequest request,
@NonNull TotalCaptureResult result) {
super.onCaptureCompleted(session, request, result);
//you can store the values of these two below variables however you want
final Long exposureValue = result.get(CaptureResult.SENSOR_EXPOSURE_TIME);
final Integer isoValue = result.get(CaptureResult.SENSOR_SENSITIVITY);
}
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
48 次 |
| 最近记录: |