-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Question on the cameras and the projection matrices #826
Comments
Camera models are always a pain to get right. I haven't bothered about the intrinsic at all, so I cannot help you with that. Regarding the world to pixel space though I think I can help. Regarding the I also want to point out that OpenGL uses column-major matrices, so they might be the transposed version of what you would expect (this is covered in the blog too). |
Thank you for the answer, now it is way clearer. It is still not clear to me what is the point of projecting in the NDC space. Thanks a lot for your availability |
NDC is nothing more than a 3D representation of the distorted (after the perspective transform) space. Definitely, you could skip it, but in general, I find it useful because it is still a 3D representation (you have a sense of depth), in which you have the comforts of orthographic projection (rays are parallel to each other, ray direction is just |
I think you missed the third difference that your camera z axis is opposite with opengl camera. |
The sign I mentioned affects just the z axis. The code is pretty clear on how the sign is used. while this code uses: |
If we put |
Ok, I see where the mixup is. You are right, the camera space here, unlike OpenGL, has a positive z-axis, so the boundaries are |
In my use case, I need to reproject the points from the camera pixels to the world reference frame, given also the depth taken from the rasterization of the gaussian.
Until now I was using the FoV variables and the extrinsics, and performing the calculations of the Pinhole camera model, but I obtained wrong results.
Is it something to do with the projection matrix taken from getProjectionMatrix?
Could someone give me some clarifications on what the projectionmatrix and fullprojectionmatrix are, and why are they 4x4?
Any help would be much appreciated
The text was updated successfully, but these errors were encountered: