Viewpoint 1 (Points) | Viewpoint 2 (Epipolar Lines) |
---|---|
![]() |
![]() |
The F matrix obtained is:
Viewpoint 1 (Points) | Viewpoint 2 (Epipolar Lines) |
---|---|
![]() |
![]() |
The F matrix obtained is:
F matrix is calculated using 8 points as follows:
1. Let x and x' be the corresponding points in both the images, then \( x'^TF x = 0\)
2. We will first normalize the points so that zero mean and unit variance. Let these matrixes be \(T_1\) and \(T2\).
3. Construct the matrix A using the following equation for each correspondence:
4. Solve for f using SVD such taht Af = 0 and ||f|| = 1 and reshape the last singular vector of V to form F.
5. Enfore rank contraint for F by taking SVD of F and making the last singular value to be 0.
6. Unnormalzie F by \(F = T_2^T F T_1\)
7. Get epipolar lines using \(l' = Fx\)
E matrix is calculated using F matrix and intrinsics as follows:
1. Once we have obtained F using the above algorithm, then E is \( E = K_2^T F K_1\)
2. We can also enforce the last eigen value is 0 and the first eigen values are same by taking SVD and making the first 2 values as the mean of each other and making the last value 0.
Viewpoint 1 (Points) | Viewpoint 2 (Epipolar Lines) |
---|---|
![]() |
![]() |
The F and E matrices obtained are:
Viewpoint 1 (Points) | Viewpoint 2 (Epipolar Lines) |
---|---|
![]() |
![]() |
The F and E matrices obtained are:
F matrix is calculated using 7 points as follows:
1. Let x and x' be the corresponding points in both the images, then \( x'^TF x = 0\)
2. We will first normalize the points so that zero mean and unit variance. Let these matrixes be \(T_1\) and \(T2\).
3. Construct the matrix A using the following equation for each of the 7 correspondences:
4. Solve for f using SVD such that Af = 0 and ||f|| = 1.
5. Because we solved the SVD using 7 points, we will have the last 2 singular vectors of V representing 2 possible F i.e. \(F_1\) and \(F_2\).
6. F is a linear combination of \(F_1\) and \(F_2\) such that \(F = F_1 + \alpha F_2\) and det(F) = 0.
7. We obtain the value of \(\alpha\) by solving the cubic equation and then taking the real root value to form the correct F.
8. Enfore rank contraint for F by taking SVD of F and making the last singular eigen value to be 0.
9. Unnormalzie F by \(F = T_2^T F T_1\)
10. Get epipolar lines using \(l' = Fx\)
Eight Point: Viewpoint 1 (Points) | Eight Point: Viewpoint 2 (Epipolar Lines) | Seven Point: Viewpoint 1 (Points) | Seven Point: Viewpoint 2 (Epipolar Lines) |
---|---|---|---|
![]() |
![]() |
![]() |
![]() |
The F matrix obtained from 8 point RANSAC is:
The F matrix obtained from 7 point RANSAC is:
Eight Point: Viewpoint 1 (Points) | Eight Point: Viewpoint 2 (Epipolar Lines) | Seven Point: Viewpoint 1 (Points) | Seven Point: Viewpoint 2 (Epipolar Lines) |
---|---|---|---|
![]() |
![]() |
![]() |
![]() |
The F matrix obtained from 8 point RANSAC is:
The F matrix obtained from 7 point RANSAC is:
Eight Point: Viewpoint 1 (Points) | Eight Point: Viewpoint 2 (Epipolar Lines) | Seven Point: Viewpoint 1 (Points) | Seven Point: Viewpoint 2 (Epipolar Lines) |
---|---|---|---|
![]() |
![]() |
![]() |
![]() |
The F matrix obtained from 8 point RANSAC is:
The F matrix obtained from 7 point RANSAC is:
Eight Point: Viewpoint 1 (Points) | Eight Point: Viewpoint 2 (Epipolar Lines) | Seven Point: Viewpoint 1 (Points) | Seven Point: Viewpoint 2 (Epipolar Lines) |
---|---|---|---|
![]() |
![]() |
![]() |
![]() |
The F matrix obtained from 8 point RANSAC is:
The F matrix obtained from 7 point RANSAC is:
I followed the following steps to obtain the F using seven/eight point RANSAC algorithm:
1. In every iteration I select 7 or 8 points randomly for 7 and 8 point algorithm to estimate F.
2. I then calculate the inliers by computing the distance between the epipolar lines and the corresponding points in both images. All the points whose distance is less than a certain threshold are considered as inliers. For my experiment I took a threshold value of 3 pixels.
3. If the current number of inliers is greater than previous max, I update the inlier lest and best F.
4. This process is repeated for 10000 iterations.
5. In the end I use all the inliers using the max inlier number to re-estiamte the F matrix.
![]() |
![]() |
To do the triangulation, I did the following steps:
1. Let \(P_1\) and \(P_2\) be projection matrices for camera 1 and 2 and \(x_1\) and \(x_2\) be the corresponding 2 poin in both the images.
2. Then \(x_1 = P_1 X\) and \(x_2 = P_2 X\). So we have \(x_1 \times P_1 X = 0\) and \(x_2 \times P_2 X = 0\).Using these equations we can form A matrix as follows:
3. We solve for X using SVD and take the last column of V as the answer.
4. This process is done for all point correspodences.
I collected multiple pictures of India Gate from the internet and used COLMAP on them.
Input
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
3D reconstruction
I collected multiple pictures of a table and used COLMAP on them.
Input
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
3D reconstruction
Viewpoint 1 (Points) | Viewpoint 2 (Epipolar Lines) |
---|---|
![]() |
![]() |
Viewpoint 1 (Points) | Viewpoint 2 (Epipolar Lines) |
---|---|
![]() |
![]() |
I did the following steps to obtain the F matrix on my own images:
1. Run SIFT to extract feature points and caluclate the descriptions for each feature point in both the images.
2. Do feature description matching of descriptors from both the images using FLANN matcher.
3. Eliminate noisy matches by retaining only those matches where the distance of the first nearest match is less than 0.75 times the distance of the second nearest match.
4. Use the matched keypoints from both the images to estimate F using RANSAC 7 or 8 point algorithm.
5. Plot the epipolar lines using the estimated F.