Skip to content

Commit 80cfed6

Browse files
authored
Add OpenCV standard to coordinate frame conversions
1 parent 27efa0f commit 80cfed6

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

kaolin/render/camera/coordinates.py

+16
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,19 @@ def opengl_coords():
6161
return torch.tensor([[1, 0, 0],
6262
[0, 1, 0],
6363
[0, 0, 1]])
64+
65+
def opencv_coords():
66+
"""OpenCV camera coordinate convension, with Z axis looking outwards from the
67+
camera sensor frame::
68+
69+
X<---------|
70+
/|
71+
Z |
72+
|
73+
74+
Y
75+
76+
"""
77+
return torch.tensor([[-1, 0, 0],
78+
[0, -1, 0],
79+
[0, 0, 1]])

0 commit comments

Comments
 (0)