DLR-RM / BlenderProc

A procedural Blender pipeline for photorealistic training image generation
GNU General Public License v3.0
2.6k stars 432 forks source link

How to generate depth images with the same parameters as my camera Zed2i ? #1093

Open joaoparaujo01 opened 3 weeks ago

joaoparaujo01 commented 3 weeks ago

Describe the issue

I have this question because getting the grayscale by my camera and generating synthetic ones is different: For my camera the nearest objects is with the pixel value of 255 and for the synthetic images is 0 The depth range i think it would be different because the grayscale is [0,255] and each value represent a diferent value of distance related to the depth range. So how could i define the depth range on blenderproc? Another topic is that the grayscale of the depth image on the zed2i is 16 bit and for the synthetic depth images is 8 bit. How could i change that? Thanks in advance!

Minimal code example

No response

Files required to run the code

No response

Expected behavior

...

BlenderProc version

v2.7.1

cornerfarmer commented 3 weeks ago

Hey @joaoparaujo01,

blenderproc outputs depth/distance values as float values in meters. So you should be able to transform them into any scale you like.

joaoparaujo01 commented 3 weeks ago

Thanks for the answer. Can you give me a simple example on how i could do that?