📸

16 - Camera Extrinsics & Intrinsics

Goal:

  1. map from world coordinates → camera coordinates
  1. project onto proj plane
  1. map from projection plane → pixel coordinates

RECALL: rotation

1. Map from World Coordinates → Camera

u, v, n are the camera coordinates
wanna describe dist from cwc_w and XwX_w
  • the vector = XwCwX_w-C_w

then have a rotation matrix & rotate 𝑿𝒘 − 𝑪𝒘 from world coordinates to camera coordinates.

change of basis matrix

using homogeneous coordinates… ⬇️

⬇️⬇️⬇️⬇️
delete the last one coord

2. Project onto Projection Plane


similiar triangle in lecture 12

we get the 2D point in projection plane

3. Map from projection plane coordinates → pixel coordinates

  • units of (x,y)(x,y) are the SAME as units of world & camera coordinates
    • e.g. millimeters

→ transform them to pixel index coordinates

2 issues to concern..

Issue 1: Units are different → scale transformation


NOTE: spacing between x can be different as spacing in y

⬆️ above scale transformation in 2D homoenous coordinates:

Issue 2: Find the pixel center → translation


(px,py)(p_x, p_y) denotes the center of the pixel! corresponds to (𝑥, 𝑦) = (0,0)(0,0)
  • → “principal point”
It might not correspond exactly to the center of the pixel grid.



Let’s put STEP 2 & 3 together…

Recall:
  • step 2: project to proj plane
  • step 3: map to pixel coordinates

“Camera Calibration Matrix K

is the green part

Assume we are starting out with a point in camera coordinates,

and written in homogeneous coordinates (𝑋,𝑌,𝑍,1)T(𝑋, 𝑌, 𝑍, 1)^T

3x3 part is invertible but the 3x4 matrix overall is not invertible since it includes projection.
Why only one part invertible?

→ because u can of course invert from pixel coordinates to camera coordinates

→ but u cannot invert back to 3D coordinates before projection

RECALL: in linear algebra, u want to scale AND THEN translate

ASIDE: A more general model: adding a shear


Conclusion: Intrinsic & Extrinsic


a sequence of transformations

extrinsic:

intrinsic:

….. in the end we get a 3x4 matrix..

Exercises:


💡
NOTE: think of P as a point that
  • takes a point from 3D world to 2D point in camera pixel

Q1:
Q2:
  • ANSWER: can think of “how to isolate the 1st column?”
    • we need [X,Y,Z,1]T=[1,0,0,0]T[X,Y,Z,1]^T=[1, 0,0,0]^T
      • what does this new matrix mean? geometric
      • a point at infinity in x direction
        💡
        recall….

  • ANSWER: to isolate 4th column
    • → origin
  • ANSWER: think of the red equation
    • which plane is iit?
      • Ans: the plane in world that maps to position x=0x=0 & containing the camera center

  • ANSWER: camera coordinates
    • Ans: the plane in world containing camera center & normal is optical axis
      • the 3-vector (P3,1, P3,2, P3,3) must be in the direction of the optical axis of the camera, - since it’s normal to principal plane