我们如何创建标记?我们可以用它来通过增强现实获取相机视图中显示的建筑物的位置吗?

发布于 2024-11-01 21:34:12 字数 90 浏览 6 评论 0原文

我对增强现实概念很陌生。 可以使用标记来获取相机视图中显示的对象的位置。 实际上我想要的应用程序是: 应用程序启动时,相机启动,然后显示相机视图中显示的建筑物的位置。

I am new in this Augmented Reality concept.
Can markers be used to get position of the object shown in Camera view.
Actually the app i want to is:
On start of the application Camera start and then it shows the location of the building which is shown in the Camera view .

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

幻梦 2024-11-08 21:34:12

您必须熟悉方向和磁性传感器以及相机的视角。有些东西从 3.0 开始就被弃用了。

从方向和磁传感器中,您可以获得方位角、俯仰角和横滚角值。使用这些值,您必须绘制标记。
所有方位角值均相对于真北,因此您需要从 Location.bearingTo() 方法计算方位角。

现在您已经从传感器获得了方位角、俯仰角和横滚角值,您可以在相机 SurfaceView 上放置标记。使用画布在表面视图上绘制标记,并根据传感器的新值更新标记。就这样。

现在,如果您有经纬度和建筑物的经纬度,只需计算方位角值并绘制标记...

Somethings you have to get acquainted with are the Orientation and Magnetic sensors, the angle of view of the camera. Some things are deprecated from 3.0 onwards.

from the orientation and magnetic sensors you get the azimuth, pitch and roll values. With these values you have to plot your markers.
All the azimuth values are with respect to true North, so you need to calculate your the azimuth angle from Location.bearingTo() method.

Now that you have the azimuth, pitch and roll values from your sensors, you can place markers on your Camera SurfaceView. Draw your markers using a canvas on a surface view and update your markers according to the new values from the sensors. thats all.

Now if you have your latitude-longitude and the building's lat-long, just calculate the azimuth values and plot the markers...

≈。彩虹 2024-11-08 21:34:12

传统的基准标记只能读取其宽度/高度的约 10 倍,因此如果您想使用标记来确定远处的建筑物,它们必须很大。自然特征标记可以在更远的距离处读取,但对于建筑物等项目,困难在于特征描述符会随着尺度(距建筑物的距离)而发生巨大变化。

听起来像是想向人们展示一处(对用户而言)未知的建筑物在哪里?在这种情况下,要求它位于视图中(因此仅取决于计算机视觉)似乎是有限制的:这里的典型方法是确定相机位置和方向(例如使用传感器),然后将建筑物的已知 3D 坐标投影到那个观点。

Traditional fiducial markers can only be read to ~10x their width/height, so if you wanted to use markers to determine a building from far away they'd have to be huge. Natural feature markers can be read at further distances, but for items like buildings the difficulty is the feature descriptors change drastically with scale (distance from the building).

It sounds like to want to show people where an unknown (to the user) building is? In that case requiring it be in the view (so depending on computer vision alone) seems restrictive: the typical approach here is to determine the camera position and orientation (e.g. using sensors), and then project the known 3D coordinates of the building in to that view.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文