16-822 Geometry-based Methods in Vision

Assignment 2: Single-view Reconstruction

Zihan Wang (zihanwa3), Fall 2024

Q1: Camera matrix P from 2D-3D correspondences

(a) Stanford Bunny

Surface PointsBounding Box

(b) Cuboid

Input ImageAnnotated 2D pointsEdges

Q2: Camera calibration K from annotations

(a) Camera calibration from vanishing points

Input ImageAnnotated Parallel LinesVanishing points and principal point

K=[1.15417802e+030.00000000e+005.75066005e+020.00000000e+001.15417802e+034.31939090e+020.00000000e+000.00000000e+001.00000000e+00]

Brief Description of the Implementation

1. Vanishing Point Calculation

We compute vanishing points from annotated lines by using pairs of 2D points to form lines. The intersection of two lines gives a vanishing point, representing a direction in 3D space where parallel lines converge when projected onto the image plane..

2. Forming the Equation for IAC

The image of the absolute conic is:

(2)ω=[w10w20w1w3w2w3w4]

Each pair of vanishing points follows a constraint:

(3)viTωvj=0

Using three pairs of vanishing points, these constraints are stacked to form a system of linear equations in the matrix form:

(4)Aw=0

A is 3x4, and w is the vector of unknowns w 1-4..

3. Solving for ω

It can be obtained by the null vector of A by SVD, the last row from solution is the vector.

4. Estimating the Camera Intrinsic Matrix ( K )

K can be computed from the relation:

(5)ω=(KKT)1

We can apply Cholesky factorization to extract k and normalize it.

(b) Camera calibration from metric planes

Input ImageAnnotated Squares
 Angle between planes(degree)
Plane 1 & Plane 267.57512638790858
Plane 1 & Plane 387.75278299233901
Plane 2 & Plane 385.21620854556966

K=[1.08447642e+031.35121131e+015.20013594e+021.17407507e131.07900526e+034.02544642e+020.00000000e+000.00000000e+001.00000000e+00]

Brief Description of the Implementation

1. Homography Computation: Caculate the homograph that maps (0,1), (1,1), (1,0), (0,0) to the annotated corners of the squares.

2. Imaged Circular Points

Using the homography, these circular points are projected into the image as:

(6)H(1,±i,0)T

Then the imaged circular points become:

(7)h1±ih2

Now it allows us to impose constraints on the camera’s intrinsic matrix.

3. Fitting the Conic ( ω )

we generate more equations until it is sufficient to solve for w up to a scale factor as:

  1.  

(8)h1Tωh2=0
  1.  

(9)h1Tωh1=h2Tωh2

4. Extract calibration Matrix ( K ) as beofre

.

Q3: Single View Reconstruction

Input ImageAnnotationsReconstruction View 1Reconstruction View 2

Brief Description of the Implementation

  1. Compute ( K ) from 3 vanishing points.

  2. Select a reference point to start the unprojection.

  3. Unproject the reference point and assign scale:

    (10)Xr=K1x
  4. Find the plane normal and scalar ( a ) with the known 3D point

    (11)a=nTXr
  5. Unproject other points to 3D

    (12)X=K1x
  6. Repeat for all planes