pycvcam.core.Extrinsic.unproject#

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

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

See also

Note

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

Parameters:
  • normalized_points (ArrayLike) – The normalized points in the camera coordinate system to be transformed. Shape (…, 2).

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

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

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

Returns:

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

Return type:

TransformResult

Examples

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

import numpy

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

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