iOS augmented reality with compass and location(带有指南针和位置的 iOS 增强现实)
问题描述
我正在尝试开发一个迷你Around Me",例如使用相机、指南针和位置.我想在我的屏幕上显示地点的图像.目前我有我的位置和我的指南针方向.我想知道如何确定我想展示的地方的位置.
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.
感谢您的帮助;)
推荐答案
一旦你有了相对距离和方位,你可以使用 this page,确定已知坐标相对于已知视点的位置基本上是透视投影,这篇维基百科文章中概述了数学.相机的旋转由指南针给出,倾斜由加速度计给出(位置当然是GPS).
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 增强现实的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:带有指南针和位置的 iOS 增强现实
- android 4中的android RadioButton问题 2022-01-01
- MalformedJsonException:在第1行第1列路径中使用JsonReader.setLenient(True)接受格式错误的JSON 2022-01-01
- 用 Swift 实现 UITextFieldDelegate 2022-01-01
- 在测试浓缩咖啡时,Android设备不会在屏幕上启动活动 2022-01-01
- 使用自定义动画时在 iOS9 上忽略 edgesForExtendedLayout 2022-01-01
- Android - 我如何找出用户有多少未读电子邮件? 2022-01-01
- Android viewpager检测滑动超出范围 2022-01-01
- 想使用ViewPager,无法识别android.support.*? 2022-01-01
- 如何检查发送到 Android 应用程序的 Firebase 消息的传递状态? 2022-01-01
- Android - 拆分 Drawable 2022-01-01