最小化单应矩阵的误差 [英] Minimize error in homography matrix

查看:181
本文介绍了最小化单应矩阵的误差的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个单应性矩阵

 [h1 h2 h3 
  h4 h5 h6 
  h7 h8 h9]

我改变了一个观点 p1 to P1使用上面的单应性矩阵. 同样

I have transformed a point p1 to P1 using above homography matrix. Similarly

    p2 to P2
    p3 to P3
    p4 to P4

我知道两者之间的区别

P1-P2 = D1
P2-P3 = D2
P3-P4 = D3

由于单应性错误,D1,D2,D3中的错误很小. (我知道实际的差值) 假设错误为E1, E2, E3(已知值).

Due to error in homography There is small error in D1, D2, D3. (I know the actual difference value) Let the error be E1, E2, E3 (known values).

(E1 = D1 - Actual_Difference_between_P1_andP2)

类似地,计算E2,E3和E4.

Similarly E2, E3, and E4 are calculated.

现在我需要修改单应性矩阵,以使我的E1,E2,E3,E4最小化.

Now I need to modify my homography matrix, such that my E1, E2, E3, E4 are minimized.

推荐答案

简介:

可以从4对点以100%的准确度(真实0重投影误差)获得单应像.但是,当一对点数大于4时,您可能无法获得0误差的单应性.这是因为这些点可能不在一个3D平面中.

Homography can be obtained from 4 pair of points with 100% accuracy (real 0 reprojection-error). However, when number of pair of points are more than 4, you may not be able to get a 0-error homography. This is because the points may not be in one 3D-planer.

因此,首先,您必须处理一个事实,即在实词应用中,可能没有100%准确的单应性(由于匹配错误),而有一个最优的(最小重投影误差矩阵).

So, first you have to deal with the fact that in real word application, there may not be 100% accurate homography (due to matching errors) but there is one optimal (minimum reprojection error matrix).

配方:

关于您的问题,看来您有两组点.一个用于获取同形学的模型,另一个用于根据其验证模型的模型,然后您想将其用于增强模型.

Regarding your question, it seems that you have two set of pair of points. One that you have used to obtain the Homography and another one that you are validating your model based on it and then you want to use it for enhance your model.

如何增强单应性?

首先,使用两种集合使用某种鲁棒的估计方法(例如RANSAC)获得单应性.您可能会在此处找到更多信息.

First, use both sets to obtain the homography using some robust estimation method (RANSAC for example). You may find further information here.

第二,遍历您的集合并计算您描述的每个点的重投影误差.然后,消除所有重投影误差大于某个阈值的点.

Second, iterate through your set and compute the reprojection error for each points as you described. Then, eliminate all points that have a reprojection error more than some threshold.

第三,仅对线性像素应用微调优化技术,直到根据线性像素之间的误差总和获得良好的单应性为止.

Third, apply fine tuning optimization techniques just on the inliers until you good homography in term of sum of errors among inliers.

如何执行第三步?

您有8个参数需要优化:

You have 8 parameters to optimize:

h11    h12    h13
h21    h22    h23
h31    h32     1

优化功能:

您已经使用RANSAC计算了单应性.因此,您有一个很好的估算,该估算接近全局最优值.这意味着非线性局部优化技术足以满足这种情况.存在许多算法.选择一个并开始(一些建议:爬山

And you have already computed the Homography using RANSAC. So, you have a very good estimation which is near the global optimal. This means a nonlinear local optimization technique is enough for this case. many algorithm are exist. Pick one and start (Some suggestions: Hill Climbing, Simulated Annealing)

编辑,OP发表评论说只有第二组之间的距离是已知的:

Edit after OP's comment that only distances betwen the second set are known:

优化功能应为:

其中AD_ij是Pi和Pj之间的实际距离.

Where AD_ij is the actual distance between Pi and Pj.

例如,您可以尝试使用欧几里德距离序列作为参考和查询来降低复杂性.

You may try to decrease the complexity by for example using the sequare of euclidean distance for both reference and query.

这篇关于最小化单应矩阵的误差的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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