Skip to content

5. Equation and Coordinate System Definitions: Extrinsics

burritobrittany edited this page Jul 17, 2020 · 4 revisions

Extrinsics

Eqn1

where
CXW, CYW, CZW Position of Camera Coordinate System origin (Camera Position) in World coordinates
alpha Azimuth: The horizontal direction the camera is pointing and positive CW from World Z Axis.
t Tilt: The up/down tilt of the camera. 0 is the camera looking nadir, +90 is the camera looking at the horizon right side up. 180 is looking up at the sky and so on.
s The side to side tilt of the camera. 0 degrees is a horizontal flat camera. Looking from behind the camera, CCW rotation of the camera would provide a positive swing.

Figure14

Figure 14: Definition of extrinsic vector in world coordinates.

Image and Camera Coordinates

Figure15

Figure 15: Relationship between Camera XYZC, Homogeneous Camera xyz, and undistorted Image (UV) coordinates.

Projection Matrix Construction

The projection matrix to go from XYZW to UV coordinates as defined above is:

Figure16

Figure 16: P Matrix Construction to go from World to undistorted Camera Coordinates.

Where

  • K is matrix to go from camera coordinates to UV undistorted coordinates. (It combines the matrices to go from camera to camera homogeneous and camera homogeneous to Image).

  • R is rotation matrix to go from world coordinates to camera coordinates. It is a ZXZ rotation with azimuth, tilt, and swing respectively and is defined in the next section.

  • T is the translation matrix to go from world coordinates to camera coordinates

Rotation Matrix Definition

To construct R, we need to rotate the World Axes to match the Camera Axis in a ZXZ rotation. With azimuth, tilt, and swing (A,T,S) or (a,t,s). The camera axis is defined in Figures 14-15.

Figure17a

Figure17b

Figure17c

Figure 17: ZXZ Rotation formulation of World to Camera R Rotation Matrix

The top panel in Figure 17 shows the camera axes as if it were looking down (T=0) with a positive Azimuth A (Defined as positive CCW about X_C or in other words positive CW deviation of Y axes). The top panel shows the following rotation to get the World X axes to match the Camera X axes.

Eqn2

Using fact that cos(180-X)=-cos(x) and sin(180-X)=sin(x).

Looking at the middle panel in Figure 17, Positive tilt is defined as clockwise rotation about Xc or CW Deviation of Yc from the horizontal. (+90 degrees would be the camera looking out to North if A=0). The middle panel shows the rotation to get the World Y and Z Axes to match the camera Axis Y and Z axes.

Eqn3

In the bottom panel in Figure 17 Positive Swing is defined as clockwise rotation about Zc. If you imagine that the camera is up looking at the horizon (Tilt 90); this would be if the camera was rotated counterclockwise looking from the back of the camera.

Eqn4

We then multiply the matrices. Remember, the order of rotation goes right to left!

Eqn5_6_7

So this R_(W→C)=R takes world coordinates (XYZ, and transforms them to Camera Coordinates XcYc,Zc).

Clone this wiki locally