語言

ImageFormat.DepthPointCloud 欄位

定義

警告

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

Android 稀疏深度點雲格式。

[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

欄位值

Value = 257
屬性

備註

Android 稀疏深度點雲格式。

一個可變長度的三維點列表加上一個信心值,每個點由四個浮點數表示;首先是 X、Y、Z 位置座標,接著是置信值。

分數為 (size of the buffer in bytes) / 16

座標系與位置值單位依據點雲資料來源而定。 信心值介於0.f至1.f之間(含含),0代表0% 信心,1.f代表對測得位置值的100% 信心。

舉例來說,以下程式碼以DEPTH_POINT_CLOUD格式 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();

對於支援此功能 android.hardware.camera2.CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES_DEPTH_OUTPUT DEPTH_OUTPUT 的相機裝置,DEPTH_POINT_CLOUD座標單位為公尺,座標系由相機的姿態轉換定義: android.hardware.camera2.CameraCharacteristics#LENS_POSE_TRANSLATIONandroid.hardware.camera2.CameraCharacteristics#LENS_POSE_ROTATION。 這表示原點是相機裝置的光學中心,正 Z 軸沿著相機的光學軸指向場景。

Java 文件 android.graphics.ImageFormat.DEPTH_POINT_CLOUD

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於