【问题标题】:iOS ARKit4 - how to fix white balance for the ARCamera?iOS ARKit4 - 如何修复 ARCamera 的白平衡?
【发布时间】:2021-05-05 01:38:12
【问题描述】:

我有一个应用程序可以从多个ARFrame 生成点云。用于捕获图像的相机似乎具有动态白平衡,并且可以在捕获会话的中间更改它。

如何配置 ARView、ARSession 或 ARCamera 以强制其在会话期间锁定白平衡?

我可以访问以下参数,但没有看到任何与白平衡相关的内容。

var arView: ARView!
let session: ARSession = arView.session
var sampleFrame: ARFrame = session.currentFrame! 
let camera = sampleFrame.camera


func configureSessionAndRun() {

        arView.automaticallyConfigureSession = false
        let configuration = ARWorldTrackingConfiguration()
        
        configuration.sceneReconstruction = .meshWithClassification
        configuration.frameSemantics = .smoothedSceneDepth
        configuration.planeDetection = [.horizontal, .vertical]
        
        configuration.environmentTexturing = .automatic
        
        arView.session.run(configuration)
    }

【问题讨论】:

    标签: ios arkit swift5 avcapturesession arcamera


    【解决方案1】:

    只有两个 AR View 的属性可以提供帮助,但它们只是可获取的,而不是可设置的:

    let frame = arView.session.currentFrame
    
    frame?.camera.exposureDuration         // { get }
    frame?.camera.exposureOffset           // { get }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2023-03-23
      • 1970-01-01
      • 2013-04-02
      • 2020-08-29
      • 1970-01-01
      • 2011-08-28
      • 2015-08-10
      相关资源
      最近更新 更多