pycvcam.OrthographicExtrinsic._compute_rays#
- OrthographicExtrinsic._compute_rays(normalized_points)[source]#
Computes the rays from the camera to the scene for the the extrinsic model in the world coordinate system.
The ray structure is as follows:
The first 3 elements are the origin of the ray in the world coordinate system (the normalized points with z=1 and a change of coordinate system).
The last 3 elements are the direction of the ray in the world coordinate system, which is always (0, 0, 1) in the camera coordinate system.
Lets \(\vec{X}_n\) the 3D normalized points, with coordinates \((x_n, y_n, 1.0)\) in the camera coordinate system.
The points in the world coordinate system are computed as follows:
\[\begin{split}\begin{align*} \vec{X}_w &= R^{-1} \cdot (\vec{X}_n - T) \\ \vec{O}_w &= - R^{-1} \cdot T \end{align*}\end{split}\]The origin of the ray in the world coordinate system is the normalized points \(\vec{X}_w\) in world coordinates and the direction of the ray is the normalized vector (0, 0, 1) in which the transformation is applied.
- Parameters:
normalized_points (numpy.ndarray) – The normalized points in the camera coordinate system. Shape (n_points, 2).
- Returns:
The rays in the world coordinate system. Shape (n_points, 6).
- Return type: