H-Liu1997 commited on
Commit
bb519b0
·
1 Parent(s): aec7315

Fix Y-axis flip in SimplePerspectiveCamera

Browse files
Files changed (1) hide show
  1. emage_utils/npz2pose.py +3 -1
emage_utils/npz2pose.py CHANGED
@@ -46,8 +46,10 @@ class SimplePerspectiveCamera:
46
 
47
  cx, cy = self.principal_point[0]
48
 
 
 
49
  x_screen = fx * x / z + cx
50
- y_screen = fy * y / z + cy
51
 
52
  return torch.stack([x_screen, y_screen], dim=-1)
53
 
 
46
 
47
  cx, cy = self.principal_point[0]
48
 
49
+ height = self.image_size[0][0]
50
+
51
  x_screen = fx * x / z + cx
52
+ y_screen = height - (fy * y / z + cy)
53
 
54
  return torch.stack([x_screen, y_screen], dim=-1)
55