Skip to content

Commit 18c38ad

Browse files
davnov134facebook-github-bot
authored andcommitted
Fix opencv camera convention docs
Summary: see title Reviewed By: bottler Differential Revision: D42920739 fbshipit-source-id: 87f3d052657880b2ef58a1219bb7d4f283ab0830
1 parent c8af1c4 commit 18c38ad

File tree

1 file changed

+10
-12
lines changed

1 file changed

+10
-12
lines changed

pytorch3d/utils/camera_conversions.py

+10-12
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,11 @@ def cameras_from_opencv_projection(
4242
followed by the homogenization of `x_screen_opencv`.
4343
4444
Note:
45-
The parameters `R, tvec, camera_matrix` correspond to the outputs of
46-
`cv2.decomposeProjectionMatrix`.
47-
48-
The `rvec` parameter of the `cv2.projectPoints` is an axis-angle vector
49-
that can be converted to the rotation matrix `R` expected here by
50-
calling the `so3_exp_map` function.
45+
The parameters `R, tvec, camera_matrix` correspond to the inputs of
46+
`cv2.projectPoints(x_world, rvec, tvec, camera_matrix, [])`,
47+
where `rvec` is an axis-angle vector that can be obtained from
48+
the rotation matrix `R` expected here by calling the `so3_log_map` function.
49+
Correspondingly, `R` can be obtained from `rvec` by calling `so3_exp_map`.
5150
5251
Args:
5352
R: A batch of rotation matrices of shape `(N, 3, 3)`.
@@ -73,12 +72,11 @@ def opencv_from_cameras_projection(
7372
of `cameras_from_opencv_projection`.
7473
7574
Note:
76-
The outputs `R, tvec, camera_matrix` correspond to the outputs of
77-
`cv2.decomposeProjectionMatrix`.
78-
79-
The `rvec` parameter of the `cv2.projectPoints` is an axis-angle vector
80-
that can be converted from the returned rotation matrix `R` here by
81-
calling the `so3_log_map` function.
75+
The outputs `R, tvec, camera_matrix` correspond to the inputs of
76+
`cv2.projectPoints(x_world, rvec, tvec, camera_matrix, [])`,
77+
where `rvec` is an axis-angle vector that can be obtained from
78+
the rotation matrix `R` output here by calling the `so3_log_map` function.
79+
Correspondingly, `R` can be obtained from `rvec` by calling `so3_exp_map`.
8280
8381
Args:
8482
cameras: A batch of `N` cameras in the PyTorch3D convention.

0 commit comments

Comments
 (0)