AnnotateImageRequest
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
要求在使用者提供的圖片上執行 Google Cloud Vision API 工作,並提供使用者要求的功能和背景資訊。
JSON 表示法 |
{
"image": {
object (Image )
},
"features": [
{
object (Feature )
}
],
"imageContext": {
object (ImageContext )
}
} |
圖片
用於執行 Google Cloud Vision API 工作之用途的用戶端映像檔。
JSON 表示法 |
{
"content": string,
"source": {
object (ImageSource )
}
} |
欄位 |
content |
string (bytes format)
圖片內容,以位元組串流表示。注意:與所有 bytes 欄位一樣,protobuffers 會使用純二進位表示法,而 JSON 表示法則會使用 base64。 Base64 編碼字串。
|
source |
object (ImageSource )
Google Cloud Storage 圖片位置,或可公開存取的圖片網址。如果圖片同時提供 content 和 source ,系統會優先採用 content ,並用於執行圖片註解要求。
|
圖片來源
外部圖片來源 (Google Cloud Storage 或網頁網址圖片位置)。
JSON 表示法 |
{
"gcsImageUri": string,
"imageUri": string
} |
欄位 |
gcsImageUri |
string
改用 imageUri 。 格式為 gs://bucket_name/object_name 的 Google Cloud Storage URI。不支援物件版本管理功能。詳情請參閱「Google Cloud Storage 要求 URI」。
|
imageUri |
string
來源圖片的 URI。可以是下列任一項:
格式為 gs://bucket_name/object_name 的 Google Cloud Storage URI。不支援物件版本管理功能。詳情請參閱 Google Cloud Storage 要求 URI。
公開可存取的圖片 HTTP/HTTPS 網址。從 HTTP/HTTPS 網址擷取圖片時,Google 無法保證要求一定能完成。如果指定主機拒絕要求 (例如因要求節流或拒絕服務攻擊防護),或是 Google 為了防止濫用而節流網站要求,您的要求可能會失敗。正式版應用程式不應依賴外部代管的圖片。
如果同時指定 gcsImageUri 和 imageUri ,則以 imageUri 的效力優先。
|
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-30 (世界標準時間)。
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["難以理解","hardToUnderstand","thumb-down"],["資訊或程式碼範例有誤","incorrectInformationOrSampleCode","thumb-down"],["缺少我需要的資訊/範例","missingTheInformationSamplesINeed","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-07-30 (世界標準時間)。"],[],[],null,["# AnnotateImageRequest\n\n- [JSON representation](#SCHEMA_REPRESENTATION)\n- [Image](#Image)\n - [JSON representation](#Image.SCHEMA_REPRESENTATION)\n- [ImageSource](#ImageSource)\n - [JSON representation](#ImageSource.SCHEMA_REPRESENTATION)\n\nRequest for performing Google Cloud Vision API tasks over a user-provided image, with user-requested features, and with context information.\n\nImage\n-----\n\nClient image to perform Google Cloud Vision API tasks over.\n\nImageSource\n-----------\n\nExternal image source (Google Cloud Storage or web URL image location)."]]