pysdic.NoExtrinsic._invert#

NoExtrinsic._invert(normalized_points, *, dx=False, dp=False, depth=None)[source]#

Compute the inverse transformation from 2D normalized points to world points.

  • With 3D world points, the normalized points are placed at the depth \(Z_c\): \(\vec{X}_w = (x_n, y_n, Z_c)\).

  • With 2D world points, the transformation is the identity.

Parameters:
  • normalized_points (numpy.ndarray) – The normalized points. Shape (n_points, 2).

  • dx (bool, optional (default: False)) – If True, compute the Jacobian with respect to the normalized points.

  • dp (bool, optional (default: False)) – If True, compute the (empty) Jacobian with respect to the parameters.

  • depth (Optional[ArrayLike], optional (default: None)) – Depth \(Z_c\) of the points (only for 3D world points). It can be a scalar or an array with one value per point (with the same batch shape as the points passed to invert). If None, all depths are equal to 1.0.

Returns:

  • world_points (numpy.ndarray) – The world points. Shape (n_points, input_dim).

  • jacobian_dx (Optional[numpy.ndarray]) – The Jacobian with respect to the normalized points. Shape (n_points, input_dim, 2) if dx=True, otherwise None.

  • jacobian_dp (Optional[numpy.ndarray]) – The Jacobian with respect to the parameters. Shape (n_points, input_dim, 0) if dp=True, otherwise None.

Return type:

Tuple[ndarray, ndarray | None, ndarray | None]