首页 > 解决方案 > ARKit / ARSCNView 中的视频稳定

问题描述

我使用 ARKit 和 ReplayKit 录制视频。我意识到使用 ARKit/ARSCNView 时相机/视频流非常不稳定。

有没有办法使用例如在 AVCaptureConnection 中可用的稳定模式来捕获视频流:-> activeVideoStabilizationMode

ARKit 中是否有类似的东西?

这是一些示例代码,非常基本的 arkit 设置:

@IBOutlet var sceneView: ARSCNView!
let scene = SCNScene()

func setupScene() {

sceneView.delegate = self
sceneView.session.delegate = self
sceneView.autoenablesDefaultLighting = true

// Set the scene to the view
sceneView.scene = scene

}

func resetTracking() {

// Create a session configuration
let configuration = ARWorldTrackingConfiguration()

configuration.planeDetection = .horizontal

// Run the view's session
sceneView.session.run(configuration, options: [.resetTracking, .removeExistingAnchors])
}

标签: swiftarkit

解决方案


推荐阅读