pysdic.PlanarRigidExtrinsic._apply#
- PlanarRigidExtrinsic._apply(world_points, *, dx=False, dp=False)[source]#
Compute the transformation from 2D world points to 2D normalized points.
\[\vec{x}_n = R(\theta) \cdot \vec{x}_w + \vec{t}\]The Jacobian with respect to the world points is constant:
\[\frac{\partial \vec{x}_n}{\partial \vec{x}_w} = R(\theta)\]The Jacobian with respect to the parameters \((\theta, t_x, t_y)\) is:
\[\begin{split}\frac{\partial \vec{x}_n}{\partial \theta} = \frac{\partial R}{\partial \theta} \vec{x}_w, \qquad \frac{\partial \vec{x}_n}{\partial \vec{t}} = I_2 \qquad \text{with} \qquad \frac{\partial R}{\partial \theta} = \begin{bmatrix} -\sin(\theta) & -\cos(\theta) \\ \cos(\theta) & -\sin(\theta) \end{bmatrix}\end{split}\]- Parameters:
world_points (numpy.ndarray) – Input 2D points in world coordinates. Shape
(n_points, 2).dx (bool, optional (default:
False)) – If True, compute the Jacobian with respect to the input world points.dp (bool, optional (default:
False)) – If True, compute the Jacobian with respect to the parameters \((\theta, t_x, t_y)\).
- Returns:
normalized_points (numpy.ndarray) – Transformed 2D points in the normalized coordinate system. Shape
(n_points, 2).jacobian_dx (Optional[numpy.ndarray]) – Jacobian with respect to world 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: