我可以使用ARKit一次跟踪多于4张图像吗? [英] Can I track more than 4 images at a time with ARKit?

查看:188
本文介绍了我可以使用ARKit一次跟踪多于4张图像吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

开箱即用很明显,ARKit不允许一次跟踪超过4张图像. (您可以跟踪"更多的标记,但一次只能运行4个).参见

Out of the box it's pretty clear ARKit doesn't allow for the tracking of more than 4 images at once. (You can "track" more markers than that but only 4 will function at a time). See this question for more details on that.

但是,我想知道是否有可能的解决方法.诸如在计时器上添加和删除锚点或获取位置信息,然后在不使用ARKit的情况下显示相应模型之类的东西.我对Swift的了解非常有限,因此我还没有进行过很多运气的实验.任何在正确方向上的建议或指示都会有所帮助.

However, I'm wondering if there is a possible work-around. Something like adding and removing anchors on a timer or getting the position information and then displaying the corresponding models without ARKit, etc. My knowledge of Swift is fairly limited so I haven't had much luck experimenting yet. Any suggestions or pointers in the right direction would be helpful.

相比之下,根据文档,Android的ARCore的上限为20 .我还亲自测试了基于Web的库,这些库在iPhone上跟踪了4个标记.我也相信我在某处读到,任天堂DS的某些变体可以跟踪4个以上的标记.由于硬件限制,这是不可能的.

By comparison ARCore for Android has a limit of 20 according to the documentation. I've also personally tested web based libraries tracking over 4 markers on an iPhone. I also believe I read somewhere that some variation of the Nintendo DS was able to track more than 4 markers. There is no way this isn't feasible because of hardware limitations.

推荐答案

目前,ARKit 3.0中没有解决办法,可以使用 4 个图像会话的ARImageTrackingConfiguration()中的>子类.我应该说,尽管在ARKit 3.0中一个场景中跟踪的图像总数最多可以达到100个,但这种限制仍然有效.

At the moment there's no workaround in ARKit 3.0 to simultaneously track more than FOUR images using ARImageAnchor subclass inside session's ARImageTrackingConfiguration(). I should say that this limitation works despite the fact that the total number of tracked images in a scene can be up to 100 in ARKit 3.0.

如果选择 Jump to Definition 选项,则可以阅读 ARConfiguration 类中的注释.

You can read comments in ARConfiguration class if you choose Jump to Definition option.

我认为此功能并非偶然地受到Cupertino软件工程师的限制. ARImageAnchor子类继承自ARAnchor父类,并符合 ARTrackable 协议,因此它不仅可以跟踪静态图像,还可以跟踪运动图像(例如汽车车身上的徽标).因此,如果您跟踪多于4张图像 –它占用大量CPU/GPU(这是消耗手机电池最臭名昭著的事情),则导致设备必须检测并跟踪多个不同的对象.

I believe this feature was limited by Cupertino software engineers not occasionally. ARImageAnchor subclass inherits from ARAnchor parent class and conforms to ARTrackable protocol, so it tracks not only static images but moving images as well (like a logo on a car's body). Hence, if you track more than 4 images – it's highly CPU/GPU intensive (the most notorious thing for draining phone's battery), cause your device must detect and track several different objects.

我想可以使用更新的 ARKit 4.0 版本同时跟踪超过4张图像,该版本可以在功能强大的 5nm devices 上运行,例如iPhone 12,我们会在今年秋天看到.

I suppose it will be possible to simultaneously track more than 4 images with a newer ARKit 4.0 version that can be run on considerably powerful 5nm devices, like iPhone 12, that we'll see this fall.

因此,Apple软件工程师为了获得强大的AR体验而牺牲了应用程序功能.

Thus, Apple software engineers sacrificed apps functionality for the sake of a robust AR experience.

PS

将ARCore与ARKit进行比较是不正确的,因为即使这些框架具有相似的基本原理,例如 World Tracking 场景理解 渲染 阶段.而且除了上述内容外,我还应该说ARCore比ARKit具有更适度的功能,这使ARCore在CPU计算上更轻便"(尽管我知道最后一句话听起来很主观).

It is incorrect to compare ARCore with ARKit, 'cause these frameworks work differently inside, even though they have similar fundamental principles – like World Tracking, Scene Understanding and Rendering stages. And in addition to the above, I should say that ARCore has more modest functionality than ARKit, which makes ARCore more "lightweight" for CPU calculations (although I understand that the last phrase sounds very subjective).

这篇关于我可以使用ARKit一次跟踪多于4张图像吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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