区域学习简介

来源:互联网 发布:淘宝客复制别人的商品 编辑:程序博客网 时间:2024/05/22 17:02

   


Area Learning

How it works

With Motion Tracking alone, the device tracks its movement and orientationthrough 3D space and tells you where it is and which way it’s facing, but itretains no memory of what it sees. Area Learning gives the device the abilityto see and remember the key visual features of a physical space—the edges,corners, other unique features—so it can recognize that area again later. To dothis, it stores a mathematical description of the visual features it hasidentified inside a searchable index on the device. This allows the device toquickly match what it currently sees against what it has seen before withoutany cloud services.

When a Tango device has learned an area, there are two key things itcan do to improve upon the information provided by Motion Tracking alone:

  1. Improve the accuracy of the trajectory by performing "drift corrections."

  2. Orient and position itself within a previously learned area by performing "localization."

怎么运行的

通过单独的运动跟踪,设备通过3D空间跟踪其运动和方向,并告诉您它在哪里以及它面对的方式,但它不会记住它看到什么。 区域学习使设备能够看到和记住物理空间的关键视觉特征 - 边缘,角落和其他独特的特征 - 以便以后再次识别该区域。为了这样,它存储其在设备上的可搜索索引内所识别的视觉特征的数学描述。 这使得设备可以快速匹配目前看到的与之前没有任何云服务。

当Tango设备已经学习了一个区域时,有两个关键的事情可以改进仅由运动跟踪提供的信息:

     通过执行“漂移校正”提高轨迹的准确性。

     通过执行“本地化”定位和定位在先前学习的区域内。

Improving the trajectory

As mentioned on the Motion Tracking Overview page, motionestimates become less accurate over time. The device corrects for some errorsby orienting itself to gravity, but errors in other aspects of its pose cannotbe detected through Motion Tracking alone.

With Area Learning turned on, the Tango device remembers the visualfeatures of the area it has visited and uses them to correct errors in itsunderstanding of its position, orientation, and movement. This memory allowsthe system to performdrift corrections (also called loop closures).When the device sees a place it knows it has seen earlier in your session, itrealizes it has traveled in a loop and adjusts its path to be more consistentwith its previous observations. These corrections can be used to adjust thedevice's position and trajectory within your application.

The illustration below shows an example of drift correction. As you beginwalking through an area, there are actually two different trajectoriesoccurring simultaneously—the path you are walking (the "real trajectory")and the path the device estimates that you are walking (the "estimatedtrajectory"). The green line is the real trajectory that the device istraveling; the red line shows how, over time, the estimated trajectory hasdrifted away from the real trajectory. When the device returns to the originand realizes it has seen the origin before, it corrects the drift errors andadjusts the estimated trajectory to better match the real trajectory.

改进轨迹

如“运动跟踪概述”页面所述,运动估计随时间变得不太准确。该装置通过将自身定向为重力来校正一些误差,但是其姿势的其它方面的误差可以通过单独的运动跟踪来检测。

在区域学习开启的情况下,Tango设备记住它所访问的区域的视觉特征,并且使用它们来在其对位置,取向和移动的理解中校正错误。该存储器允许系统执行漂移校正(也称为循环闭合)。当设备看到它在会话中早先已经看到的地方时,它实现它已经在循环中行进并且调整其路径以与其先前的观察更一致。这些校正可用于调整设备在应用程序中的位置和轨迹。

下图显示了漂移校正的示例。当你通过一个区域开始锻炼时,实际上有两个不同的轨迹同时发生 - 你正在行走的路径(“真实轨迹”)和设备估计你正在行走的路径(“估计轨迹”)。绿线是设备正在运行的真实轨迹;红线示出了估计轨迹随着时间的推移如何远离实际轨迹。当设备返回原点并且实现它已经看到原点时,其校正漂移误差并且调整估计的轨迹以更好地匹配真实轨迹。


Without drift correction, a game or application using a virtual 3D spacealigned with the real world may encounter inaccuracies in Motion Tracking afterextended use. For example, if a door in a game world corresponds with a doorframe in the real world, drift errors can cause the game door to appear in themiddle of the real-world wall instead of in the door frame.

没有漂移校正,使用与真实世界对准的虚拟3D空间的游戏或应用可能在后面的运动跟踪中遇到不准确的使用。例如,如果游戏世界中的门对应于真实世界中的门框,则漂移误差可以导致游戏门出现在现实世界墙的中间而不是门框中。

Area descriptions and localization

After you have walked through an area with Area Learning turned on, you cansave what the device has seen in an Area Description File (ADF). Learning anarea and loading it as an ADF has a number of advantages; for example, you canuse it to intentionally align the device's coordinate frame with a pre-existingcoordinate frame so that content in a game or app always appears in the samephysical location.

There are two ways to create an ADF. You can use any application that can savearea descriptions, including Tango Area Learning sample projects (see moreinformation aboutsample projects for C,Java, orUnity). Your second choice is to use the Tango APIs tohandle the learning, saving, and loading all within your application.

If you want to create a consistent experience within the same mapped space,such as having virtual objects appear in the same location as the last time theuser visited an area, you must performlocalization. This is a two-stepprocess:

  1. Load a previously saved ADF.

  2. Move the device into the area that was saved in the ADF.

When the device "sees" that it is in the area covered by the ADF, it instantlyknows where it is relative to the origin in the file (that is, the point whereoriginal learning started in the saved area)—this is localization.Without localizing to an area description, a device's starting point is lostevery time you end the session.

区域描述和本地化

在您浏览了启用区域学习的区域后,您可以保存设备在区域描述文件(ADF)中看到的内容。学习anarea并将其装载为ADF具有许多优点;例如,您可以使用它有意地将设备的坐标框架与预先存在的坐标框架对齐,以便游戏或应用程序中的内容始终显示在相同位置。

有两种方法来创建ADF。您可以使用任何可以保存描述的应用程序,包括Tango区域学习示例项目(请参阅有关C,Java或Uniity的示例项目的更多信息)。您的第二个选择是使用Tango API处理在您的应用程序中学习,保存和加载所有。

如果要在同一映射空间中创建一致的体验,例如使虚拟对象显示在用户上次访问某个区域时所在的位置,则必须执行本地化。这是一个两步过程:

    
加载以前保存的ADF。

    
将设备移动到保存在ADF中的区域。

当设备“看到”它在由ADF覆盖的区域中时,其立即知道它相对于文件中的原点(即,在保存的区域中开始的原点学习的点)在哪里 - 这是本地化。到区域描述,设备的起始点在结束会话的时间内丢失。

Usability tips

  • Tango devices depend on the visual diversity of the area to localize. If you are in an area with many identical rooms or in a completely empty room with blank walls, it is difficult to localize.

  • An environment can look quite different from different angles and positions, and can change over time (furniture can be moved around, lighting will be different depending on the time of day). Localization is more likely to succeed if the conditions at the time you localize are similar to the conditions that existed when the ADF was created.

  • Because environments can and do change, you might create multiple ADFs for a single physical location under different conditions. This gives your users the option to select a file that most closely matches their current conditions. You could also append multiple sessions onto the same ADF to capture visual descriptions of the environment from every position and angle and under every variation of lighting or environmental change.

Our UX Best Practices pagehas additional tips on creating ADFs and using Area Learning.

可用性提示

    
探测设备取决于区域的视觉多样性来本地化。如果你在一个有许多相同房间的区域或在一个完全空的房间与空白的墙壁,这是很难本地化。

    
环境可以看起来完全不同于不同的角度和位置,并且可以随时间改变(家具可以移动,照明将根据一天的时间而不同)。如果本地化时的条件与创建ADF时存在的条件相似,则本地化更有可能成功。

    
因为环境可以并且确实改变,您可以在不同的条件下为单个物理位置创建多个ADF。这使您的用户可以选择与其当前条件最匹配的文件。您还可以将多个会话附加到同一个ADF上,以从每个位置和角度以及每次变化的照明或环境变化下捕获环境的视觉描述。

我们的UX最佳实践页面有关创建ADF和使用区域学习的其他提示。

Common use cases

Multi-player experiences: Two or more users in the same physical locationshare an ADF through a cloud service and then localize to the samecoordinate frame. This allows multiple people to interact in the same physicalspace where all of their relative positions are known. The Tango APIsdo not natively support data sharing in the cloud, but you can implement thisthrough Google Cloud Storage and the Google Play Games API.

Location-aware shopping or other activities: A retail store manager makesan ADF of their store and then makes the ADF publicly available. Customers loadthe ADF, localize, and then use the device to navigate directly to productsthey are interested in.

Important: While saved area descriptions do not directly record images orvideo, the data can be reconstructed into viewable images. Therefore, toprotect the user's privacy, you must ask for permission before saving any oftheir learned areas to the cloud or sharing areas between users just as youwould with any other images or video.

Area Learning and using area descriptions are powerful features, and we’reexcited to see how developers use them to offer new user experiences.

常见用例

多玩家体验:在相同物理位置的两个或更多用户通过云服务来进行ADF,然后本地化到samecoordinate帧。这允许多个人在其所有相对位置都已知的相同物理空间中交互。Tango API本身不支持云中的数据共享,但您可以通过Google云端存储和Google Play游戏API实现。

位置感知的购物或其他活动:零售商店经理使他们的商店的ADF,然后使ADF公开。客户加载ADF,本地化,然后使用设备直接导航到产品,他们感兴趣。
重要:当保存的区域描述不直接记录图像或视频时,数据可以重建为可视图像。因此,保护​​用户的隐私,您必须要求许可,然后将任何其他学习区域保存到云或在用户之间共享区域,如同任何其他图像或视频。

区域学习和使用区域描述是强大的功能,我们希望了解开发人员如何使用它们提供新的用户体验。

Using learning mode and loaded ADFs

The behavior of some aspects of the Tango APIs will vary depending onyour settings for learning mode or whether you loaded an ADF.

In the table below, the two left columns specify whether you have learning modeon and whether you have loaded a previously stored ADF. You may ormay not be able to save an ADF depending on the status of thosetwo things. For example, if you don't have learning mode on, you cannot save anADF. If you have learning mode on and have loaded an ADF, youcan only save again after you have localized against the loaded ADF.

Also, if you aren't in learning mode and don't have an ADF loaded, you cannotget pose data using theTANGO_COORDINATE_FRAME_AREA_DESCRIPTIONframe of reference. If you have an ADF loaded, you can get pose data from thatframe of reference after the device localizes to the loaded ADF.

使用学习模式和加载的ADF

Tango API的某些方面的行为将根据学习模式的设置或是否加载了ADF而有所不同。

在下表中,左侧两列指定是否具有学习模式以及是否已加载先前存储的ADF。 您可能无法保存ADF,具体取决于这些事情的状态。例如,如果您没有启用学习模式,则无法保存ADF。 如果您已启用学习模式并装载了ADF,则只能在对加载的ADF进行本地化后再次保存。

此外,如果您没有处于学习模式并且没有加载ADF,您可以使用TANGO_COORDINATE_FRAME_AREA_DESCRIPTION参考框架来忽略姿势数据。如果您已加载ADF,您可以在设备本地化到加载的ADF之后从该参考帧获取姿势数据。


Is learning mode on?Is there an ADF loaded?Is pose data available for this frame of reference pair?Can you save an ADF?Start of service to deviceArea description to deviceArea description to start of serviceFalseFalseAvailable at startNot availableNot availableCannot save area description.TrueFalseAvailable at startAvailable at start*Available at start*Current area description saved with new UUID.FalseTrueAvailable at startAvailable after localizedAvailable after localizedCannot save area description.TrueTrueAvailable at startAvailable after localizedAvailable after localizedYou cannot save the area description until after you have localized against the loaded ADF.
When you save, it will create a new file with a new UUID.

*If tracking is lost, these frame of reference pairs will no longer beavailable. After service reset, the session functions as if learning mode isTrue and an ADF was loaded, where the area descriptions are those that werelearned up to the loss of tracking. To continue using the area descriptionframe of reference, you must localize against what you learned before the lossof tracking. You must also localize to include what you learned before trackingwas lost when saving an ADF.

*如果跟踪丢失,这些参考帧对将不再可用。服务重置后,会话的功能就像学习模式是True并且加载了ADF,其中区域描述是在丢失跟踪之前所描述的区域描述。 要继续使用参考区域描述框架,必须根据在lossof跟踪之前学习的内容进行本地化。您还必须本地化以包括您在保存ADF时失去跟踪之前学到的内容。

0 0
原创粉丝点击