第35讲 Android Camera2 API AE手动曝光实战

本讲是Android Camera专题系列的第35讲,我们介绍Android Camera2 API专题的AE手动曝光实战,包括如下内容:

  1. 手动调整ISO
  2. 手动调整曝光时间

视频在线观看:

加入知识星球与更多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
赞(1)
未经允许不得转载:极客笔记 » 第35讲 Android Camera2 API AE手动曝光实战
分享到: 更多 (0)

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

Android Camera2 API