是否可以像在Vuforia中那样在ARKit中跟踪对象? [英] Is it possible to track objects in ARKit like in Vuforia?

查看:209
本文介绍了是否可以像在Vuforia中那样在ARKit中跟踪对象?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我找不到Apple的ARKit是否像Vuforia一样支持3D对象跟踪(甚至图像跟踪)的任何信息.我不想将3D模型放置在世界上的任何地方.相反,我想检测特定的3D对象并将AR对象放在该对象的前面和顶部.

I couldn't find any information if Apple's ARKit supports 3D object tracking (or even image tracking) like Vuforia does. I don't want to place a 3D model just anywhere in the world. Instead I want to detect a specific 3D object and place AR objects in front and on top of that object.

简单的例子:我想在现实世界中追踪特定的玩具车,并在AR场景的顶部添加扰流器.

Simple example: I want to track a specific toy car in the real world and add a spoiler on top of it in the AR scene.

有人可以向我提供可能的信息吗?

Can someone provide me information wether that is possible or not?

推荐答案

iOS 12的更新:在"ARKit 2"中(在iOS 12或更高版本上为ARKit)...

Update for iOS 12: In "ARKit 2" (aka ARKit on iOS 12 or later)...

  • 图像检测已扩展到图像跟踪,因此多达四幅图像不会一次被检测到,即使它们相对于世界空间移动,每一帧也会更新实时".因此,您可以在玩具上附加一个可识别的2D图像,并使虚拟AR内容在屏幕上跟随该玩具.

  • Image detection is extended to image tracking, so up to four images don't just get detected once, they get updated "live" every frame even if they're moving relative to world space. So you can attach a recognizable 2D image to your toy, and have virtual AR content follow the toy around on-screen.

还有对象检测功能-在开发过程中,您可以使用一个ARKit应用程序扫描真实世界的3D对象并生成参考对象"文件.然后,您可以将该文件发送到您的应用中,并使用它在用户环境中识别该对象.这可能适合您的玩具车"情况...但是请注意,3D对象识别功能是检测功能,而不是跟踪功能:ARKit不会随着玩具车的移动而跟踪.

There's also object detection — in your development process you can use one ARKit app to scan a real-world 3D object and produce a "reference object" file. Then you can ship that file in your app and use it to recognize that object in the user's environment. This might fit your "toy car" case... but be aware that the 3D object recognition feature is detection, not tracking: ARKit won't follow the toy car as it moves.

有关详细信息,请参见关于ARKit 2的WWDC18演讲.

See the WWDC18 talk on ARKit 2 for details.

iOS 11.3的更新:在"ARKit 1.5"(iOS 11.3或更高版本上为ARKit)中,ARKit中有一项新的图像检测功能.如果您有已知的图像(例如海报或扑克牌等),则可以将其包含在Xcode项目中和/或从其他位置作为 ARImageAnchor 对象告诉你他们在哪里.

Update for iOS 11.3: In "ARKit 1.5" (aka ARKit on iOS 11.3 or later), there's a new image detection feature in ARKit. If you have a known image (like a poster or playing card or some such), you can include it in your Xcode project and/or load it from elsewhere as an ARReferenceImage and put it in your session configuration's detectionImages array. Then, when ARKit finds those images in the user environment, it gives you ARImageAnchor objects telling you where they are.

请注意,这与您从其他工具箱中看到的基于标记的AR"并不完全一样-ARKit仅找到一次参考图像,它不会告诉您它随着时间的推移如何变化.因此,这对于触发" AR内容体验(例如,您将手机指向商店中的《星球大战》海报并将角色从中走出来的促销活动)是有益的,但不适用于虚拟角色保持附着状态的AR桌游来玩游戏.

Note that this isn't quite like the "marker-based AR" you see from some other toolkits — ARKit finds a reference image only once, it doesn't tell you how it's moving over time. So it's good for "triggering" AR content experiences (like those promos where you point your phone at a Star Wars poster in a store and a character walks out of it), but not for, say, AR board games where virtual characters stay attached to game pieces.

否则...

可以访问每个捕获的ARFrame中的相机图像,因此,如果您有其他软件可以帮助完成此类任务,则可以将其与ARKit结合使用.例如,视觉框架(也是iOS 11中的新功能)提供了一些此类构建模块任务-您可以检测条形码并找到它们的四个角,然后在手动识别图像中的感兴趣区域后,跟踪其在帧之间的移动.

It is possible to access the camera image in each captured ARFrame, so if you have other software that can help with such tasks you could use them in conjunction with ARKit. For example, the Vision framework (also new in iOS 11) offers several of the building blocks for such tasks — you can detect barcodes and find their four corners, and after manually identifying a region of interest in an image, track its movement between frames.

这篇关于是否可以像在Vuforia中那样在ARKit中跟踪对象?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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