Fix opencv camera convention docs

Summary: see title

Reviewed By: bottler

Differential Revision: D42920739

fbshipit-source-id: 87f3d052657880b2ef58a1219bb7d4f283ab0830
This commit is contained in:
David Novotny 2023-02-01 05:05:23 -08:00 committed by Facebook GitHub Bot
parent c8af1c45ca
commit 18c38ad600

View File

@ -42,12 +42,11 @@ def cameras_from_opencv_projection(
followed by the homogenization of `x_screen_opencv`.
Note:
The parameters `R, tvec, camera_matrix` correspond to the outputs of
`cv2.decomposeProjectionMatrix`.
The `rvec` parameter of the `cv2.projectPoints` is an axis-angle vector
that can be converted to the rotation matrix `R` expected here by
calling the `so3_exp_map` function.
The parameters `R, tvec, camera_matrix` correspond to the inputs of
`cv2.projectPoints(x_world, rvec, tvec, camera_matrix, [])`,
where `rvec` is an axis-angle vector that can be obtained from
the rotation matrix `R` expected here by calling the `so3_log_map` function.
Correspondingly, `R` can be obtained from `rvec` by calling `so3_exp_map`.
Args:
R: A batch of rotation matrices of shape `(N, 3, 3)`.
@ -73,12 +72,11 @@ def opencv_from_cameras_projection(
of `cameras_from_opencv_projection`.
Note:
The outputs `R, tvec, camera_matrix` correspond to the outputs of
`cv2.decomposeProjectionMatrix`.
The `rvec` parameter of the `cv2.projectPoints` is an axis-angle vector
that can be converted from the returned rotation matrix `R` here by
calling the `so3_log_map` function.
The outputs `R, tvec, camera_matrix` correspond to the inputs of
`cv2.projectPoints(x_world, rvec, tvec, camera_matrix, [])`,
where `rvec` is an axis-angle vector that can be obtained from
the rotation matrix `R` output here by calling the `so3_log_map` function.
Correspondingly, `R` can be obtained from `rvec` by calling `so3_exp_map`.
Args:
cameras: A batch of `N` cameras in the PyTorch3D convention.