ARKit 3 People Occlusion 是否仅限于 iPhone X 及更新版本?

Is ARKit 3 People Occlusion restrict to iPhone X and newer?

我在 iOS 13 开始研究新的 People Occlusion 效果,所以我下载了 sample project 并尝试在我的设备上编译。

运行 on a iOS 13 iPhone 7 另外,它显示以下错误:

2019-09-11 13:49:41.257236-0300 ARMatteExampleSwift[7298:1369425] Metal GPU Frame Capture Enabled

2019-09-11 13:49:41.257845-0300 ARMatteExampleSwift[7298:1369425] Metal API Validation Enabled

2019-09-11 13:49:41.589383-0300 ARMatteExampleSwift[7298:1369425] * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'This set of frame semantics is not supported on this configuration' * First throw call stack: (0x19712c97c 0x196e550a4 0x1b20783d4 0x100552aac 0x100552e0c 0x19ab2fc08 0x19ab3029c 0x19aa4e24c 0x19aa53dc8 0x19aa4da94 0x19aa4aed4 0x19b16d954 0x19b16cf84 0x19b16def8 0x19b17ed44 0x19b12ed50 0x19b134cec 0x19a9112ec 0x19ada1d48 0x19a911dd4 0x19a91182c 0x19a911c00 0x19a9114bc 0x19a9159d8 0x19acd49ac 0x19adbaf08 0x19a915710 0x19adbae04 0x19a91557c 0x19a78aa8c 0x19a7895f4 0x19a78a7c4 0x19b13306c 0x19acf5390 0x19c1c1994 0x19c1e6960 0x19c1cc0f8 0x19c1e661c 0x100cf2c04 0x100cf6028 0x19c20b540 0x19c20b20c 0x19c20b734 0x1970aa7d0 0x1970aa728 0x1970a9ec0 0x1970a500c 0x1970a48ac 0x1a0eff328 0x19b136f00 0x100555a80 0x196f2f460) libc++abi.dylib: terminating with uncaught exception of type NSException

尝试调试时,我在示例项目自述文件中找到了这个:

Note: To run the app, use an iOS device with A12 chip or later.

为什么? Metal 2 是否仅限于 A12 芯片?

好的,所以我发现它隐藏在 Apple ARKit page:

的页脚中

People Occlusion and the use of motion capture, simultaneous front and back camera, and multiple face tracking are supported on devices with A12/A12X Bionic chips, ANE, and TrueDepth Camera

与 Metal 2 无关,这些 ARKit 功能仅限于较新的芯片。

ARKit 3.0 People Occlusion 功能仅限于采用 A12 仿生(7 纳米)和 A13 仿生(7 纳米)处理器的设备。 iPhone X 不支持人物遮挡,因为它有 A11 CPU(10 纳米技术)。

这是为什么?

那是因为 People Occlusion 功能的计算量非常大。要打开此功能,您只需要使用类型 属性 允许根据其深度遮挡虚拟内容:

static var personSegmentationWithDepth: ARConfiguration.FrameSemantics { get }

由于 RGBAlpha 和 [=32] 的实时合成技术,计算量很大=]ZDepth 通道的背景、3D 模型和前景在 60 fps 跟踪和 60 fps 渲染。所以只有 A12A13 芯片组可以在没有延迟和过热的情况下做到这一点(它们具有更大的功率并且更节能)。

和Metal 2框架同样的原因:

The Apple A12 Bionic and A13 Bionic graphics card is the second generation of integrated GPUs that was designed by Apple and not licensed by PowerVR. It can be found in the Apple iPhone Xs, iPhone Xr and iPhone 11 include 4 cores and supports Metal 2.

此外,您可以阅读 了解更多信息。