如何在ARKit中检测垂直平面? [英] How to detect vertical planes in ARKit?

查看:157
本文介绍了如何在ARKit中检测垂直平面?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何实现垂直平面检测(例如,对于墙壁)?

How is it possible to implement a vertical plane detection (i.e. for walls)?

let configuration = ARWorldTrackingSessionConfiguration()
configuration.planeDetection = .horizontal //TODO

推荐答案

编辑:自ARKit 1.5(iOS 11.3)开始支持此功能.只需使用.vertical.我出于历史目的将下面的帖子保留在下面.

This is now supported as of ARKit 1.5 (iOS 11.3). Simply use .vertical. I have kept the previous post below for historical purposes.

垂直平面检测还不是ARKit中存在的功能. .horizontal表示该功能可能正在开发中,将来可能会添加.如果它只是一个布尔值,则表明它是最终值.

Vertical plane detection is not (yet) a feature that exists in ARKit. The .horizontal suggests that this feature could be being worked on and might be added in the future. If it was just a Boolean value, this would suggest that it is final.

我在WWDC17与苹果工程师的对话证实了这种怀疑.

This suspicion was confirmed by a conversation that I had with an Apple engineer at WWDC17.

您可能会争辩说,为此创建一个实现将很困难,因为垂直平面比水平平面有更多的方向,但是正如 rodamn 所说,情况可能并非如此

You could argue that creating an implementation for this would be difficult as there are infinitely many more orientations for a vertical plane rather than a horizontal one, but as rodamn said, this is probably not the case.

来自该死的评论: 最简单地说,一个平面被定义为三个共面点.一旦沿曲面(垂直,水平或任意角度)检测到足够的共面特征,便有了曲面候选.只是水平法线将沿着上/下轴,而垂直法线将平行于地平面.面临的挑战是,未经装饰的石膏板往往几乎不会产生视觉特征,而平原墙经常可能无法被检测到.我强烈怀疑这就是为什么.vertical功能尚未发布的原因.

From rodamn’s comment: At its simplest, a plane is defined to be three coplanar points. You have a surface candidate once there are sufficient detected coplanar features detected along a surface (vertical, horizontal, or at any arbitrary angle). It's just that the normal for horizontals will be along the up/down axis, while vertical's normals will be parallel to the ground plane. The challenge is that unadorned drywall tends to generate few visual features, and plain walls may often go undetected. I strongly suspect that this is why the .vertical feature is not yet released.

但是,有一个与此相反的论点.有关更多信息,请参见 rickster 的评论.

However, there is a counter argument to this. See comments from rickster for more information.

这篇关于如何在ARKit中检测垂直平面?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆