我们正在开发一个摄像头应用程序,我们想要使用手动曝光。我们不希望曝光算法设置ISO和曝光持续时间;相反,我们希望它告诉我们手动曝光和根据算法正确曝光之间的区别。这样,我们就可以在计算中考虑到这一点。
iOS有这样一个API exposureTargetOffset。Android camera2有这样的API吗?
发布于 2022-04-18 16:42:11
我不认为camera2库有这样一个API。然而,您可以计算您的ISO和曝光值之间的差异,以及算法值。
遵循以下步骤:
this.previewCaptureSession.setRepeatingRequest(previewSession.build(),
customCaptureCallback, this.cameraHandler);
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);
}
}
https://stackoverflow.com/questions/56659414
复制相似问题