About Augmented Reality and ARKit(翻译)

Discover supporting concepts, features, and best practices for building great AR experiences.

为了构建好的AR体验,发现支持的概念,特征和好的例子.

Overview
总栏
Figure 1
场景1


The basic requirement for any AR experience—and the defining feature of ARKit—is the ability to create and track a correspondence between the real-world space the user inhabits and a virtual spaceconventionwhere you can model visual content.

  • 体验任何AR所需要的基本需求和ARKit已确定的特性是创建基本的AR模型和追踪模型和用户行为的基础.

When your app displays that content together with a live camera image, the user experiences augmented reality: the illusion that your virtual content is part of the real world.

  • 当你的app把摄像头和用户自己的东西一起显示,就会产生你虚拟的东西是现实世界的一部分的错觉,.

In all AR experiences, ARKit uses world and camera coordinate systems following a right-handed convention: the y-axis points upward, and (when relevant) the z-axis points toward the viewer and the x-axis points toward the viewer's right.

  • 在所有的AR体验中,ARKit使用的显示世界和摄像头的坐标系遵循右手定则:y轴向上,
    z轴直线观察者,x轴指向观察者的右侧

Session configurations can change the origin and orientation of the coordinate system with respect to the real world (see worldAlignment).

  • 原始的坐标和方向是遵从现实世界的,可以通过会话配置更改,(参考 worldAlignment).

Each anchor in an AR session defines its own local coordinate system, also following the right-handed, z-towards-viewer convention; for example, the ARFaceAnchor class defines a system for locating facial features..
-每个在AR会话中的锚点都遵循它自己的坐标系统,并且准守右手定制和z轴指向观察者的惯例,例如ARFaceAnchor 就是一个定义面部特征的类.

  • How World Tracking Works
    现实追踪如何工作

To create a correspondence between real and virtual spaces, ARKit uses a technique called visual-inertial odometry.

  • ARKit 使用一项视觉惯性测试的技术来创建现实世界和虚拟空间的对应.

This process combines information from the iOS device’s motion sensing hardware with computer vision analysis of the scene visible to the device’s camera.
-进程采集iOS运动传感器硬件和从设备摄像图采集的影像做分析.

ARKit recognizes notable features in the scene image, tracks differences in the positions of those features across video frames, and compares that information with motion sensing data.

  • ARKit能识别图像中的显著特征,识别视频每帧中这些特征的不同,并且把这些信息和运动传感器数据比较.

The result is a high-precision model of the device’s position and motion.
-结果是一个高精度的位置和运动的模型

World tracking also analyzes and understands the contents of a scene.
-现实追踪也分析和理解场景中的内容.

Use hit-testing methods (see the ARHitTestResult class) to find real-world surfaces corresponding to a point in the camera image.
-使用击中测试方法可以找到显示世界的面对应相机照片上的一个点.

If you enable the [planeDetection](apple-reference documentation://hswVcas8JL) setting in your session configuration, ARKit detects flat surfaces in the camera image and reports their position and sizes.

  • 如果你在会话配置中打开planeDetection设置,ARKit就会检测相机影像里面的平面表面并输出他们的位置和尺寸.

You can use hit-test results or detected planes to place or interact with virtual content in your scene.
-你可以使用击中测试结果或检测平面或者和场景的虚拟内容交互.

  • Best Practices and Limitations
  • 练习和局限性

World tracking is an inexact science.

  • 现实追踪是一个不精确的科学.

This process can often produce impressive accuracy, leading to realistic AR experiences.
-可以经常产生印象深刻的现实AR的体验.

However, it relies on details of the device’s physical environment that are not always consistent or are difficult to measure in real time without some degree of error.
-然后,它依赖于设置的物理环境并不是一直可靠的,或很困难测试和真实情况的一个错误的程度.

To build high-quality AR experiences, be aware of these caveats and tips.
-为了构建高质量的AR体验,记住这些注意事项和提示.

Design AR experiences for predictable lighting conditions.
-为不同灯光条件设计AR体验.

World tracking involves image analysis, which requires a clear image.
-现实追踪涉及图像分析,且需要一个清晰的图像.

Tracking quality is reduced when the camera can’t see details, such as when the camera is pointed at a blank wall or the scene is too dark.
-当摄像头拍不清楚时,例如摄像头指向一个黑色的墙或者场景太黑,追踪的质量就会降低.

Use tracking quality information to provide user feedback.
-使用追踪质量信息来提供用户反馈

World tracking correlates image analysis with device motion.
-现实追踪把设备运动关联到图像分析

ARKit develops a better understanding of the scene if the device is moving, even if the device moves only subtly.
-ARKit对设备在移动/甚至巧妙的场景开发出一个更好的理解.

Excessive motion—too far, too fast, or shaking too vigorously—results in a blurred image or too much distance for tracking features between video frames, reducing tracking quality.

  • 过多的运动例如太远/太快/晃的太大力会导致模糊的影像,两视频帧之前距离太远也会降低追踪质量.

The ARCamera class provides tracking state reason information, which you can use to develop UI that tells a user how to resolve low-quality tracking situations.
-ARCamera类提供是追踪状态的原因信息,可以用在界面上显示帮助用户知道怎么解决低质量的追踪状态.

Allow time for plane detection to produce clear results, and disable plane detection when you have the results you need.
-允许一定时间检测平面来生产清晰的结果,并且获得到你想要的结果后可以关闭平面检测.

Plane detection results vary over time—when a plane is first detected, its position and extent may be inaccurate.
-平面检测有时会变化的,当首次检测平面时,它的位置和扩展可能不准确

As the plane remains in the scene over time, ARKit refines its estimate of position and extent.
-随着时间的推移平面一直存在,ARKit会估算位置和扩展.

When a large flat surface is in the scene, ARKit may continue changing the plane anchor’s position, extent, and transform after you’ve already used the plane to place content.
-当场景中有一个大的平面表现,ARKit会在你已经使用的平面放在内容后也会更改平面锚点的位置/扩展/方向.

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 202,607评论 5 476
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 85,047评论 2 379
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 149,496评论 0 335
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 54,405评论 1 273
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 63,400评论 5 364
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 48,479评论 1 281
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 37,883评论 3 395
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 36,535评论 0 256
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 40,743评论 1 295
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 35,544评论 2 319
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 37,612评论 1 329
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 33,309评论 4 318
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 38,881评论 3 306
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 29,891评论 0 19
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 31,136评论 1 259
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 42,783评论 2 349
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 42,316评论 2 342

推荐阅读更多精彩内容