MCPcopy Create free account
hub / github.com/dcharatan/flowmap / homogenize_points

Function homogenize_points

flowmap/model/projection.py:11–15  ·  view source on GitHub ↗

Convert batched points (xyz) to (xyz1).

(
    points: Float[Tensor, "*batch dim"],
)

Source from the content-addressed store, hash-verified

9
10
11def homogenize_points(
12 points: Float[Tensor, "*batch dim"],
13) -> Float[Tensor, "*batch dim+1"]:
14 """Convert batched points (xyz) to (xyz1)."""
15 return torch.cat([points, torch.ones_like(points[..., :1])], dim=-1)
16
17
18def homogenize_vectors(

Callers 10

get_frustumsFunction · 0.90
load_birdsFunction · 0.90
projectFunction · 0.85
unprojectFunction · 0.85
reproject_pointsFunction · 0.85
export_to_colmapFunction · 0.85

Calls 1

catMethod · 0.80

Tested by

no test coverage detected