Skip to content

A problem about half pixel shift of open3d camera #200

@XiaoXinyyx

Description

@XiaoXinyyx

In the recent update, the half pixel shift of open3d camera is fixed. And I notice the ndc2pix matrix becomes:

ndc2pix = torch.tensor([
[W / 2, 0, 0, (W-1) / 2],
[0, H / 2, 0, (H-1) / 2],
[0, 0, far-near, near],
[0, 0, 0, 1]]).float().cuda().T

which means if I transform 2 point in corners in ndc space, the result is:
( 1, 1, 0, 1) -> (W - 1 / 2, H - 1 / 2, near, 1)
(-1, -1, 0, 1) -> ( -1 / 2, -1 / 2, near, 1)

This confuses me. I think the [-1, 1] range should be mapped to [0, W] or [1/2, W-1/2], but not [-1/2, W-1/2].

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