語言

ImageFormat.Raw14 欄位

定義

警告

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

Android 14 位元 原始格式

[Android.Runtime.Register("RAW14", ApiSince=37)]
[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 Raw14 = 44;
[<Android.Runtime.Register("RAW14", ApiSince=37)>]
[<System.Obsolete("This constant will be removed in the future version. Use Android.Graphics.ImageFormatType enum directly instead of this field.", true)>]
val mutable Raw14 : Android.Graphics.ImageFormatType

欄位值

Value = 44
屬性

備註

Android 14 位元 原始格式

這是一種單平面、每像素 14 位元、密集填充(每列)未處理的格式,通常代表來自影像感測器的原始拜耳圖案影像。

在此格式的影像緩衝區中,從每列的第一個像素開始,將四個連續像素打包成7個位元組(56位元)。 前四個位元組包含前四個像素中最重要的 8 位元。 最後三個位元組包含四個像素中的 6 個最低有效位元,依序排列,以下為每個連續像素的精確佈局資料(Pi[j] 代表第 i 個像素的第 j 位元):

         bit 7    bit 6    bit 5    bit 4    bit 3    bit 2    bit 1    bit 0
Byte 0:  P0[13]   P0[12]   P0[11]   P0[10]   P0[ 9]   P0[ 8]   P0[ 7]   P0[ 6]
Byte 1:  P1[13]   P1[12]   P1[11]   P1[10]   P1[ 9]   P1[ 8]   P1[ 7]   P1[ 6]
Byte 2:  P2[13]   P2[12]   P2[11]   P2[10]   P2[ 9]   P2[ 8]   P2[ 7]   P2[ 6]
Byte 3:  P3[13]   P3[12]   P3[11]   P3[10]   P3[ 9]   P3[ 8]   P3[ 7]   P3[ 6]
Byte 4:  P1[ 1]   P1[ 0]   P0[ 5]   P0[ 4]   P0[ 3]   P0[ 2]   P0[ 1]   P0[ 0]
Byte 5:  P2[ 3]   P2[ 2]   P2[ 1]   P2[ 0]   P1[ 5]   P1[ 4]   P1[ 3]   P1[ 2]
Byte 6:  P3[ 5]   P3[ 4]   P3[ 3]   P3[ 2]   P3[ 1]   P3[ 0]   P2[ 5]   P2[ 4]

此格式假設寬度為 4 像素的整數倍,且高度為偶數。

size = row stride * height

其中列步幅以位元組為單位,而非像素。

由於這是一個密集的格式,像素步幅總是為 0。 應用程式必須使用上述表格中定義的像素資料配置來存取每一列資料。 當列步幅等於寬度 * (14 / 8) 時,每列末尾不會有填充位元組,整個影像資料是密集填充的。 當步幅大於寬度 * (14 / 8) 時,每列末端會有填充位元組。

例如,影像物件可以透過 ImageReader 物件從 CameraDevice(若支援)提供此格式的資料。 Image#getPlanes() 會回傳一個包含像素資料的平面。 在 Image.Plane.getPixelStride() 中,像素步幅始終為 0,而 Image.Plane.getRowStride() 描述相鄰列間垂直相鄰像素距離(以位元組為單位)。

Android 參考資料。android.graphics.ImageFormat.RAW14

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

適用於