Skip to content
This repository was archived by the owner on Jul 30, 2024. It is now read-only.
This repository was archived by the owner on Jul 30, 2024. It is now read-only.

about function get_ray_bundle #34

@UestcJay

Description

@UestcJay

thanks for your great work! I have question about getting ray_directions. can you give me some sepcific introduction?
` ii, jj = meshgrid_xy(
torch.arange(
width, dtype=tform_cam2world.dtype, device=tform_cam2world.device
).to(tform_cam2world),
torch.arange(
height, dtype=tform_cam2world.dtype, device=tform_cam2world.device
),
)

directions = torch.stack(
    [
        (ii - width * 0.5) / focal_length,
        -(jj - height * 0.5) / focal_length,
        -torch.ones_like(ii),
    ],
    dim=-1,
)
ray_directions = torch.sum(
    directions[..., None, :] * tform_cam2world[:3, :3], dim=-1
)`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions