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

3DGS visualization #2

Open
MITNKU opened this issue May 14, 2024 · 1 comment
Open

3DGS visualization #2

MITNKU opened this issue May 14, 2024 · 1 comment

Comments

@MITNKU
Copy link

MITNKU commented May 14, 2024

image
Excellent work, I would like to ask how to project 3DGS point clouds onto the corresponding rendered image? What reference materials are there to learn from?

@fatPeter
Copy link
Owner

Thank you for your interests.
It is perspective projection.
Please check out diff-gaussian-rasterization/cuda_rasterizer/forward.cu line 196 to 200:
// Transform point by projecting
float3 p_orig = { orig_points[3 * idx], orig_points[3 * idx + 1], orig_points[3 * idx + 2] };
float4 p_hom = transformPoint4x4(p_orig, projmatrix);
float p_w = 1.0f / (p_hom.w + 0.0000001f);
float3 p_proj = { p_hom.x * p_w, p_hom.y * p_w, p_hom.z * p_w };
and line 233:
float2 point_image = { ndc2Pix(p_proj.x, W), ndc2Pix(p_proj.y, H) };

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