You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Usually, the camera parameters for a camera model should consist of f, c, R, and t, and they have 1, 2, 3 (rotation angle), 3 parameters.
Even if we use the camera coordinate only instead of the world coordinate, the formula still requires f and c. In this case, the projected 2d points p2 of 3d points p3 should be with formula $$p_2 = f\cdot(p_3[:2]/p_3[2] - c)$$
And I found that the code in this repo for orthographic projection is:
def orthographic_projection(X, camera):
"""Perform orthographic projection of 3D points X using the camera parameters
Args:
X: size = [B, N, 3]
camera: size = [B, 3]
Returns:
Projected 2D points -- size = [B, N, 2]
"""
camera = camera.view(-1, 1, 3)
X_trans = X[:, :, :2] + camera[:, :, 1:]
shape = X_trans.shape
X_2d = (camera[:, :, 0] * X_trans.view(shape[0], -1)).view(shape)
return X_2d
The 3d points wasn't devided by its value on z axis, which would result a orthogonal projection instead of orthomal projection
The text was updated successfully, but these errors were encountered:
Usually, the camera parameters for a camera model should consist of f, c, R, and t, and they have 1, 2, 3 (rotation angle), 3 parameters.
$$p_2 = f\cdot(p_3[:2]/p_3[2] - c)$$
Even if we use the camera coordinate only instead of the world coordinate, the formula still requires f and c. In this case, the projected 2d points p2 of 3d points p3 should be with formula
And I found that the code in this repo for orthographic projection is:
The 3d points wasn't devided by its value on z axis, which would result a orthogonal projection instead of orthomal projection
The text was updated successfully, but these errors were encountered: