pycvcam.core.Extrinsic.project#

Extrinsic.project(world_points, *, transpose=False, dx=False, dp=False, **kwargs)[source]#

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

See also

Note

The world_points is converted to a numpy array of dtype=numpy.float64.

Parameters:
  • world_points (ArrayLike) – The world points to be transformed. Shape (…, 3).

  • transpose (bool, optional) – If True, the input points are assumed to have shape (3, …) instead of (…, 3) and the output points will have shape (2, …). Default is False.

  • dx (bool, optional) – If True, the jacobian with respect to the world points is computed. Default is False

  • dp (bool, optional) – If True, the jacobian with respect to the distortion parameters is computed. Default is False

Returns:

The result of the transformation, which includes the normalized_points and the Jacobian matrices if available.

Return type:

TransformResult

Examples

extrinsic = ... # An instance of a subclass of Extrinsic

import numpy

world_points = numpy.array([[0.0, 0.0, 0.0], [1.0, 1.0, 1.0], [2.0, 2.0, 2.0]]) # shape (n_points, 3)
result = extrinsic.project(world_points)
normalized_points = result.normalized_points  # shape (n_points, 2)

# SAME AS:
result = extrinsic.transform(world_points)
normalized_points = result.transformed_points  # shape (n_points, 2)