增强现实运动

发布于 2024-10-15 12:49:50 字数 320 浏览 3 评论 0原文

大家好,我遇到了与增强现实相关的问题,请帮助

问题

我需要在相机覆盖层上显示任何运动物体的标签,例如

我有 4 个物体,比如四个方向的四个房子,即南北东西向,当我向北看时,我应该能够看到该房子的唯一一个标签,

该标签上会有一些信息,比如房子名称,所以

  1. 当我向南方向移动时该怎么做,北标签应该开始移到一边,南标签应该开始出现在屏幕上

我仍然完成的解决方案

当我看到北时,我能够显示所有四个带有信息的标签(但我只能显示一个)

Hey guys i am in a problem related to augmented reality please help

PROBLEM

I need to show the label on camera overlay for any object with movement for example

i have 4 object say four house in four direction i.e. south north east west and when i see to north i should be able to see the only single label for that house

on that label there will be some information say house name so how to do it

  1. when i move to south direction north label should start move aside and south label should start to come on the screen

Solution that i have done still

when i see to north i am able to show the all four label with information( but i beed to display only one)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

别低头,皇冠会掉 2024-10-22 12:49:50
  1. 使用 Google 地理编码 API http://itouchmap.com/latlong.html 获取每个对象的坐标,或任何其他方式。
  2. 从位置管理器获取航向更新。
  3. 使用 atan 计算从您的位置到每个物体的位置的角度。如果你用谷歌搜索增强现实 atan,你会发现这个方法,但这只是高中数学。
  4. 找到相机的视野。对于 iPhone 3,该角度为 35.5 和 53。
  5. 如果您的航向周围的水平角度为 35.5/2 度,则显示该对象。
  6. 对于同一城市或更近的地面上的物体,您可以忽略高度和地球的弧度。

要移动对象,您需要将屏幕的像素数除以视野角度之间的像素数,以获得每度的像素数,并将其乘以对象距航向的偏移量。

这是很简单的事情,所以我编写了一个示例项目。它不是一个图书馆,重点是告诉你从哪里开始。从那里你应该检查 github 上的现有库(基本上是arkit)并提出更具体的问题。

  1. Get a coordinate for each object using http://itouchmap.com/latlong.html, google's geocoding API, or any other means.
  2. Get heading updates from the location manager.
  3. Calculate the angle from your position to the position of each object using atan. You will find this method if you google augmented reality atan, but it's only highschool math.
  4. Find the field view of your camera. For the iPhone 3 it is 35.5 and 53.
  5. If your angle is 35.5/2 degrees horizontally around your heading, then show the object.
  6. For objects on the ground in the same city or closer you can disregard the altitude and the arc of the earth.

To move the object around you need to divide the number of pixels of the screen between the degrees of the field view to get pixels per degree, and multiply that by the offset of the object from your heading.

This is easy stuff so I wrote an example project. It is not a library, the point is to show you where to start. From there you should check existing libraries on github (arkit basically) and make more specific questions.

生生漫 2024-10-22 12:49:50

查看本教程:http://www.pressivecode.com/blog/archives/1435
我发现它非常有用。我试图实现一个演示,有点像这个 iPhone 应用程序: http://www.acrossair.com/ acrossair_app_augmented_reality_browser_for_iPhone_3GS.htm

这是您需要的吗?

Check out this tutorial: http://www.invasivecode.com/blog/archives/1435
I found it very useful. I was trying to implement a demo, sort of like this iPhone app: http://www.acrossair.com/acrossair_app_augmented_reality_browser_for_iPhone_3GS.htm

Is it what you need?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文