ARKit 或 ARCore 使用什么算法来检测平面?

What algorithm is used by ARKit or ARCore to detect planar surfaces?

我正在致力于创建简单的 AR 应用程序,并且我使用了 ARCore 和 ARKit。我对现实世界中虚拟物体定位的准确性印象深刻,因为我玩的手机没有深度传感器也没有多个摄像头,所以我想知道: 这些 SDK 为平面检测实现了什么算法?

Basically, ARCore uses a technique called Concurrent Odometry and Mapping (COM) and ARKit uses a technique called Visual-Inertial Odometry (VIO) to understand where the smartphone is relative to the real environment around it.

在第一阶段——运动跟踪——每部智能手机结合来自RGB camera sensor(60 fps)和来自 accelerometer and gyroscope sensors(1000 fps)的运动数据使用 parallax formula 计算高对比度 feature points 的位置。该信息允许 ARCore 和 ARKit 在六个自由度 (6 DoF) 中获取虚拟相机的位置和方向。

下一阶段——场景理解——帮助 ARCore 和 ARKit 理解几个特征点(a.k.a。稀疏点云)共面的位置——因此,让智能手机找出检测到的飞机的位置。

ARCore 的最后一个阶段是Light Estimation,ARKit 的最后一个阶段是Rendering (you don't even need to import SceneKit 因为 ARKit 包含所有必要的 SceneKit 类 – 检查这个)。

As you can see, there's no need for manufacturer to supply a smartphone with multiple RGB cameras or with Depth rear camera because just one RGB sensor with IMU sensor can do the job.