Effective way to save depth maps #3959
Replies: 4 comments
-
The rendering performance greatly drops as you go to 720p. Even on high end cards like TitanX I would expect renderer to shutter significantly even if you don't save any files. So I would recommend using high resolution either at much lower rate or in computer vision mode where time doesn't matter. The pfm format is useful to get exact numerical depth value for pixel. If you are ok with only 0-255 monochrome colors and artifacts of compression, you can retrieve image as png. This probably won't be very fast because I would think bottleneck is rendering (assuming you have SSD drive). If you discover that file I/O is the real issue and you need exact floating point value of depth then you can probably still do compression using gzip in Python script and save pfm as zip file. |
Beta Was this translation helpful? Give feedback.
-
@sytelus It roughly takes two minutes to save the pfm file, so I suppose a major lag is due to the image request. As you suggested, I am running the simulator in the computer vision mode. Is it possible to have the depth visualization images in OpenNI standards i.e. as |
Beta Was this translation helpful? Give feedback.
-
We chose pfm because some off the shelf DNNs seem to use this format and also pure C++ code for load/save without any dependency was fairly simple plus there are many viewers available for pfm. Do you have any sample code to save/load images in OpenNI standard? What are the viewers available for Windows/Linux? |
Beta Was this translation helpful? Give feedback.
-
I wrote a ROS package (here) to save data published using the Zed camera. The following snippet of code to process and save the depth camera images might serve the purpose here:
The variable
|
Beta Was this translation helpful? Give feedback.
-
Hey all!
I am trying to record depth maps from the simulator in 1280 x 720 size. Since it is a large size, saving the depth maps in
pfm
format takes a lot of time. With other image types also being saved in that size, it takes 10-15 minutes for me to save one image request. I would like to know if it is possible to reduce this time by saving the depth maps in some other effective way.One alternative is to save
DepthVis
and then convert it intoDepthPerspective
. However, I am concerned if this might lead to data accuracy. Other suggestions are also welcomed!Thank you!
Beta Was this translation helpful? Give feedback.
All reactions