py3dframe.Transform.inverse_transform#

Transform.inverse_transform(*, point: ndarray | None = None, vector: ndarray | None = None) ndarray[source]#

Transform a point or a vector from the output frame to the input frame.

If the point is provided, the method will return the coordinates of the point in the input frame. If the vector is provided, the method will return the coordinates of the vector in the input frame.

Several points / vectors can be transformed at the same time by providing a 2D numpy array with shape (3, N).

If both the point and the vector are provided, the method will raise a ValueError. If neither the point nor the vector is provided, the method will return None.

In the convention 0:

\[X_{\text{input_frame}} = R * X_{\text{output_frame}} + T\]
\[V_{\text{input_frame}} = R * V_{\text{output_frame}}\]
Parameters:
  • point (Optional[array_like], optional) – The coordinates of the point in the output frame with shape (3, 1). Default is None.

  • vector (Optional[array_like], optional) – The coordinates of the vector in the output frame with shape (3, 1). Default is None.

Returns:

The coordinates of the point or the vector in the input frame with shape (3, 1).

Return type:

numpy.ndarray

Raises:

ValueError – If the point or the vector is not provided.