简体   繁体   English

android 360相机应用

[英]android 360 camera app

I have been tasked with making an app which places an image in the world around the device and the user has to use the camera to look around and find the image/object. 我的任务是制作一个可在设备周围的世界中放置图像的应用程序,用户必须使用相机环顾四周并找到图像/对象。 It should give off a sound as the user looks in the correct direction, to aid them in finding it. 当用户朝正确方向看时,它应该发出声音,以帮助他们找到声音。

I was wondering if anybody could point me in the right direction with how to go about something like this. 我想知道是否有人可以指出正确的方向,以解决类似问题。

In order to achieve what you want you will need some knowledge in OpenGl ES Android . 为了实现您想要的目标,您将需要一些有关OpenGl ES Android的知识。 If you don't have any then I suggest you follow this Android OpenGl ES course . 如果您没有,那么我建议您按照Android OpenGl ES课程学习 It'll give you the basics on how to create an Object in a 3D world. 它将为您提供有关如何在3D世界中创建对象的基础知识。

To get the camera preview as a background of the 3D world I suggest you Vuforia library (go to the Getting Started with Eclipse (Java/C++) on Android section). 要获得作为3D世界背景的相机预览,建议您使用Vuforia库(转到Android上的Eclipse入门(Java / C ++)部分)。 This library is intended for Augmented Reality but it will help you get the camera preview as a background simply (it really is a pain in the ass to do it). 该库旨在用于增强现实,但它可以帮助您简单地将相机预览作为背景(这样做实在是一件痛苦的事情)。

Basically you will : 基本上,您将:

  • create a GLSurfaceView in which you will create the image the user will search (in a 3D environment), 创建GLSurfaceView ,您将在其中创建用户要搜索的图像(在3D环境中),
  • create your object / image, 创建您的对象/图像,
  • set the camera preview as background (take a look at Vuforia samples), 将相机预览设置为背景(看看Vuforia示例),
  • Move the object depending on the accelerometer (in order to "fix" the object in the reality). 根据加速度计移动对象(以“固定”现实中的对象)。
  • Finally depending on the distance play a sound. 最后根据距离播放声音。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM