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

Function normalize_vecs

freesplatter/utils/camera_util.py:5–9  ·  view source on GitHub ↗

Normalize vector lengths.

(vectors: torch.Tensor)

Source from the content-addressed store, hash-verified

3
4
5def normalize_vecs(vectors: torch.Tensor) -> torch.Tensor:
6 """
7 Normalize vector lengths.
8 """
9 return vectors / (torch.norm(vectors, dim=-1, keepdim=True))
10
11
12def blender_to_opencv(camera_matrix: torch.Tensor):

Callers 1

create_camera_to_worldFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected