iOS通过指南针和位置增强了现实感 [英] iOS augmented reality with compass and location

查看:279
本文介绍了iOS通过指南针和位置增强了现实感的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试开发一个迷你的我身边,比如使用相机,指南针和位置。我想在我的屏幕上显示地方的图像。
目前我有我的位置和我的方向与指南针。

感谢您的帮助;)

我想知道如何确定我要显示的地点的位置。一旦你有相对的距离和方位,你可以使用在,找出一个已知坐标与已知视点的关系,基本上是一个透视投影,数学是概述于这篇维基百科文章。相机的旋转由指南针给出,而加速度计的倾斜(当然是GPS的位置)。

我试图找到更好的文档 - 有一些额外的东西需要考虑 - 比如相机参数等,但这是一个很好的起点。



如果它太过参与(例如,对旋转矩阵不满意),我们可以将其分解为简单的三角形。


I'm trying to develop a mini "Around Me" like using camera, compass and location. I would like to display place's images on my screen. For the moment I have my location and my orientation with compass. I would like to know how can I determine the position of the place I want to display.

Thanks for your help ;)

解决方案

Once you have relative distance and bearing, which you can determine from two points in the same coordinate space using algorithms found on this page, figuring out where a known coordinate is with respect to a known viewpoint is basically a perspective projection, the math is outlined on this Wikipedia article. The rotation of the camera is given by the compass, and the tilt by the accelerometer (the position is of course, GPS).

I'm trying to find a better document - there are a couple of extra things to consider - like the camera parameters etc, but this is a good starting point.

If it's too involved (like if you're not comfortable with rotation matrices) we can break it right down to the simple trig.

这篇关于iOS通过指南针和位置增强了现实感的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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