MCPcopy Create free account
hub / github.com/DNA-Rendering/DNA-Rendering / geom_transform_points

Function geom_transform_points

scripts/3DGS/utils/graphics_utils.py:22–29  ·  view source on GitHub ↗
(points, transf_matrix)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected