iOS ARKit4 - 如何为AR相机修复白平衡问题?

5

我有一个应用程序,可以从多个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)
    }
1个回答

1

只有两个 AR View 的属性可以帮助,但它们只能被获取,不能被设置:

let frame = arView.session.currentFrame

frame?.camera.exposureDuration         // { get }
frame?.camera.exposureOffset           // { get }

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接