相机覆盖随方位和仰角变化 [英] camera overlay change with bearing and elevation

查看:17
本文介绍了相机覆盖随方位和仰角变化的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

伙计们,

我正在尝试获取如下图所示的实用程序.基本上,相机显示窗口覆盖了设备屏幕的一部分,并且通过曲线或直线连接的点列表作为覆盖显示在相机视图上.我知道这可以使用石英来绘制,但这还不到我问题的一半.

I am trying to get a utility as shown in the picture below. Basically the camera display window covers part of the device's screen and a list of points that are connected by a curve or straight line are presented over the camera view as an overlay. I understand this can be drawn using quartz but this is less than half of my problem.

真正的问题是,随着方位和高度的变化,叠加层应该呈现不同的点.

The real issue is that the overlay should present different points as the bearing and elevation changes.

例如:

  • 如果方位必须改变 +5 度和仰角 +2 度,则 PT1 将靠近相机视图的右边缘,PT2 也会移动右侧,PT3 将可见.
  • 另一个将方位角改变 +10 度的移动会使 PT1 不可见,PT2 位于右侧,PT3 居中,PT4 位于相机视图的左边缘.
  • if the bearing has to change +5 degrees and elevation +2 degrees, then PT1 will be next to the right edge of the camera view, PT2 will also move to the right and PT3 will be visible.
  • Another movement that changes the bearing +10 degrees would make PT1 not visible, PT2 at the right, PT3 middle and PT4 on the left edge of the camera view.

图片后我的问题:

  1. 是否有可能拥有一个远大于相机视图大小的视图(如下所示)并在方位/仰角变化时使用一些方法(我需要研究这些)来移动视图?推荐的性能是否明智?
  2. 石英是通往这里的路吗?我还需要什么(当然还有用于相机和核心定位/运动的 AVFoundation)?由于我的应用程序只有 iOS 7,因此我可以使用 iOS 7 独有的任何新方法/API.
  3. 除了 raywendelrich 的教程增强现实游戏,您知道有哪些教程可以帮助我完成这项工作吗?
  1. Is it possible to have a view that is substantially larger than the size of the camera view (as shown below) and use some methods (I need to research these) to move the view when bearing/elevation changes? Is it recommended performance wise?
  2. Is quartz the way to go here? What else do I need (other then of course AVFoundation for the camera and corelocation/motion)? Since my application is only iOS 7 I can use any new methods/APIs exclusive to iOS 7.
  3. Aside from raywendelrich's tutorial on the augmented reality game, are there any tutorials that you know of that could help me with this endeavor?

推荐答案

看看下面的内容,每篇文章或链接都有不同的关键内容来制作您的最终产品.您最终将使用地理定位、指南针/或 iphone 的陀螺仪数据的组合.

Have a look at the following, each article or link has different key things required to make your final product. You eventually will be using a combination of geolocation, the compass/or the iphone's gyroscope data coming in.

阅读所有组合的参考并在不同的项目中一一实现它们将为您提供一个坚实的起点,让您了解如何将它们组合在一起以创建您的应用程序.但首先,您需要对如何运用所学知识以及如何将其应用于创建项目有一个扎实的了解.

Reading all the references combined and implementing them one by one in different projects will give you a solid start on how to then combine it all together to create your application. But first you need to get a solid understanding on how to manipulate the knowledge you will learn and how you can then apply it to create your project.

参考资料:

Ray Winderlech 的一个很酷的项目教你如何在应用程序中使用位置 gps 坐标

A cool project from Ray Winderlech teach you how to use location gps coordinates in your application

接下来的两个链接向您展示如何获取陀螺仪数据以找出俯仰、偏航和旋转,并找出设备在空间中的当前位置.

The next two links show you how to grab gyroscope data to find out the pitch, yaw and rotation and find out the device current position in space.

会教你如何使用指南针

这里有一些关于在相机视图上叠加东西的增强现实

Here's some more augmented reality stuff on overlaying stuff on the camera view

这篇关于相机覆盖随方位和仰角变化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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