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)
    }
4

1 回答 1

1

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

let frame = arView.session.currentFrame

frame?.camera.exposureDuration         // { get }
frame?.camera.exposureOffset           // { get }
于 2021-01-31T20:21:59.897 回答