Best format for depth images?

150 views
Skip to first unread message

Fabio Maria Carlucci

unread,
Mar 9, 2016, 9:26:10 AM3/9/16
to Caffe Users
Hi,
I want to experiment with Caffe on Depth Images (images where each pixel represents the distance from the camera) obtained with a Kinect sensor.
These images are grayscale and have around 12 bits of precision. 

My question is: what is the most adequate format for training a testing a Caffe network?
I was thinking about grayscale 16 bit PNGs, but I'm not sure it's the best idea.

Jan

unread,
Mar 9, 2016, 9:37:43 AM3/9/16
to Caffe Users
I would write a python script that preprocesses the images directly and stores them into a HDF5 or LMDB db (your preference) as floating point data. I heard that these depth values are not really linearly scaled and that you have to do some kind of "gamma correction" to map them to distance units.

Jan

Fabio Maria Carlucci

unread,
Mar 10, 2016, 4:16:39 AM3/10/16
to Caffe Users
I really would prefer to use an image format, mainly so that i can automatically make caffe flip and crop the data. If i consider millimeters are the base scale i can have integers from 0 to 65536 (65m) which is more than long enough for my purposes... so 16bit grayscale PNG is it?

Jan

unread,
Mar 10, 2016, 4:21:16 AM3/10/16
to Caffe Users
If you really want/need a classical image format, 16bit PNG is probably not a bad choice.

Jan

Fabio Maria Carlucci

unread,
Mar 10, 2016, 4:41:40 AM3/10/16
to Caffe Users
Thanks!
Reply all
Reply to author
Forward
0 new messages