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

Depth scale #5

Open
VladimirYugay opened this issue May 18, 2021 · 1 comment
Open

Depth scale #5

VladimirYugay opened this issue May 18, 2021 · 1 comment

Comments

@VladimirYugay
Copy link

Hey there,

Thanks for your work.

I'm currently reading depth maps with this and obtain them in .raw format. Do you know any way to convert it properly to the depth in meters? The values inside are integer values, and just normalizing it to [0, 1] range doesn't make much sense.

@oscarmcnulty
Copy link
Owner

The depth matrix you are seeing is likely in the "clip" space. To transform to the view space (regular cartesian coords relative to camera position) you need to transform it using the "projection" matrix which should also be captured from the game engine. The units for the view space coordinate system and whether you need to scale the raw depth values to [0, 1] before transforming would depend on how the projection matrix and depth matrix are captured/stored.

To transform clip space to view space for this dataset you can see the example code here

There is some detail in the thesis on page 26 about what clip space is and how the rendering pipeline works.

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