MCPcopy Create free account
hub / github.com/DSL-Lab/StreamSplat / geom_transform_points

Function geom_transform_points

utils/graphics_utils.py:23–30  ·  view source on GitHub ↗
(points, transf_matrix)

Source from the content-addressed store, hash-verified

21 time : np.array = None
22
23def geom_transform_points(points, transf_matrix):
24 P, _ = points.shape
25 ones = torch.ones(P, 1, dtype=points.dtype, device=points.device)
26 points_hom = torch.cat([points, ones], dim=1)
27 points_out = torch.matmul(points_hom, transf_matrix.unsqueeze(0))
28
29 denom = points_out[..., 3:] + 0.0000001
30 return (points_out[..., :3] / denom).squeeze(dim=0)
31
32def getWorld2View(R, t):
33 Rt = np.zeros((4, 4))

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected