|
16 | 16 | from .rasterize_points import rasterize_points
|
17 | 17 |
|
18 | 18 |
|
19 |
| -# Class to store the outputs of point rasterization |
20 | 19 | class PointFragments(NamedTuple):
|
| 20 | + """ |
| 21 | + Class to store the outputs of point rasterization |
| 22 | +
|
| 23 | + Members: |
| 24 | + idx: int32 Tensor of shape (N, image_size, image_size, points_per_pixel) |
| 25 | + giving the indices of the nearest points at each pixel, in ascending |
| 26 | + z-order. Concretely `idx[n, y, x, k] = p` means that `points[p]` is the kth |
| 27 | + closest point (along the z-direction) to pixel (y, x) - note that points |
| 28 | + represents the packed points of shape (P, 3). |
| 29 | + Pixels that are hit by fewer than points_per_pixel are padded with -1. |
| 30 | + zbuf: Tensor of shape (N, image_size, image_size, points_per_pixel) |
| 31 | + giving the z-coordinates of the nearest points at each pixel, sorted in |
| 32 | + z-order. Concretely, if `idx[n, y, x, k] = p` then |
| 33 | + `zbuf[n, y, x, k] = points[n, p, 2]`. Pixels hit by fewer than |
| 34 | + points_per_pixel are padded with -1. |
| 35 | + dists: Tensor of shape (N, image_size, image_size, points_per_pixel) |
| 36 | + giving the squared Euclidean distance (in NDC units) in the x/y plane |
| 37 | + for each point closest to the pixel. Concretely if `idx[n, y, x, k] = p` |
| 38 | + then `dists[n, y, x, k]` is the squared distance between the pixel (y, x) |
| 39 | + and the point `(points[n, p, 0], points[n, p, 1])`. Pixels hit with fewer |
| 40 | + than points_per_pixel are padded with -1. |
| 41 | + """ |
| 42 | + |
21 | 43 | idx: torch.Tensor
|
22 | 44 | zbuf: torch.Tensor
|
23 | 45 | dists: torch.Tensor
|
|
0 commit comments