【问题标题】:ARKit 3.0 – People Occlusion with Motion CaptureARKit 3.0 – 带有动作捕捉的人物遮挡
【发布时间】:2019-12-07 18:51:02
【问题描述】:

我正在尝试在同一个应用上同时加载 people occlusionmotion capture

由于ARBodyTrackingConfiguration 不支持personSegmentationWithDepth,我正在创建2 个ARView,为每个ARView 提供不同的配置(ARWorldTrackingConfigurationARBodyTrackingConfiguration)。

问题在于,由于某种原因,只有一个委托回调被触发,并且没有可用的深度数据。

我在这里做错了什么?

不能同时拥有多个 ARSession 吗?

【问题讨论】:

  • 您需要选择其中之一。 ARWorldTrackingConfiguration 与人员细分将在ARFrame 上给出ARBody2D,这会给您提供不那么详细但您从ARBodyTrackingConfiguration 获得的一些相同类型的信息。

标签: swift augmented-reality arkit realitykit


【解决方案1】:

在 ARKit 4.0 中,这两个功能可以同时运行。但是它们都是 CPU 密集型的。

override func viewDidLoad() {
    super.viewDidLoad()
    
    guard ARBodyTrackingConfiguration.isSupported
    else { fatalError("MoCap is supported on devices with A12 and higher") }
    
    guard ARBodyTrackingConfiguration.supportsFrameSemantics(
                                               .personSegmentationWithDepth)
    else { fatalError("People occlusion is not supported on this device.") }
        
    let config = ARBodyTrackingConfiguration()
    config.frameSemantics = .personSegmentationWithDepth
    config.automaticSkeletonScaleEstimationEnabled = true
    arView.session.run(config, options: [])
}

【讨论】:

    猜你喜欢
    • 2020-02-04
    • 1970-01-01
    • 2022-01-24
    • 2020-09-23
    • 2021-11-04
    • 2015-05-06
    • 1970-01-01
    • 2018-01-28
    • 2019-08-03
    相关资源
    最近更新 更多