热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

iPhone3GS和UIView增强现实感-AugmentedRealitywithiPhone3GSandUIView

IamexperimentingabitwiththeiPhone3GSanditsmagneticsensors.Itisquitesimpletogetthe

I am experimenting a bit with the iPhone 3GS and its magnetic sensors. It is quite simple to get the heading and the angle of the north pole seen from the top of the device. Also getting the position of the device itself via accelerometer is quite easy. But getting it all together deserves some math knowledge regarding vector calculations I guess.

我正在试验iPhone 3GS及其磁传感器。从设备顶部看到的北极的航向和角度非常简单。通过加速度计获得设备本身的位置非常容易。但是我总结得到所有关于矢量计算的数学知识。

So what I am interested in is a quite simple way to do those calculations and apply them to an UIView that I put into my camera overlay. For example I would like to fixate a UIView at the north pole on the horizon. This should also work when I tilt and rotate the device. Great would also be if a 'transform' could be applied to the UIView so it is rotated to always show up.

所以我感兴趣的是一种非常简单的方法来进行这些计算并将它们应用到我放入相机叠加层的UIView中。例如,我想在地平线上的北极处固定一个UIView。当我倾斜和旋转设备时,这也应该有效。如果'变换'可以应用于UIView,那么它也会很好,所以它会被旋转以便始终显示出来。

Another thing which would be needed might be to get the correct relations between the camera view field and the object coordinates. If these match exactly in theory the object should stick and overlay always the same objects in reality if the person does not move.

另一件需要的可能是获得摄像机视野和物体坐标之间的正确关系。如果这些在理论上完全匹配,那么如果人不移动,物体应该粘在一起并且实际上覆盖实际上相同的物体。

Any samples? Any ideas? Any code not using OpenGL ;) Thanks.

有样品吗?有任何想法吗?任何不使用OpenGL的代码;)谢谢。

1 个解决方案

#1


5  

Might want to take a look at ARKit.

可能想看看ARKit。


推荐阅读
author-avatar
浅浅的醉意_942_932
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有