Skip to content

Commit

Permalink
Add OpenCV standard to coordinate frame conversions
Browse files Browse the repository at this point in the history
  • Loading branch information
LvisRoot authored May 9, 2023
1 parent 27efa0f commit 80cfed6
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions kaolin/render/camera/coordinates.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,19 @@ def opengl_coords():
return torch.tensor([[1, 0, 0],
[0, 1, 0],
[0, 0, 1]])

def opencv_coords():
"""OpenCV camera coordinate convension, with Z axis looking outwards from the
camera sensor frame::
X<---------|
/|
Z |
|
Y
"""
return torch.tensor([[-1, 0, 0],
[0, -1, 0],
[0, 0, 1]])

0 comments on commit 80cfed6

Please sign in to comment.