16822 Assignment 3

Andrew ID: aniketa

Q1 8-point and 7-point algorithm

(A1) F-matrix using 8-point algorithm

Viewpoint 1 Viewpoint 2

(A2) E-matrix using 8-point algorithm

E = K_2.T @ F @ K1
(Normalization) E = E / E[2][2]

E for bench image:

-0.5747829  -7.83445894   -2.498274892
 0.3987800   0.69067134    68.23290133
-2.6483098  -68.4885993    1.

E for remote:

.513789293   -0.789056178   7.66094837
-6.32447998  -3.13768466   -27.3297818
-13.79871092  24.79224781   1.

(B) 7-point algorithm

Method:

  1. Normalize Points: Divide pts1, pts2 by M
  1. Build Matrix A: Create rows from point pairs
  1. Extract F1, F2: Use SVD on matrix A
  1. Combine: F = a*F1 + (1-a)*F2
  1. Solve: Find cubic polynomial roots
  1. Refine: Apply T.T @ F @ T transformation

Q2 RANSAC with 7-point and 8-point algorithm

Bench:

8-point

7-point

Remote:

8-point

7-point

Ball

8-point

7-point

Hydrant:

8-point

7-point

For the bench the inliers graph:

Method:

  1. Initial Selection
    • Randomly select 7-8 point correspondences from pts1 and pts2
  1. Matrix Computation
    • Calculate Fundamental Matrix (F) using selected points via 7-point or 8-point algorithm
  1. Distance Calculation
    • For each point in pts1:
      • Compute epipolar line using F matrix
      • Calculate distance between corresponding pts2 point and epipolar line
      • Repeat vice-versa
  1. Inlier Detection
    • Mark points as inliers if distance error is below threshold
    • Update inlier set if current iteration finds more inliers
  1. Final Computation
    • Recalculate F matrix using only the best inlier set
  1. Parameters: Iters are 10000 and threshold = 1.5

Q3 Triangulation

  1. Build Matrix A
    • Take corresponding point pairs (a,b)
    • Use projection matrices P1 and P2
    • Form A matrix using equation: A = [a_yP1_3 - P1_2, P1_1 - a_xP1_3, b_yP2_3 - P2_2, P2_1 - b_xP2_3][1]
  1. Get 3D Point
    • Apply SVD to matrix A
    • Take last singular vector as x coordinates
    • Scale x so last element equals 1.
  1. Save Result
    • Extract non-homogeneous part of x
    • Store in Points3D variable

Q4 COLMAP

Multi View images:

Reconstruction:

Multi-view images:

Reconstruction:

Q5 Fundamental matrix estimation on your own images

Image set:

Image Set:

Method Used:

  1. Find features in both images using SIFT and match them with FLANN-based matcher.
  1. Filter good matches and then extract corresponding points.
  1. Estimate the fundamental matrix using RANSAC with the eight-point algorithm and the above visualized epipolar lines

Q6. Stress test hyperparams of COLMAP

1.