pysdic.WorldPlaneOrthographicExtrinsic._invert#
- WorldPlaneOrthographicExtrinsic._invert(normalized_points, *, dx=False, dp=False)[source]#
Compute the inverse transformation from 2D normalized points to 2D world points of the plane \(Z_w = 0\) (intersection of the camera rays with the plane).
\[\vec{x}_w = M^{-1} (\vec{x}_n - \vec{t})\]The Jacobian with respect to the normalized points is constant:
\[\frac{\partial \vec{x}_w}{\partial \vec{x}_n} = M^{-1}\]The Jacobian with respect to the parameters \((\vec{r}, T)\) is:
\[\frac{\partial \vec{x}_w}{\partial r_k} = - M^{-1} \frac{\partial M}{\partial r_k} \vec{x}_w, \qquad \frac{\partial \vec{x}_w}{\partial (t_x, t_y)} = - M^{-1}, \qquad \frac{\partial \vec{x}_w}{\partial t_z} = 0\]- Parameters:
normalized_points (numpy.ndarray) – Input 2D normalized points in camera coordinates. Shape
(n_points, 2).dx (bool, optional (default:
False)) – If True, compute the Jacobian with respect to normalized points.dp (bool, optional (default:
False)) – If True, compute the Jacobian with respect to extrinsic parameters.
- Returns:
world_points (numpy.ndarray) – 2D points of the world plane. Shape
(n_points, 2).jacobian_dx (Optional[numpy.ndarray]) – Jacobian of world points with respect to normalized points. Shape
(n_points, 2, 2)ifdx=True, otherwiseNone.jacobian_dp (Optional[numpy.ndarray]) – Jacobian of world points with respect to extrinsic parameters. Shape
(n_points, 2, 6)ifdp=True, otherwiseNone.
- Raises:
ValueError – If the plane is seen edge-on (the optical axis is parallel to the plane).
- Return type: