pysdic.WorldPlaneOrthographicExtrinsic._apply#
- WorldPlaneOrthographicExtrinsic._apply(world_points, *, dx=False, dp=False)[source]#
Compute the transformation from 2D world points of the plane \(Z_w = 0\) to 2D normalized points.
\[\vec{x}_n = M \vec{x}_w + \vec{t} \quad \text{with} \quad M = R_{:2, :2}\]The Jacobian with respect to the world points is constant:
\[\frac{\partial \vec{x}_n}{\partial \vec{x}_w} = M\]The Jacobian with respect to the parameters \((\vec{r}, T)\) is:
\[\frac{\partial \vec{x}_n}{\partial r_k} = \frac{\partial M}{\partial r_k} \vec{x}_w, \qquad \frac{\partial \vec{x}_n}{\partial (t_x, t_y)} = I_2, \qquad \frac{\partial \vec{x}_n}{\partial t_z} = 0\]where \(\frac{\partial M}{\partial r_k}\) is extracted from
cv2.Rodrigues.- Parameters:
world_points (numpy.ndarray) – Input 2D points of the world plane. 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 extrinsic parameters.
- Returns:
normalized_points (numpy.ndarray) – The normalized points in camera coordinates. Shape
(n_points, 2).jacobian_dx (Optional[numpy.ndarray]) – Jacobian of normalized points with respect to world points. Shape
(n_points, 2, 2)ifdx=True, otherwiseNone.jacobian_dp (Optional[numpy.ndarray]) – Jacobian of normalized points with respect to extrinsic parameters. Shape
(n_points, 2, 6)ifdp=True, otherwiseNone.
- Return type: