Camera2 api预览与捕获不同

时间:2017-01-13 05:00:38

标签: android android-camera2

我正在使用camera2Basic example,我修正了曝光时间,iso,白平衡等。

mPreviewBuilder.set(CaptureRequest.CONTROL_AF_MODE,CaptureRequest.CONTROL_AF_MODE_CONTINUOUS_PICTURE);

//mPreviewBuilder.set(CaptureRequest.LENS_FOCUS_DISTANCE, DEFAULT_FOCUS_DISTANCE);

mPreviewBuilder.set(CaptureRequest.CONTROL_AE_MODE, CameraMetadata.CONTROL_AE_MODE_OFF);

mPreviewBuilder.set(CaptureRequest.NOISE_REDUCTION_MODE, CameraMetadata.NOISE_REDUCTION_MODE_FAST);
mPreviewBuilder.set(CaptureRequest.EDGE_MODE, CameraMetadata.EDGE_MODE_FAST);
mPreviewBuilder.set(CaptureRequest.CONTROL_AE_PRECAPTURE_TRIGGER, CaptureRequest.CONTROL_AE_PRECAPTURE_TRIGGER_CANCEL);

mPreviewBuilder.set(CaptureRequest.CONTROL_AWB_MODE, wbMode);
mPreviewBuilder.set(CaptureRequest.CONTROL_AWB_LOCK, wbLock);

mPreviewBuilder.set(CaptureRequest.SENSOR_SENSITIVITY, isoValue);
mPreviewBuilder.set(CaptureRequest.SENSOR_EXPOSURE_TIME, exposureValue);

我通过旋转手机进行缝合来拍摄几张photos。 在拍照时,preview looks精细但拍摄的结果在亮度方面完全不同

当我检查图像exif数据时,它们具有相同的曝光时间和iso(不在Nexus上)

我不知道我错过了什么。 有什么建议为什么会发生?谢谢

1 个答案:

答案 0 :(得分:0)

我的问题是没有正确使用session.setRepeatingRequest()session.capture()。请检查this answer