Minimize error in homography matrix

你说的曾经没有我的故事 提交于 2019-11-30 15:45:41

Introduction:

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.

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).

Formulation:

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.

How can I enhance the homography?

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.

How to do the third step?

You have 8 parameters to optimize:

h11    h12    h13
h21    h22    h23
h31    h32     1

The optimization function:

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)


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

The optimization function should be:

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!