pycvcam.core.Extrinsic#

Note

See the main pycvcam.core.Transform documentation for more details on how to use transformations.

See also

The implemented extrinsic models are:

Extrinsic Class#

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

Note

This class represents the extrinsic transformation, which is the first step of the process from the world_points to the image_points. This is the abstract class that defines the interface for extrinsic transformations.

This base class, set the input_dim and output_dim to 3 and 2 respectively and add the aliases :

  • normalized_points and x_n for the result of the transformation.

  • world_points and x_w for the result of the inverse transformation.

To process the transformation, the method project and unproject are provided, which are aliases for the transform and inverse_transform methods respectively.

The extrinsic transformation also implement the method compute_rays to compute the rays emitted by the camera from the world points, which is useful for ray tracing or other applications. The subclass must implement the _compute_rays method to define how to compute the rays from the normalized points.

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 the rays emitted from the camera to the scene.

Developing Extrinsic Subclasses#

To create a new extrinsic transformation model, subclass the pycvcam.core.Extrinsic class and implement the following methods (in addition to the methods required by the pycvcam.core.Transform class):

Extrinsic._compute_rays(normalized_points, ...)

Computes the rays in the world coordinate system for the given normalized points.