ABC Distortion#

Overview#

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

Abstract base class for distortion camera transformations.

This class represents the distortion transformation, which is typically the central step in the camera projection pipeline:

world_points → normalized_points → distorted_points → image_points

The purpose of a distortion transformation is to map normalized coordinates to distorted normalized coordinates.

This abstract class defines the interface for all distortion transformations and provides common properties and aliases for convenience.

Attributes & Aliases#

  • input_dimint

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

  • output_dimint

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

  • distorted_points / x_d :

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

  • normalized_points / x_n :

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

Notes

  • The methods distort and undistort are provided as convenient aliases for transform and inverse_transform, respectively.

  • Subclasses must implement _transform and _inverse_transform to define the actual mapping and, optionally, the Jacobians.

Parameters:
  • parameters (Optional[ArrayLike])

  • constants (Optional[ArrayLike])

Adding Public Methods of Distortion subclasses#

Distortion.distort(normalized_points, *[, ...])

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

Distortion.undistort(distorted_points, *[, ...])

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

Implemented Distortion Models#

See the documentation Distortion Models for the implemented distortion models in the package.