ABC Extrinsic#

Overview#

class Extrinsic(parameters=None, constants=None)[source]#

Abstract base class for extrinsic camera transformations.

This class represents the extrinsic transformation, which is typically the first step in the camera projection pipeline:

world_points → normalized_points → distorted_points → image_points

The purpose of an extrinsic transformation is to map world coordinates to normalized camera coordinates in the camera frame.

Attributes & Aliases#

  • input_dimint

    The input dimension of the transformation. Always 3 (X, Y, Z).

  • output_dimint

    The output dimension of the transformation. Always 2 (x, y).

  • normalized_points / x_n :

    Alias for the forward transformation result (from world points to normalized camera coordinates).

  • world_points / x_w :

    Alias for the inverse transformation result (from normalized points back to world coordinates).

Notes

  • The methods project and unproject are provided as convenient aliases for transform and inverse_transform, respectively.

  • The extrinsic transformation also implements a method compute_rays to compute rays originating from the camera passing through the world points, useful for ray tracing and related applications.

  • Subclasses must implement _transform, _inverse_transform, and _compute_rays to define the actual mappings and ray computations.

Parameters:
  • parameters (Optional[ArrayLike])

  • constants (Optional[ArrayLike])

Adding Public Methods of Extrinsic subclasses#

Extrinsic.project(world_points, *[, ...])

Alias for the transform method, which applies the extrinsic transformation to the points.

Extrinsic.unproject(normalized_points, *[, ...])

Alias for the inverse_transform method, which applies the inverse extrinsic transformation to the points.

Extrinsic.compute_rays(normalized_points, *)

Compute rays originating from the camera passing through given normalized points.

Implemented Extrinsic Models#

See the documentation Extrinsic Models for the implemented extrinsic models in the package.