Camera Coordinate System#

Important

The camera CRS convention is critical for defining the exterior-orientation rotation correctly. See also Image Pose, Attitude, and Rotation Angles for how the rotation matrix is defined and used in weitsicht.

The camera coordinate system (camera CRS) is the local 3D reference frame fixed to the camera. It is required to define how image rays are represented and how exterior orientation is interpreted.

Camera coordinate system

Camera coordinate system#

The camera center \(P_{CAM}\) is the origin of this system. Image coordinates and 3D object coordinates are linked through this frame.

Theoretical Background#

For a perspective camera, image formation is typically written as:

\[\begin{split}s \begin{bmatrix} u \\ v \\ 1 \end{bmatrix} = K \left[ R \mid t \right] \begin{bmatrix} X \\ Y \\ Z \\ 1 \end{bmatrix}\end{split}\]

with:

  • \(K\): camera intrinsics (focal length, principal point, distortion),

  • \(R, t\): exterior orientation (rotation and translation),

  • \((X, Y, Z)\): point in a 3D point CRS,

  • \((u, v)\): projected pixel coordinates.

The camera CRS defines the meaning of \((X_c, Y_c, Z_c)\) after applying the extrinsics, i.e. before projection to pixels. Without a strict CRS definition, the same pose values can map to different viewing directions.

Convention in weitsicht#

  • Camera origin is at \(P_{CAM}\).

  • Camera axes \(X_{CAM}\), \(Y_{CAM}\), \(Z_{CAM}\) are defined as shown in the figure above (\(X_{CAM}\) right, \(Y_{CAM}\) up, \(Z_{CAM}\) backwards; the optical axis points along \(-Z_{CAM}\)).

  • The principal point \((x_0, y_0)\) is defined in image coordinates.

  • Pixel coordinate details are defined in Pixel Coordinate System.

Note

Some software stacks use different sign conventions. For example, OpenCV commonly uses \(X\) right, \(Y\) down, \(Z\) forward. weitsicht converts these conventions inside the camera model implementation so the public camera CRS stays consistent with the definition above.

Important

In practice there are often four different coordinate systems:

  • 3D point CRS (coordinates of reconstructed/surveyed points),

  • perspective image CRS (the frame in which image orientation is provided),

  • camera CRS (local camera frame),

  • pixel/image CRS (2D pixel coordinates).

The image exterior orientation (EOR) describes the camera CRS position and orientation in the perspective image CRS.

This definition is not universal across computer-vision and photogrammetry tools. Therefore, exterior orientation from another software package must be converted before use in weitsicht.

Always verify these items before importing poses:

  • axis directions and handedness,

  • transform direction (3D-point-CRS to camera vs camera to 3D-point-CRS),

  • rotation convention (Euler order, quaternion convention, matrix layout),

  • unit consistency (meters vs millimeters, radians vs degrees),

  • pixel origin convention (top-left corner vs top-left pixel center; see Pixel Coordinate System).

Combined CRS Overview#

The following figure shows how the four systems are linked: 3D point CRS, perspective image CRS, camera CRS, and pixel/image CRS.

Combined CRS overview

Link between 3D point CRS, perspective image CRS, camera CRS, and pixel/image CRS.#

References#