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

Docs: How is RGB-D data packed in result? #11

Open
Kjos opened this issue Oct 9, 2019 · 7 comments
Open

Docs: How is RGB-D data packed in result? #11

Kjos opened this issue Oct 9, 2019 · 7 comments

Comments

@Kjos
Copy link

Kjos commented Oct 9, 2019

I couldn't find any examples or relevant code about how the resulting RGB-D videos and images are packed.

In the past I've seen that facebook uses the lower half of the video to pack 24 bits depth in the RGB channels (or YUV for that matter).

@yashpatel5400
Copy link

Hey @Kjos -- great question! We support several binary output formats from the pipeline (see source/mesh_stream/ConvertToBinary.cpp for a full list).

The workflow we ended up using most often (documented here: https://facebook.github.io/facebook360_dep/docs/workflow) is producing .vtx, .idx, and .bc7 binaries, which we then stripe into aggregated binary files for consumption by the viewers. If you were looking to use this typical workflow, we recommend running the UI, since it is structured with that workflow in mind.

@Kjos
Copy link
Author

Kjos commented Oct 9, 2019 via email

@aparrapo
Copy link
Contributor

aparrapo commented Oct 9, 2019

@Kjos we can also generate RGBD outputs as top-bottom representations, like this:
rgbd

@Kjos
Copy link
Author

Kjos commented Oct 9, 2019 via email

@aparrapo
Copy link
Contributor

aparrapo commented Oct 9, 2019

We chose the top-bottom format for RGBD frames because we saw a handful of existing players that were using it.
The depth is single channel because it only contains distance information. It could be embedded as the alpha channel of an RGBA if the player expects that.
We can also generate depthmaps in pfm format to keep floating point precision.

So, the bottom line is that we can generate a lot of different formats, and the code can be easily extended to support others too.

@Kjos
Copy link
Author

Kjos commented Oct 9, 2019 via email

@aparrapo
Copy link
Contributor

Sorry about the confusion. You can save the depth as PFM and you get 32bit floating point accuracy, and no precision is lost.

The depth is stored as a disparity map = 1 / depth, so non linear in depth space.

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

3 participants