使用ARKit 3.0在iPhone XR上进行人物分割



下面的一段代码在iPhone XR上返回false,尽管it人员分割正在XR上工作。

ARConfiguration.supportsFrameSemantics(.personSegmentation)

我想知道它是否正式支持XR上的人物分割和深度人物分割。只是要指出的是,我在XR上有iOS 13.1.2。

试试这个变体:

override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
let config = ARWorldTrackingConfiguration()
if ARWorldTrackingConfiguration.supportsFrameSemantics(.personSegmentationWithDepth) {
config.frameSemantics = .personSegmentationWithDepth
}
arView.session.run(config)
}

并确保您的Xcode版本为11.2.1iOS版本为13.2.3

最新更新