Skip to content

Commit

Permalink
Add OpenCV standard to coordinate frame conversions
Browse files Browse the repository at this point in the history
Signed-off-by: Claus Smitt <[email protected]>
  • Loading branch information
LvisRoot committed May 9, 2023
1 parent 27efa0f commit 77d78d2
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 77d78d2

Please sign in to comment.