准确测量一组基准之间的相对距离(增强现实应用) [英] Accurately measuring relative distance between a set of fiducials (Augmented reality application)

查看:316
本文介绍了准确测量一组基准之间的相对距离(增强现实应用)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

假设我有一组5个标记。我尝试使用增强现实框架(例如方法,找到最适合您所有数据的转换。如果你想要的是标记之间的距离,这只是测量的距离的平均值。



假设你的标记位置是固定的(例如,身体),你想要他们的相对位置,那么你可以简单地记录他们的位置和平均。如果存在将某个标记与另一个标记混淆的可能性,则可以逐帧跟踪它们,并使用两个标记之间的连续性来确认其身份。



如果你期望你的刚体移动(或如果身体不是刚性,等等),那么你的问题是相当难。两个标记一次不足以固定刚体的位置(这需要三个)。但是,请注意,在每次转换时,您几乎同时拥有旧标记,新标记和连续标记的位置。如果您的每个标记已在身体上有预期位置,则应该每20帧提供一个刚性姿势的良好估计。



一般来说,如果您的身体移动,最佳性能将需要某种模型的动力学,其应该用于跟踪其随时间的姿势。根据动态模型,您可以使用卡尔曼滤波器进行跟踪;卡尔曼滤波器非常适合整合您描述的数据类型。



通过将标记的位置包括在卡尔曼状态向量中,您可以能够从纯传感器数据(这似乎是您的目标)推导出它们的相对位置,而不是先验地要求该信息。如果你想要能够有效地处理任意数量的标记,你可能需要提出一些聪明的突变常用的方法;您的问题似乎是为了避免常规分解方法(例如连续卡尔曼滤波)而解决。








如果您的标记产生完整的3D姿势(而不仅仅是3D位置),额外的数据将使您更容易保持跟踪的对象的准确信息。但是,上述建议仍然适用:




  • 如果标记的正文是固定的,请使用所有相关帧数据的最小二乘法拟合。 / li>
  • 如果标记的正文正在移动,请建模其动力学并使用卡尔曼滤波器。






  • 尝试管理一系列相对转换可能不是解决问题的最佳方法;正如你所说,它容易累积错误。

  • 特别是,最小二乘法拟合应该能很好地与链或环的相对姿势。

  • 无论如何,对于最小二乘法拟合或卡尔曼滤波器跟踪,对测量的不确定性的良好估计将提高性能。 li>

Let's say I have a set of 5 markers. I am trying to find the relative distances between each marker using an augmented reality framework such as ARToolkit. In my camera feed thee first 20 frames show me the first 2 markers only so I can work out the transformation between the 2 markers. The second 20 frames show me the 2nd and 3rd markers only and so on. The last 20 frames show me the 5th and 1st markers. I want to build up a 3D map of the marker positions of all 5 markers.

My question is, knowing that there will be inaccuracies with the distances due to low quality of the video feed, how do I minimise the inaccuracies given all the information I have gathered?

My naive approach would be to use the first marker as a base point, from the first 20 frames take the mean of the transformations and place the 2nd marker and so forth for the 3rd and 4th. For the 5th marker place it inbetween the 4th and 1st by placing it in the middle of the mean of the transformations between the 5th and 1st and the 4th and 5th. This approach I feel has a bias towards the first marker placement though and doesn't take into account the camera seeing more than 2 markers per frame.

Ultimately I want my system to be able to work out the map of x number of markers. In any given frame up to x markers can appear and there are non-systemic errors due to the image quality.

Any help regarding the correct approach to this problem would be greatly appreciated.

Edit: More information regarding the problem:

Lets say the realworld map is as follows:

Lets say I get 100 readings for each of the transformations between the points as represented by the arrows in the image. The real values are written above the arrows.

The values I obtain have some error (assumed to follow a gaussian distribution about the actual value). For instance one of the readings obtained for marker 1 to 2 could be x:9.8 y:0.09. Given I have all these readings how do I estimate the map. The result should ideally be as close to the real values as possible.

My naive approach has the following problem. If the average of the transforms from 1 to 2 is slightly off the placement of 3 can be off even though the reading of 2 to 3 is very accurate. This problem is shown below:

The greens are the actual values, the blacks are the calculated values. The average transform of 1 to 2 is x:10 y:2.

解决方案

You can use a least-squares method, to find the transformation that gives the best fit to all your data. If all you want is the distance between the markers, this is just the average of the distances measured.

Assuming that your marker positions are fixed (e.g., to a fixed rigid body), and you want their relative position, then you can simply record their positions and average them. If there is a potential for confusing one marker with another, you can track them from frame to frame, and use the continuity of each marker location between its two periods to confirm its identity.

If you expect your rigid body to be moving (or if the body is not rigid, and so forth), then your problem is significantly harder. Two markers at a time is not sufficient to fix the position of a rigid body (which requires three). However, note that, at each transition, you have the location of the old marker, the new marker, and the continuous marker, at almost the same time. If you already have an expected location on the body for each of your markers, this should provide a good estimate of a rigid pose every 20 frames.

In general, if your body is moving, best performance will require some kind of model for its dynamics, which should be used to track its pose over time. Given a dynamic model, you can use a Kalman filter to do the tracking; Kalman filters are well-adapted to integrating the kind of data you describe.

By including the locations of your markers as part of the Kalman state vector, you may be able to be able to deduce their relative locations from purely sensor data (which appears to be your goal), rather than requiring this information a priori. If you want to be able to handle an arbitrary number of markers efficiently, you may need to come up with some clever mutation of the usual methods; your problem seems designed to avoid solution by conventional decomposition methods such as sequential Kalman filtering.


Edit, as per the comments below:

If your markers yield a full 3D pose (instead of just a 3D position), the additional data will make it easier to maintain accurate information about the object you are tracking. However, the recommendations above still apply:

  • If the labeled body is fixed, use a least-squares fit of all relevant frame data.
  • If the labeled body is moving, model its dynamics and use a Kalman filter.

New points that come to mind:

  • Trying to manage a chain of relative transformations may not be the best way to approach the problem; as you note, it is prone to accumulated error. However, it is not necessarily a bad way, either, as long as you can implement the necessary math in that framework.
  • In particular, a least-squares fit should work perfectly well with a chain or ring of relative poses.
  • In any case, for either a least-squares fit or for Kalman filter tracking, a good estimate of the uncertainty of your measurements will improve performance.

这篇关于准确测量一组基准之间的相对距离(增强现实应用)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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