【问题标题】:How to lock exposure in camerax?如何在camerax中锁定曝光?
【发布时间】:2021-07-13 19:20:26
【问题描述】:

旧相机api中有setAutoExposureLock()方法。

还可以像这样在camera2中锁定曝光:

builder.set(CaptureRequest.CONTROL_AE_LOCK, true);

如何在 CameraX 中做到这一点?现在我正在使用ImageCapture.Builder 拍照。快速的互联网搜索没有给我答案。

【问题讨论】:

    标签: android android-camera android-camerax


    【解决方案1】:

    您正在寻找Camera2InterOp API。 https://developer.android.com/reference/androidx/camera/camera2/interop/Camera2Interop

    ImageCapture.Builder builder = new ImageCapture.Builder();
    Camera2Interop.Extender<ImageCapture> extender = new Camera2Interop.Extender<>(builder);
    extender.setCaptureRequestOption(CaptureRequest.CONTROL_AE_LOCK, true);
    

    【讨论】:

      猜你喜欢
      • 2010-09-30
      • 2015-06-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多