pythonpngpoint-cloud-librarydepth

Converting Kinect depth to png (python)


I try to verify a segmenting algorithm and therefore i need some good data. I want to use the NYU Depth V2 dataset (http://cs.nyu.edu/~silberman/datasets/nyu_depth_v2.html). Now i want to create some pcd-data, with the point-cloud-library png2pcd method. But I need a color- and a depth-image. The colored one is no problem, but the depth is saved as float in meter. So basically values like these:

[[ 2.75201321 2.75206947 2.75221062 ...

Is there a possibility to save those values in a png-file, without scaling them in python?


Solution

  • No. It is not possible to store floating point values in a PNG. The highest resolution data you can store in a PNG is a 16-bit unsigned integer per sample, in the range 0..65535.

    If you want to store floating point distances you need to look to: