Share via


ImageFormat.DepthPointCloud Field

Definition

Caution

This constant will be removed in the future version. Use Android.Graphics.ImageFormatType enum directly instead of this field.

Android sparse depth point cloud format.

[Android.Runtime.Register("DEPTH_POINT_CLOUD", ApiSince=23)]
[System.Obsolete("This constant will be removed in the future version. Use Android.Graphics.ImageFormatType enum directly instead of this field.", true)]
public const Android.Graphics.ImageFormatType DepthPointCloud = 257;
[<Android.Runtime.Register("DEPTH_POINT_CLOUD", ApiSince=23)>]
[<System.Obsolete("This constant will be removed in the future version. Use Android.Graphics.ImageFormatType enum directly instead of this field.", true)>]
val mutable DepthPointCloud : Android.Graphics.ImageFormatType

Field Value

Value = 257
Attributes

Remarks

Android sparse depth point cloud format.

A variable-length list of 3D points plus a confidence value, with each point represented by four floats; first the X, Y, Z position coordinates, and then the confidence value.

The number of points is (size of the buffer in bytes) / 16.

The coordinate system and units of the position values depend on the source of the point cloud data. The confidence value is between 0.f and 1.f, inclusive, with 0 representing 0% confidence and 1.f representing 100% confidence in the measured position values.

As an example, the following code extracts the first depth point in a DEPTH_POINT_CLOUD format android.media.Image:

FloatBuffer floatDepthBuffer = img.getPlanes()[0].getBuffer().asFloatBuffer();
               float x = floatDepthBuffer.get();
               float y = floatDepthBuffer.get();
               float z = floatDepthBuffer.get();
               float confidence = floatDepthBuffer.get();

For camera devices that support the android.hardware.camera2.CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES_DEPTH_OUTPUT DEPTH_OUTPUT capability, DEPTH_POINT_CLOUD coordinates have units of meters, and the coordinate system is defined by the camera's pose transforms: android.hardware.camera2.CameraCharacteristics#LENS_POSE_TRANSLATION and android.hardware.camera2.CameraCharacteristics#LENS_POSE_ROTATION. That means the origin is the optical center of the camera device, and the positive Z axis points along the camera's optical axis, toward the scene.

Java documentation for android.graphics.ImageFormat.DEPTH_POINT_CLOUD.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to