depth16 constant

int const depth16

Android dense depth image format.

Each pixel is 16 bits, representing a depth ranging measurement from a depth camera or similar sensor. The 16-bit sample consists of a confidence value and the actual ranging measurement.

The confidence value is an estimate of correctness for this sample. It is encoded in the 3 most significant bits of the sample, with a value of 0 representing 100% confidence, a value of 1 representing 0% confidence, a value of 2 representing 1/7, a value of 3 representing 2/7, and so on.

This format assumes

  • an even width
  • an even height
  • a horizontal stride multiple of 16 pixels

y_size = stride * height

When produced by a camera, the units for the range are millimeters.

See: https://developer.android.com/reference/android/graphics/ImageFormat#DEPTH16

Implementation

static const int depth16 = 0x44363159;