Introduction to computer vision( ud810, CS 6476)--epipolar geometry, fundamental matrix

看这个CS6476的主要目的是知其然,能去解决遇到的一些问题,但是我也尽量知其所以然。

OMS地址:https://www.cc.gatech.edu/~afb/classes/CS4495-Spring2015-OMS/

下面贴一下OMS的repo

https://github.com/gkouros/intro-to-cv-ud810

这个是我觉得一个写得不错的。

这篇blog主要写三点:

1.我遇到的问题;2.怎么求fundamental matrix; 3.怎么求epipolar line;

1.写这个是因为其中有个很简单的问题困扰了我很久,回头想想也挺逗的,不过也是因为中间有其他重要的事情没有什么时间去解决这个问题。

描述下这个问题就是:

 其中l prime 就是epipolar line, epipolar跟点p prime向量的乘积为0。

我下意识的就想,这个epipolar line的向量跟点向量的乘积为0,那就是垂直。但是怎么也证明不出来这俩垂直,而且还举了好多反例。

最后的最后,做了OMS,看了别人repo里面的代码,才知道乘积为0,就是说点p prime在 线l prime上,这明显是的啊。。。反正这个问题就解决了,也没啥好说的了。

2.求fundamental matrix

a. 首先你得到两组不同投影下2d座标。

b. 座标转到homogeneous coordinates 上,就是加一维 Z,补1。

c.根据公式求 fundamental matrix F,用 svd 或者least square都可以。

d.由于3中求出来的F 是满秩的,但是我们需要的是一个秩为2的矩阵,所以对F做SVD,把奇异值最小的给去掉可以了。

3.求epipolar line

其实根据2中求得F,就很容易算epipolar line了,但是有个问题,我懒得翻译了:

If you look at the results of the last section the epipolar lines are close, but not perfect. The problem is that the offset and scale of the points is large and biased compared to some of the constants. To fix this, we are going to normalize the points.

所以就对两组points 做 normalize吧,然后F 也要左右各乘上normalize的转换矩阵生成新的F prime。

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章