MCPcopy Create free account
hub / github.com/TencentARC/FreeSplatter / homogenize_points

Function homogenize_points

freesplatter/utils/geometry_util.py:26–28  ·  view source on GitHub ↗

Append a '1' along the final dimension of the tensor (i.e. convert xyz->xyz1)

(points)

Source from the content-addressed store, hash-verified

24# --- Projections ---
25
26def homogenize_points(points):
27 """Append a '1' along the final dimension of the tensor (i.e. convert xyz->xyz1)"""
28 return torch.cat([points, torch.ones_like(points[..., :1])], dim=-1)
29
30
31def normalize_homogenous_points(points):

Callers 3

Calls

no outgoing calls

Tested by

no test coverage detected