Depth Image Encoding

Depth Images are encoded as RGB PNG images. The RGB image represents a 24-bit integer value for each pixel with a fixed resolution of 1/256 of a millimeter.

  • Each bit of blue represents 1/256 millimeter.

  • Each bit of green represents 1 millimeter.

  • Each bit of red represents 256 millimeters.

  • The maximum representable depth is ~65 meters.

The visual effect is of a topographic map of the depth values. In the middle image below, each green-blue band corresponds to one bit of red, which corresponds to a depth range of 256 millimeters.

Python functions to encode and decode this format are included in the linked file, depth_image_encoding.py.

8-bit gray scale depth image of paraboloid

8-bit gray-scale depth image of a paraboloid.

The white pixels have depth values outside the representable range of 65m.

The depth values in this image are scaled to cover the full

range, as in the third image below.

24-bit RGB-encoded depth image of a paraboloid.

Each green band represents a depth range of 256mm.

The blue values are essentially noise in this image.

The range of red values is too small to be apparent.

24-bit RGB-encoded depth image of a paraboloid, scaled to cover the range of z-values.

The white pixels have depth values outside the representable range of 65m.

The green and blue values are essentially noise. The patterns you see in this image are moire patterns.

24-bit RGB image of paraboloid
24-bit RGB image of paraboloid scaled to span representable range