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。

 

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