-
Notifications
You must be signed in to change notification settings - Fork 427
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
Obtain Intrinsic Matrix #2439
Comments
Here are my configs:
|
Hey @21yrm, If you are attempting to unproject a pinhole camera (i.e., to acquire the 3D ray which corresponds to a 2D point on the viewport) you can use this function: https://aihabitat.org/docs/habitat-sim/habitat_sim.gfx.Camera.html#unproject You can also reverse engineer the implementation if you track this through the source code to understand how it came about. There is also a function to do the opposite (manual 3D -> 2D projection). |
Based on the manual from 3D->2D projection given by @aclegg3 , intrinsic matrix can be calculated by the render matrix and viewport.
|
I use Habitat-sim to obtain RGBD image. And I want to obtain 3d xyz coordinates from the image.
My image size is 1920 x 1080.
I am using a PINHOLE camera.
Q1: 1/focal_length = 2/W * tan(hfov/2), is focal_length in my setting 960?
Q2: focal_length_x is equal to focal_length_y?
Q3: What is the value of cx and cy? Normally, cx = width/2 but i saw in some tutorial, cx and cy are both 0 due to OpenGL, quite confused
Q4: What is the intrinsic matrix? Is it
[960, 0., 960],
[0., 960, 540],
[0., 0., 1]
Thank you very much!
The text was updated successfully, but these errors were encountered: