StreamAnnotation

有關 Vision AI 串流資源註解的訊息。

JSON 表示法
{
  "id": string,
  "displayName": string,
  "sourceStream": string,
  "type": enum (StreamAnnotationType),

  // Union field annotation_payload can be only one of the following:
  "activeZone": {
    object (NormalizedPolygon)
  },
  "crossingLine": {
    object (NormalizedPolyline)
  }
  // End of list of possible types for union field annotation_payload.
}
欄位
id

string

註解的 ID。在特定情境中使用時,此值不得重複。例如,Vision AI 應用程式中一個輸入串流的所有註解。

displayName

string

註解的易記名稱。

sourceStream

string

Vision AI 串流資源名稱。

type

enum (StreamAnnotationType)

實際的註解類型。

聯集欄位 annotation_payload

annotation_payload 只能是下列其中一項:

activeZone

object (NormalizedPolygon)

ACTIVE_ZONE 類型的註解

crossingLine

object (NormalizedPolyline)

CROSSING_LINE 類型的註解

NormalizedPolygon

已正規化的多邊形。

JSON 表示法
{
  "normalizedVertices": [
    {
      object (NormalizedVertex)
    }
  ]
}
欄位
normalizedVertices[]

object (NormalizedVertex)

界線多邊形的正規化頂點。圖片左上角的座標為 [0, 0]。

正規化 Vertex

頂點代表圖片中的 2D 點。注意:經過正規化的頂點座標會相對於原始圖片,範圍為 0 到 1。

JSON 表示法
{
  "x": number,
  "y": number
}
欄位
x

number

X 座標。

y

number

Y 座標。

NormalizedPolyline

已規格化 Plyline,代表由連接的直線段組成的曲線。

JSON 表示法
{
  "normalizedVertices": [
    {
      object (NormalizedVertex)
    }
  ]
}
欄位
normalizedVertices[]

object (NormalizedVertex)

由直線連接的頂點序列。