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

when saving RGBD D2C-aligned data to disk, the data size is huge #131

Open
bowieshi opened this issue Sep 20, 2024 · 1 comment
Open

when saving RGBD D2C-aligned data to disk, the data size is huge #131

bowieshi opened this issue Sep 20, 2024 · 1 comment

Comments

@bowieshi
Copy link

Hi. I am using D2C alignment to save RGB color image and depth image to my disk. However, after alignment, the depth image will have the same size as the color image (grow from 640x576 to 1280x960). Further the depth is stored with float32, which takes up space much larger than uint8. So for single depth image it may takes up over 2.5MB while the same size color image only takes up around 300kb. This means a 1 mins video may takes up over 5GB storage.
I have 2 idea to alleviate this problem:

  1. save the depth image in original 640x576. Do D2C alignment when post-processing it. I wonder that is there any D2C alignment code we can use to do the post-processing?
  2. save them in more compacted form like video; I looked through SDK manual book and examples. It seems no video forms storage is supported.

Can I ask for some advice from you how can I storage the RGBD data in a efficient format? Thank you very much.

@zhonghong322
Copy link
Contributor

First, you can call this interface. Its function is to set whether the depth after D2C (depth-to-color alignment) should be scaled to the resolution of the color image. If set to false, it will not be scaled to the color resolution. When set to false, the resolution of the depth after D2C needs to be scaled to match the color resolution for proper alignment.

   /**
 * @brief Set whether the depth needs to be scaled after setting D2C
 *
 * @param enable Whether scaling is required
 */
void setDepthScaleRequire(bool enable);

config->setDepthScaleRequire(false);

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