本讲是Android Camera专题系列的第35讲,我们介绍Android Camera2 API专题的AE手动曝光实战,包括如下内容:
- 手动调整ISO
- 手动调整曝光时间
视频在线观看:
- 极客笔记:极客笔记在线课程
加入知识星球与更多Camera同学交流
– 星球名称:深入浅出Android Camera
– 星球ID: 17296815
GeekCamera2 手动调整ISO
UI Setup
MainActivity#cameraSetup
|--> final SeekBar iso_seek_bar = findViewById(R.id.iso_seekbar);
|--> iso_seek_bar.setOnSeekBarChangeListener(null);
|--> iso_seek_bar.setOnSeekBarChangeListener(new OnSeekBarChangeListener()
UI调整ISO流程
MainActivity#iso_seek_bar#onProgressChanged
|--> Preview#setISO
|--> CameraController2#setISO
|--> CameraSetting#setAEMode
|--> CaptureRequest.CONTROL_AE_MODE to OFF
|--> CaptureRequest.SENSOR_SENSITIVITY to iso
|--> CaptureRequest.SENSOR_EXPOSURE_TIME to exp_time
|--> CaptureRequest.SENSOR_FRAME_DURATION to sensor_frame_duration
GeekCamera2 手动调整曝光时间
UI Setup
MainActivity#cameraSetup
|--> final SeekBar exposure_time_seek_bar = findViewById(R.id.exposure_time_seekbar);
|--> exposure_time_seek_bar.setOnSeekBarChangeListener(null);
|--> exposure_time_seek_bar.setOnSeekBarChangeListener(new OnSeekBarChangeListener
UI 调整曝光时间
MainActivity#exposure_time_seek_bar#onProgressChanged
|--> Preview#setExposureTime
|--> CameraController2#setExposureTime
|--> CameraSetting#setAEMode
|--> CaptureRequest.CONTROL_AE_MODE to OFF
|--> CaptureRequest.SENSOR_SENSITIVITY to iso
|--> CaptureRequest.SENSOR_EXPOSURE_TIME to exp_time
|--> CaptureRequest.SENSOR_FRAME_DURATION to sensor_frame_duration