Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why adding a negative sign to the ray direction in NeuRay? #41

Open
thucz opened this issue May 14, 2024 · 2 comments
Open

Why adding a negative sign to the ray direction in NeuRay? #41

thucz opened this issue May 14, 2024 · 2 comments

Comments

@thucz
Copy link

thucz commented May 14, 2024

Hi! I do not understand why here you add a negative sign.

que_dir = -directions / torch.norm(directions, dim=2, keepdim=True) # qn,rn,3

@liuyuan-pal
Copy link
Owner

Hi, I use the direction from the scene to the camera here. You may also use the direction from the camera to the scene.

@thucz
Copy link
Author

thucz commented May 14, 2024

Thanks!
But I still have another question. The code considers that |depth|<1e-4 is invalid. But in OpenCV camera coordinate system, when the depth of a 3D sample point is negative, the value should be invalid as its position is behind the camera. So I think depth < 1e-4 should be invalid.

invalid_mask = torch.abs(depth)<1e-4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants