16-822 Geometry-based Methods for Vision

16-822
Geometry-based Methods for Vision - Assignment 2
Sravan Chittupalli (schittup)    

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

   

Stanford Bunny

Surface Points Bounding Box

Calculated Projection Matrix:

   

Cuboid

Input Image Annotated 2D Points Result

Calculated Projection Matrix:

   

Q2: Camera calibration K from annotations

   

Camera calibration from vanishing points

Input Image Annotated parallel lines Vanishing points and principal point

Calculated Intrinsic Matrix:

Implementation Details:

First, find a set of parallel lines which are orthogonal to each other.

  • We know that if 2 image points x1 and x2 correspond to orthogonal directions then we can say:
  • Figure : orthogonal constraint
  • These constraints are enough to calculate the Image of Absolute conic i.e. omega
  • Omega is related to intrinsic matrices as:
  • Figure : Omega matrix
  • We use cholesky decomposition and invert the result to get K i.e. intrinsic matrix
  •    

    Camera calibration from metric planes

    Input Image Annotated square 1 Annotated square 2 Annotated square 3

    Angles Evaluated on 2 pairs of test lines before and after affine rectification:

    Angle between planes(degree)
    Plane 1 & Plane 2 67.2824252644311
    Plane 1 & Plane 3 92.20348558861907
    Plane 2 & Plane 3 94.71069301663044

    Calculated Intrinsic Matrix:

    Implementation Details:

    Given Annotation of 3 planes which are not parallel to each otherwe can calculate K by doing the following steps:

  • For each plane compute the homography H that maps its corner points, (0, 0), (1, 0), (0, 1), (1, 1), to their imaged points.
  • Then we calculate the imaged circular points for the plane. The points will be of form h1 + ih2 and h1 - ih2
  • Then we fit a conic omega to the six imaged circular points. Each circular point gives 2 constraints of form:
  • Figure : Constraints
  • These constraints are enough to calculate the Image of Absolute conic i.e. omega
  • Omega is related to intrinsic matrices as:
  • Figure : Omega matrix
  • We then find the angle between planes by first calculating the normal to the planes and then taking np.arccos between the normals. The normals are calculated using:
  • Figure : Omega matrix

       

    Q3: Single View Reconstruction

       

    (a)

    Input Image Annotations Reconstruction View 1 Reconstruction View 2

    Calculated Intrinsic Matrix:

    Implementation Details:

    Given Annotation of atleast 3 non parallel planes in an image we can reconstruct the object by doing the following steps:

  • First we need to caluclate the camera intrinsic matrix using the steps in question 2a.
  • We find the normals to the planes in the same way as in question 2b.
  • We then pick one point as a refernce as assign depth to it. Given this we can calculate the plane equation. The plane equation is of the form:
  • Figure : Plane equation
  • Now we have to compute the 3D coordinate of all points on the plane via plane - ray intersection.
  • This is repeated for all planes in the image
  •    

    (b)

    Input Image Reconstruction GIF
    Input Image Reconstruction GIF
    Input Image Reconstruction GIF