pysdic.PlanarRigidExtrinsic._invert#
- PlanarRigidExtrinsic._invert(normalized_points, *, dx=False, dp=False)[source]#
Compute the inverse transformation from 2D normalized points to 2D world points.
\[\vec{x}_w = R(\theta)^T \cdot (\vec{x}_n - \vec{t})\]The Jacobian with respect to the normalized points is constant:
\[\frac{\partial \vec{x}_w}{\partial \vec{x}_n} = R(\theta)^T\]The Jacobian with respect to the parameters \((\theta, t_x, t_y)\) is:
\[\frac{\partial \vec{x}_w}{\partial \theta} = \frac{\partial R}{\partial \theta}^T (\vec{x}_n - \vec{t}), \qquad \frac{\partial \vec{x}_w}{\partial \vec{t}} = - R(\theta)^T\]- Parameters:
normalized_points (numpy.ndarray) – Input 2D points in the normalized coordinate system. Shape
(n_points, 2).dx (bool, optional (default:
False)) – If True, compute the Jacobian with respect to the input normalized points.dp (bool, optional (default:
False)) – If True, compute the Jacobian with respect to the parameters \((\theta, t_x, t_y)\).
- Returns:
world_points (numpy.ndarray) – Transformed 2D points in world coordinates. Shape
(n_points, 2).jacobian_dx (Optional[numpy.ndarray]) – Jacobian with respect to normalized points. Shape
(n_points, 2, 2)ifdx=True, otherwiseNone.jacobian_dp (Optional[numpy.ndarray]) – Jacobian with respect to the parameters. Shape
(n_points, 2, 3)ifdp=True, otherwiseNone.
- Return type: