OLD | NEW |
1 { | 1 { |
2 "auth": { | 2 "auth": { |
3 "oauth2": { | 3 "oauth2": { |
4 "scopes": { | 4 "scopes": { |
5 "https://www.googleapis.com/auth/cloud-vision": { | 5 "https://www.googleapis.com/auth/cloud-vision": { |
6 "description": "Apply machine learning models to understand
and label images" | 6 "description": "Apply machine learning models to understand
and label images" |
7 }, | 7 }, |
8 "https://www.googleapis.com/auth/cloud-platform": { | 8 "https://www.googleapis.com/auth/cloud-platform": { |
9 "description": "View and manage your data across Google Clou
d Platform services" | 9 "description": "View and manage your data across Google Clou
d Platform services" |
10 } | 10 } |
(...skipping 10 matching lines...) Expand all Loading... |
21 "icons": { | 21 "icons": { |
22 "x16": "http://www.google.com/images/icons/product/search-16.gif", | 22 "x16": "http://www.google.com/images/icons/product/search-16.gif", |
23 "x32": "http://www.google.com/images/icons/product/search-32.gif" | 23 "x32": "http://www.google.com/images/icons/product/search-32.gif" |
24 }, | 24 }, |
25 "id": "vision:v1", | 25 "id": "vision:v1", |
26 "kind": "discovery#restDescription", | 26 "kind": "discovery#restDescription", |
27 "name": "vision", | 27 "name": "vision", |
28 "ownerDomain": "google.com", | 28 "ownerDomain": "google.com", |
29 "ownerName": "Google", | 29 "ownerName": "Google", |
30 "parameters": { | 30 "parameters": { |
| 31 "pp": { |
| 32 "default": "true", |
| 33 "description": "Pretty-print response.", |
| 34 "location": "query", |
| 35 "type": "boolean" |
| 36 }, |
| 37 "oauth_token": { |
| 38 "description": "OAuth 2.0 token for the current user.", |
| 39 "location": "query", |
| 40 "type": "string" |
| 41 }, |
| 42 "bearer_token": { |
| 43 "description": "OAuth bearer token.", |
| 44 "location": "query", |
| 45 "type": "string" |
| 46 }, |
| 47 "upload_protocol": { |
| 48 "description": "Upload protocol for media (e.g. \"raw\", \"multipart
\").", |
| 49 "location": "query", |
| 50 "type": "string" |
| 51 }, |
| 52 "prettyPrint": { |
| 53 "default": "true", |
| 54 "description": "Returns response with indentations and line breaks."
, |
| 55 "location": "query", |
| 56 "type": "boolean" |
| 57 }, |
| 58 "uploadType": { |
| 59 "description": "Legacy upload protocol for media (e.g. \"media\", \"
multipart\").", |
| 60 "location": "query", |
| 61 "type": "string" |
| 62 }, |
| 63 "fields": { |
| 64 "description": "Selector specifying which fields to include in a par
tial response.", |
| 65 "location": "query", |
| 66 "type": "string" |
| 67 }, |
| 68 "callback": { |
| 69 "description": "JSONP", |
| 70 "location": "query", |
| 71 "type": "string" |
| 72 }, |
31 "$.xgafv": { | 73 "$.xgafv": { |
32 "description": "V1 error format.", | 74 "description": "V1 error format.", |
33 "enum": [ | 75 "enum": [ |
34 "1", | 76 "1", |
35 "2" | 77 "2" |
36 ], | 78 ], |
37 "enumDescriptions": [ | 79 "enumDescriptions": [ |
38 "v1 error format", | 80 "v1 error format", |
39 "v2 error format" | 81 "v2 error format" |
40 ], | 82 ], |
41 "location": "query", | 83 "location": "query", |
42 "type": "string" | 84 "type": "string" |
43 }, | 85 }, |
44 "callback": { | |
45 "description": "JSONP", | |
46 "location": "query", | |
47 "type": "string" | |
48 }, | |
49 "alt": { | 86 "alt": { |
50 "default": "json", | 87 "default": "json", |
51 "description": "Data format for response.", | 88 "description": "Data format for response.", |
52 "enum": [ | 89 "enum": [ |
53 "json", | 90 "json", |
54 "media", | 91 "media", |
55 "proto" | 92 "proto" |
56 ], | 93 ], |
57 "enumDescriptions": [ | 94 "enumDescriptions": [ |
58 "Responses with Content-Type of application/json", | 95 "Responses with Content-Type of application/json", |
59 "Media download with context-dependent Content-Type", | 96 "Media download with context-dependent Content-Type", |
60 "Responses with Content-Type of application/x-protobuf" | 97 "Responses with Content-Type of application/x-protobuf" |
61 ], | 98 ], |
62 "location": "query", | 99 "location": "query", |
63 "type": "string" | 100 "type": "string" |
64 }, | 101 }, |
| 102 "key": { |
| 103 "description": "API key. Your API key identifies your project and pr
ovides you with API access, quota, and reports. Required unless you provide an O
Auth 2.0 token.", |
| 104 "location": "query", |
| 105 "type": "string" |
| 106 }, |
65 "access_token": { | 107 "access_token": { |
66 "description": "OAuth access token.", | 108 "description": "OAuth access token.", |
67 "location": "query", | 109 "location": "query", |
68 "type": "string" | 110 "type": "string" |
69 }, | 111 }, |
70 "key": { | |
71 "description": "API key. Your API key identifies your project and pr
ovides you with API access, quota, and reports. Required unless you provide an O
Auth 2.0 token.", | |
72 "location": "query", | |
73 "type": "string" | |
74 }, | |
75 "quotaUser": { | 112 "quotaUser": { |
76 "description": "Available to use for quota purposes for server-side
applications. Can be any arbitrary string assigned to a user, but should not exc
eed 40 characters.", | 113 "description": "Available to use for quota purposes for server-side
applications. Can be any arbitrary string assigned to a user, but should not exc
eed 40 characters.", |
77 "location": "query", | 114 "location": "query", |
78 "type": "string" | 115 "type": "string" |
79 }, | |
80 "pp": { | |
81 "default": "true", | |
82 "description": "Pretty-print response.", | |
83 "location": "query", | |
84 "type": "boolean" | |
85 }, | |
86 "bearer_token": { | |
87 "description": "OAuth bearer token.", | |
88 "location": "query", | |
89 "type": "string" | |
90 }, | |
91 "oauth_token": { | |
92 "description": "OAuth 2.0 token for the current user.", | |
93 "location": "query", | |
94 "type": "string" | |
95 }, | |
96 "upload_protocol": { | |
97 "description": "Upload protocol for media (e.g. \"raw\", \"multipart
\").", | |
98 "location": "query", | |
99 "type": "string" | |
100 }, | |
101 "prettyPrint": { | |
102 "default": "true", | |
103 "description": "Returns response with indentations and line breaks."
, | |
104 "location": "query", | |
105 "type": "boolean" | |
106 }, | |
107 "uploadType": { | |
108 "description": "Legacy upload protocol for media (e.g. \"media\", \"
multipart\").", | |
109 "location": "query", | |
110 "type": "string" | |
111 }, | |
112 "fields": { | |
113 "description": "Selector specifying which fields to include in a par
tial response.", | |
114 "location": "query", | |
115 "type": "string" | |
116 } | 116 } |
117 }, | 117 }, |
118 "protocol": "rest", | 118 "protocol": "rest", |
119 "resources": { | 119 "resources": { |
120 "images": { | 120 "images": { |
121 "methods": { | 121 "methods": { |
122 "annotate": { | 122 "annotate": { |
123 "description": "Run image detection and annotation for a bat
ch of images.", | 123 "description": "Run image detection and annotation for a bat
ch of images.", |
124 "httpMethod": "POST", | 124 "httpMethod": "POST", |
125 "id": "vision.images.annotate", | 125 "id": "vision.images.annotate", |
(...skipping 10 matching lines...) Expand all Loading... |
136 "https://www.googleapis.com/auth/cloud-platform", | 136 "https://www.googleapis.com/auth/cloud-platform", |
137 "https://www.googleapis.com/auth/cloud-vision" | 137 "https://www.googleapis.com/auth/cloud-vision" |
138 ] | 138 ] |
139 } | 139 } |
140 } | 140 } |
141 } | 141 } |
142 }, | 142 }, |
143 "revision": "20170725", | 143 "revision": "20170725", |
144 "rootUrl": "https://vision.googleapis.com/", | 144 "rootUrl": "https://vision.googleapis.com/", |
145 "schemas": { | 145 "schemas": { |
| 146 "Feature": { |
| 147 "description": "Users describe the type of Google Cloud Vision API t
asks to perform over\nimages by using *Feature*s. Each Feature indicates a type
of image\ndetection task to perform. Features encode the Cloud Vision API\nverti
cal to operate on and the number of top-scoring results to return.", |
| 148 "id": "Feature", |
| 149 "properties": { |
| 150 "maxResults": { |
| 151 "description": "Maximum number of results of this type.", |
| 152 "format": "int32", |
| 153 "type": "integer" |
| 154 }, |
| 155 "type": { |
| 156 "description": "The feature type.", |
| 157 "enum": [ |
| 158 "TYPE_UNSPECIFIED", |
| 159 "FACE_DETECTION", |
| 160 "LANDMARK_DETECTION", |
| 161 "LOGO_DETECTION", |
| 162 "LABEL_DETECTION", |
| 163 "TEXT_DETECTION", |
| 164 "DOCUMENT_TEXT_DETECTION", |
| 165 "SAFE_SEARCH_DETECTION", |
| 166 "IMAGE_PROPERTIES", |
| 167 "CROP_HINTS", |
| 168 "WEB_DETECTION" |
| 169 ], |
| 170 "enumDescriptions": [ |
| 171 "Unspecified feature type.", |
| 172 "Run face detection.", |
| 173 "Run landmark detection.", |
| 174 "Run logo detection.", |
| 175 "Run label detection.", |
| 176 "Run OCR.", |
| 177 "Run dense text document OCR. Takes precedence when both
\nDOCUMENT_TEXT_DETECTION and TEXT_DETECTION are present.", |
| 178 "Run computer vision models to compute image safe-search
properties.", |
| 179 "Compute a set of image properties, such as the image's
dominant colors.", |
| 180 "Run crop hints.", |
| 181 "Run web detection." |
| 182 ], |
| 183 "type": "string" |
| 184 } |
| 185 }, |
| 186 "type": "object" |
| 187 }, |
| 188 "ImageProperties": { |
| 189 "description": "Stores image properties, such as dominant colors.", |
| 190 "id": "ImageProperties", |
| 191 "properties": { |
| 192 "dominantColors": { |
| 193 "$ref": "DominantColorsAnnotation", |
| 194 "description": "If present, dominant colors completed succes
sfully." |
| 195 } |
| 196 }, |
| 197 "type": "object" |
| 198 }, |
| 199 "SafeSearchAnnotation": { |
| 200 "description": "Set of features pertaining to the image, computed by
computer vision\nmethods over safe-search verticals (for example, adult, spoof,
medical,\nviolence).", |
| 201 "id": "SafeSearchAnnotation", |
| 202 "properties": { |
| 203 "violence": { |
| 204 "description": "Violence likelihood.", |
| 205 "enum": [ |
| 206 "UNKNOWN", |
| 207 "VERY_UNLIKELY", |
| 208 "UNLIKELY", |
| 209 "POSSIBLE", |
| 210 "LIKELY", |
| 211 "VERY_LIKELY" |
| 212 ], |
| 213 "enumDescriptions": [ |
| 214 "Unknown likelihood.", |
| 215 "It is very unlikely that the image belongs to the speci
fied vertical.", |
| 216 "It is unlikely that the image belongs to the specified
vertical.", |
| 217 "It is possible that the image belongs to the specified
vertical.", |
| 218 "It is likely that the image belongs to the specified ve
rtical.", |
| 219 "It is very likely that the image belongs to the specifi
ed vertical." |
| 220 ], |
| 221 "type": "string" |
| 222 }, |
| 223 "adult": { |
| 224 "description": "Represents the adult content likelihood for
the image.", |
| 225 "enum": [ |
| 226 "UNKNOWN", |
| 227 "VERY_UNLIKELY", |
| 228 "UNLIKELY", |
| 229 "POSSIBLE", |
| 230 "LIKELY", |
| 231 "VERY_LIKELY" |
| 232 ], |
| 233 "enumDescriptions": [ |
| 234 "Unknown likelihood.", |
| 235 "It is very unlikely that the image belongs to the speci
fied vertical.", |
| 236 "It is unlikely that the image belongs to the specified
vertical.", |
| 237 "It is possible that the image belongs to the specified
vertical.", |
| 238 "It is likely that the image belongs to the specified ve
rtical.", |
| 239 "It is very likely that the image belongs to the specifi
ed vertical." |
| 240 ], |
| 241 "type": "string" |
| 242 }, |
| 243 "spoof": { |
| 244 "description": "Spoof likelihood. The likelihood that an mod
ification\nwas made to the image's canonical version to make it appear\nfunny or
offensive.", |
| 245 "enum": [ |
| 246 "UNKNOWN", |
| 247 "VERY_UNLIKELY", |
| 248 "UNLIKELY", |
| 249 "POSSIBLE", |
| 250 "LIKELY", |
| 251 "VERY_LIKELY" |
| 252 ], |
| 253 "enumDescriptions": [ |
| 254 "Unknown likelihood.", |
| 255 "It is very unlikely that the image belongs to the speci
fied vertical.", |
| 256 "It is unlikely that the image belongs to the specified
vertical.", |
| 257 "It is possible that the image belongs to the specified
vertical.", |
| 258 "It is likely that the image belongs to the specified ve
rtical.", |
| 259 "It is very likely that the image belongs to the specifi
ed vertical." |
| 260 ], |
| 261 "type": "string" |
| 262 }, |
| 263 "medical": { |
| 264 "description": "Likelihood that this is a medical image.", |
| 265 "enum": [ |
| 266 "UNKNOWN", |
| 267 "VERY_UNLIKELY", |
| 268 "UNLIKELY", |
| 269 "POSSIBLE", |
| 270 "LIKELY", |
| 271 "VERY_LIKELY" |
| 272 ], |
| 273 "enumDescriptions": [ |
| 274 "Unknown likelihood.", |
| 275 "It is very unlikely that the image belongs to the speci
fied vertical.", |
| 276 "It is unlikely that the image belongs to the specified
vertical.", |
| 277 "It is possible that the image belongs to the specified
vertical.", |
| 278 "It is likely that the image belongs to the specified ve
rtical.", |
| 279 "It is very likely that the image belongs to the specifi
ed vertical." |
| 280 ], |
| 281 "type": "string" |
| 282 } |
| 283 }, |
| 284 "type": "object" |
| 285 }, |
| 286 "DominantColorsAnnotation": { |
| 287 "description": "Set of dominant colors and their corresponding score
s.", |
| 288 "id": "DominantColorsAnnotation", |
| 289 "properties": { |
| 290 "colors": { |
| 291 "description": "RGB color values with their score and pixel
fraction.", |
| 292 "items": { |
| 293 "$ref": "ColorInfo" |
| 294 }, |
| 295 "type": "array" |
| 296 } |
| 297 }, |
| 298 "type": "object" |
| 299 }, |
| 300 "TextAnnotation": { |
| 301 "description": "TextAnnotation contains a structured representation
of OCR extracted text.\nThe hierarchy of an OCR extracted text structure is like
this:\n TextAnnotation -> Page -> Block -> Paragraph -> Word -> Symbol\nEach
structural component, starting from Page, may further have their own\npropertie
s. Properties describe detected languages, breaks etc.. Please\nrefer to the goo
gle.cloud.vision.v1.TextAnnotation.TextProperty message\ndefinition below for mo
re detail.", |
| 302 "id": "TextAnnotation", |
| 303 "properties": { |
| 304 "pages": { |
| 305 "description": "List of pages detected by OCR.", |
| 306 "items": { |
| 307 "$ref": "Page" |
| 308 }, |
| 309 "type": "array" |
| 310 }, |
| 311 "text": { |
| 312 "description": "UTF-8 text detected on the pages.", |
| 313 "type": "string" |
| 314 } |
| 315 }, |
| 316 "type": "object" |
| 317 }, |
| 318 "Vertex": { |
| 319 "description": "A vertex represents a 2D point in the image.\nNOTE:
the vertex coordinates are in the same scale as the original image.", |
| 320 "id": "Vertex", |
| 321 "properties": { |
| 322 "y": { |
| 323 "description": "Y coordinate.", |
| 324 "format": "int32", |
| 325 "type": "integer" |
| 326 }, |
| 327 "x": { |
| 328 "description": "X coordinate.", |
| 329 "format": "int32", |
| 330 "type": "integer" |
| 331 } |
| 332 }, |
| 333 "type": "object" |
| 334 }, |
| 335 "DetectedLanguage": { |
| 336 "description": "Detected language for a structural component.", |
| 337 "id": "DetectedLanguage", |
| 338 "properties": { |
| 339 "languageCode": { |
| 340 "description": "The BCP-47 language code, such as \"en-US\"
or \"sr-Latn\". For more\ninformation, see\nhttp://www.unicode.org/reports/tr35/
#Unicode_locale_identifier.", |
| 341 "type": "string" |
| 342 }, |
| 343 "confidence": { |
| 344 "description": "Confidence of detected language. Range [0, 1
].", |
| 345 "format": "float", |
| 346 "type": "number" |
| 347 } |
| 348 }, |
| 349 "type": "object" |
| 350 }, |
| 351 "TextProperty": { |
| 352 "description": "Additional information detected on the structural co
mponent.", |
| 353 "id": "TextProperty", |
| 354 "properties": { |
| 355 "detectedLanguages": { |
| 356 "description": "A list of detected languages together with c
onfidence.", |
| 357 "items": { |
| 358 "$ref": "DetectedLanguage" |
| 359 }, |
| 360 "type": "array" |
| 361 }, |
| 362 "detectedBreak": { |
| 363 "$ref": "DetectedBreak", |
| 364 "description": "Detected start or end of a text segment." |
| 365 } |
| 366 }, |
| 367 "type": "object" |
| 368 }, |
| 369 "BoundingPoly": { |
| 370 "description": "A bounding polygon for the detected image annotation
.", |
| 371 "id": "BoundingPoly", |
| 372 "properties": { |
| 373 "vertices": { |
| 374 "description": "The bounding polygon vertices.", |
| 375 "items": { |
| 376 "$ref": "Vertex" |
| 377 }, |
| 378 "type": "array" |
| 379 } |
| 380 }, |
| 381 "type": "object" |
| 382 }, |
| 383 "WebEntity": { |
| 384 "description": "Entity deduced from similar images on the Internet."
, |
| 385 "id": "WebEntity", |
| 386 "properties": { |
| 387 "entityId": { |
| 388 "description": "Opaque entity ID.", |
| 389 "type": "string" |
| 390 }, |
| 391 "description": { |
| 392 "description": "Canonical description of the entity, in Engl
ish.", |
| 393 "type": "string" |
| 394 }, |
| 395 "score": { |
| 396 "description": "Overall relevancy score for the entity.\nNot
normalized and not comparable across different image queries.", |
| 397 "format": "float", |
| 398 "type": "number" |
| 399 } |
| 400 }, |
| 401 "type": "object" |
| 402 }, |
146 "AnnotateImageResponse": { | 403 "AnnotateImageResponse": { |
147 "description": "Response to an image annotation request.", | 404 "description": "Response to an image annotation request.", |
148 "id": "AnnotateImageResponse", | 405 "id": "AnnotateImageResponse", |
149 "properties": { | 406 "properties": { |
| 407 "landmarkAnnotations": { |
| 408 "description": "If present, landmark detection has completed
successfully.", |
| 409 "items": { |
| 410 "$ref": "EntityAnnotation" |
| 411 }, |
| 412 "type": "array" |
| 413 }, |
| 414 "textAnnotations": { |
| 415 "description": "If present, text (OCR) detection has complet
ed successfully.", |
| 416 "items": { |
| 417 "$ref": "EntityAnnotation" |
| 418 }, |
| 419 "type": "array" |
| 420 }, |
| 421 "imagePropertiesAnnotation": { |
| 422 "$ref": "ImageProperties", |
| 423 "description": "If present, image properties were extracted
successfully." |
| 424 }, |
| 425 "faceAnnotations": { |
| 426 "description": "If present, face detection has completed suc
cessfully.", |
| 427 "items": { |
| 428 "$ref": "FaceAnnotation" |
| 429 }, |
| 430 "type": "array" |
| 431 }, |
| 432 "logoAnnotations": { |
| 433 "description": "If present, logo detection has completed suc
cessfully.", |
| 434 "items": { |
| 435 "$ref": "EntityAnnotation" |
| 436 }, |
| 437 "type": "array" |
| 438 }, |
| 439 "webDetection": { |
| 440 "$ref": "WebDetection", |
| 441 "description": "If present, web detection has completed succ
essfully." |
| 442 }, |
| 443 "cropHintsAnnotation": { |
| 444 "$ref": "CropHintsAnnotation", |
| 445 "description": "If present, crop hints have completed succes
sfully." |
| 446 }, |
| 447 "safeSearchAnnotation": { |
| 448 "$ref": "SafeSearchAnnotation", |
| 449 "description": "If present, safe-search annotation has compl
eted successfully." |
| 450 }, |
| 451 "labelAnnotations": { |
| 452 "description": "If present, label detection has completed su
ccessfully.", |
| 453 "items": { |
| 454 "$ref": "EntityAnnotation" |
| 455 }, |
| 456 "type": "array" |
| 457 }, |
150 "error": { | 458 "error": { |
151 "$ref": "Status", | 459 "$ref": "Status", |
152 "description": "If set, represents the error message for the
operation.\nNote that filled-in image annotations are guaranteed to be\ncorrect
, even when `error` is set." | 460 "description": "If set, represents the error message for the
operation.\nNote that filled-in image annotations are guaranteed to be\ncorrect
, even when `error` is set." |
153 }, | 461 }, |
154 "fullTextAnnotation": { | 462 "fullTextAnnotation": { |
155 "$ref": "TextAnnotation", | 463 "$ref": "TextAnnotation", |
156 "description": "If present, text (OCR) detection or document
(OCR) text detection has\ncompleted successfully.\nThis annotation provides the
structural hierarchy for the OCR detected\ntext." | 464 "description": "If present, text (OCR) detection or document
(OCR) text detection has\ncompleted successfully.\nThis annotation provides the
structural hierarchy for the OCR detected\ntext." |
157 }, | |
158 "landmarkAnnotations": { | |
159 "description": "If present, landmark detection has completed
successfully.", | |
160 "items": { | |
161 "$ref": "EntityAnnotation" | |
162 }, | |
163 "type": "array" | |
164 }, | |
165 "textAnnotations": { | |
166 "description": "If present, text (OCR) detection has complet
ed successfully.", | |
167 "items": { | |
168 "$ref": "EntityAnnotation" | |
169 }, | |
170 "type": "array" | |
171 }, | |
172 "imagePropertiesAnnotation": { | |
173 "$ref": "ImageProperties", | |
174 "description": "If present, image properties were extracted
successfully." | |
175 }, | |
176 "faceAnnotations": { | |
177 "description": "If present, face detection has completed suc
cessfully.", | |
178 "items": { | |
179 "$ref": "FaceAnnotation" | |
180 }, | |
181 "type": "array" | |
182 }, | |
183 "logoAnnotations": { | |
184 "description": "If present, logo detection has completed suc
cessfully.", | |
185 "items": { | |
186 "$ref": "EntityAnnotation" | |
187 }, | |
188 "type": "array" | |
189 }, | |
190 "webDetection": { | |
191 "$ref": "WebDetection", | |
192 "description": "If present, web detection has completed succ
essfully." | |
193 }, | |
194 "cropHintsAnnotation": { | |
195 "$ref": "CropHintsAnnotation", | |
196 "description": "If present, crop hints have completed succes
sfully." | |
197 }, | |
198 "safeSearchAnnotation": { | |
199 "$ref": "SafeSearchAnnotation", | |
200 "description": "If present, safe-search annotation has compl
eted successfully." | |
201 }, | |
202 "labelAnnotations": { | |
203 "description": "If present, label detection has completed su
ccessfully.", | |
204 "items": { | |
205 "$ref": "EntityAnnotation" | |
206 }, | |
207 "type": "array" | |
208 } | 465 } |
209 }, | 466 }, |
210 "type": "object" | 467 "type": "object" |
211 }, | 468 }, |
212 "CropHintsParams": { | 469 "CropHintsParams": { |
213 "description": "Parameters for crop hints annotation request.", | 470 "description": "Parameters for crop hints annotation request.", |
214 "id": "CropHintsParams", | 471 "id": "CropHintsParams", |
215 "properties": { | 472 "properties": { |
216 "aspectRatios": { | 473 "aspectRatios": { |
217 "description": "Aspect ratios in floats, representing the ra
tio of the width to the height\nof the image. For example, if the desired aspect
ratio is 4/3, the\ncorresponding float value should be 1.33333. If not specifi
ed, the\nbest possible crop is returned. The number of provided aspect ratios is
\nlimited to a maximum of 16; any aspect ratios provided after the 16th are\nign
ored.", | 474 "description": "Aspect ratios in floats, representing the ra
tio of the width to the height\nof the image. For example, if the desired aspect
ratio is 4/3, the\ncorresponding float value should be 1.33333. If not specifi
ed, the\nbest possible crop is returned. The number of provided aspect ratios is
\nlimited to a maximum of 16; any aspect ratios provided after the 16th are\nign
ored.", |
218 "items": { | 475 "items": { |
219 "format": "float", | 476 "format": "float", |
220 "type": "number" | 477 "type": "number" |
221 }, | 478 }, |
222 "type": "array" | 479 "type": "array" |
223 } | 480 } |
224 }, | 481 }, |
225 "type": "object" | 482 "type": "object" |
226 }, | 483 }, |
227 "Block": { | 484 "Block": { |
228 "description": "Logical element on the page.", | 485 "description": "Logical element on the page.", |
229 "id": "Block", | 486 "id": "Block", |
230 "properties": { | 487 "properties": { |
231 "boundingBox": { | |
232 "$ref": "BoundingPoly", | |
233 "description": "The bounding box for the block.\nThe vertice
s are in the order of top-left, top-right, bottom-right,\nbottom-left. When a ro
tation of the bounding box is detected the rotation\nis represented as around th
e top-left corner as defined when the text is\nread in the 'natural' orientation
.\nFor example:\n * when the text is horizontal it might look like:\n 0----
1\n | |\n 3----2\n * when it's rotated 180 degrees around the top-le
ft corner it becomes:\n 2----3\n | |\n 1----0\n and the vertice
order will still be (0, 1, 2, 3)." | |
234 }, | |
235 "paragraphs": { | |
236 "description": "List of paragraphs in this block (if this bl
ocks is of type text).", | |
237 "items": { | |
238 "$ref": "Paragraph" | |
239 }, | |
240 "type": "array" | |
241 }, | |
242 "property": { | 488 "property": { |
243 "$ref": "TextProperty", | 489 "$ref": "TextProperty", |
244 "description": "Additional information detected for the bloc
k." | 490 "description": "Additional information detected for the bloc
k." |
245 }, | 491 }, |
246 "blockType": { | 492 "blockType": { |
247 "description": "Detected block type (text, image etc) for th
is block.", | 493 "description": "Detected block type (text, image etc) for th
is block.", |
248 "enum": [ | 494 "enum": [ |
249 "UNKNOWN", | 495 "UNKNOWN", |
250 "TEXT", | 496 "TEXT", |
251 "TABLE", | 497 "TABLE", |
252 "PICTURE", | 498 "PICTURE", |
253 "RULER", | 499 "RULER", |
254 "BARCODE" | 500 "BARCODE" |
255 ], | 501 ], |
256 "enumDescriptions": [ | 502 "enumDescriptions": [ |
257 "Unknown block type.", | 503 "Unknown block type.", |
258 "Regular text block.", | 504 "Regular text block.", |
259 "Table block.", | 505 "Table block.", |
260 "Image block.", | 506 "Image block.", |
261 "Horizontal/vertical line box.", | 507 "Horizontal/vertical line box.", |
262 "Barcode block." | 508 "Barcode block." |
263 ], | 509 ], |
264 "type": "string" | 510 "type": "string" |
| 511 }, |
| 512 "boundingBox": { |
| 513 "$ref": "BoundingPoly", |
| 514 "description": "The bounding box for the block.\nThe vertice
s are in the order of top-left, top-right, bottom-right,\nbottom-left. When a ro
tation of the bounding box is detected the rotation\nis represented as around th
e top-left corner as defined when the text is\nread in the 'natural' orientation
.\nFor example:\n * when the text is horizontal it might look like:\n 0----
1\n | |\n 3----2\n * when it's rotated 180 degrees around the top-le
ft corner it becomes:\n 2----3\n | |\n 1----0\n and the vertice
order will still be (0, 1, 2, 3)." |
| 515 }, |
| 516 "paragraphs": { |
| 517 "description": "List of paragraphs in this block (if this bl
ocks is of type text).", |
| 518 "items": { |
| 519 "$ref": "Paragraph" |
| 520 }, |
| 521 "type": "array" |
265 } | 522 } |
266 }, | 523 }, |
267 "type": "object" | 524 "type": "object" |
268 }, | 525 }, |
269 "WebDetection": { | 526 "WebDetection": { |
270 "description": "Relevant information for the image from the Internet
.", | 527 "description": "Relevant information for the image from the Internet
.", |
271 "id": "WebDetection", | 528 "id": "WebDetection", |
272 "properties": { | 529 "properties": { |
273 "fullMatchingImages": { | 530 "fullMatchingImages": { |
274 "description": "Fully matching images from the Internet.\nCa
n include resized copies of the query image.", | 531 "description": "Fully matching images from the Internet.\nCa
n include resized copies of the query image.", |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
319 }, | 576 }, |
320 "type": "array" | 577 "type": "array" |
321 } | 578 } |
322 }, | 579 }, |
323 "type": "object" | 580 "type": "object" |
324 }, | 581 }, |
325 "ImageSource": { | 582 "ImageSource": { |
326 "description": "External image source (Google Cloud Storage image lo
cation).", | 583 "description": "External image source (Google Cloud Storage image lo
cation).", |
327 "id": "ImageSource", | 584 "id": "ImageSource", |
328 "properties": { | 585 "properties": { |
| 586 "imageUri": { |
| 587 "description": "Image URI which supports:\n1) Google Cloud S
torage image URI, which must be in the following form:\n`gs://bucket_name/object
_name` (for details, see\n[Google Cloud Storage Request\nURIs](https://cloud.goo
gle.com/storage/docs/reference-uris)).\nNOTE: Cloud Storage object versioning is
not supported.\n2) Publicly accessible image HTTP/HTTPS URL.\nThis is preferred
over the legacy `gcs_image_uri` above. When both\n`gcs_image_uri` and `image_ur
i` are specified, `image_uri` takes\nprecedence.", |
| 588 "type": "string" |
| 589 }, |
329 "gcsImageUri": { | 590 "gcsImageUri": { |
330 "description": "NOTE: For new code `image_uri` below is pref
erred.\nGoogle Cloud Storage image URI, which must be in the following form:\n`g
s://bucket_name/object_name` (for details, see\n[Google Cloud Storage Request\nU
RIs](https://cloud.google.com/storage/docs/reference-uris)).\nNOTE: Cloud Storag
e object versioning is not supported.", | 591 "description": "NOTE: For new code `image_uri` below is pref
erred.\nGoogle Cloud Storage image URI, which must be in the following form:\n`g
s://bucket_name/object_name` (for details, see\n[Google Cloud Storage Request\nU
RIs](https://cloud.google.com/storage/docs/reference-uris)).\nNOTE: Cloud Storag
e object versioning is not supported.", |
331 "type": "string" | 592 "type": "string" |
332 }, | |
333 "imageUri": { | |
334 "description": "Image URI which supports:\n1) Google Cloud S
torage image URI, which must be in the following form:\n`gs://bucket_name/object
_name` (for details, see\n[Google Cloud Storage Request\nURIs](https://cloud.goo
gle.com/storage/docs/reference-uris)).\nNOTE: Cloud Storage object versioning is
not supported.\n2) Publicly accessible image HTTP/HTTPS URL.\nThis is preferred
over the legacy `gcs_image_uri` above. When both\n`gcs_image_uri` and `image_ur
i` are specified, `image_uri` takes\nprecedence.", | |
335 "type": "string" | |
336 } | 593 } |
337 }, | 594 }, |
338 "type": "object" | 595 "type": "object" |
339 }, | 596 }, |
340 "LocationInfo": { | 597 "LocationInfo": { |
341 "description": "Detected entity location information.", | 598 "description": "Detected entity location information.", |
342 "id": "LocationInfo", | 599 "id": "LocationInfo", |
343 "properties": { | 600 "properties": { |
344 "latLng": { | 601 "latLng": { |
345 "$ref": "LatLng", | 602 "$ref": "LatLng", |
(...skipping 19 matching lines...) Expand all Loading... |
365 "description": "Name of the property.", | 622 "description": "Name of the property.", |
366 "type": "string" | 623 "type": "string" |
367 } | 624 } |
368 }, | 625 }, |
369 "type": "object" | 626 "type": "object" |
370 }, | 627 }, |
371 "Position": { | 628 "Position": { |
372 "description": "A 3D position in the image, used primarily for Face
detection landmarks.\nA valid Position must have both x and y coordinates.\nThe
position coordinates are in the same scale as the original image.", | 629 "description": "A 3D position in the image, used primarily for Face
detection landmarks.\nA valid Position must have both x and y coordinates.\nThe
position coordinates are in the same scale as the original image.", |
373 "id": "Position", | 630 "id": "Position", |
374 "properties": { | 631 "properties": { |
| 632 "y": { |
| 633 "description": "Y coordinate.", |
| 634 "format": "float", |
| 635 "type": "number" |
| 636 }, |
375 "z": { | 637 "z": { |
376 "description": "Z coordinate (or depth).", | 638 "description": "Z coordinate (or depth).", |
377 "format": "float", | 639 "format": "float", |
378 "type": "number" | 640 "type": "number" |
379 }, | 641 }, |
380 "x": { | 642 "x": { |
381 "description": "X coordinate.", | 643 "description": "X coordinate.", |
382 "format": "float", | 644 "format": "float", |
383 "type": "number" | 645 "type": "number" |
384 }, | |
385 "y": { | |
386 "description": "Y coordinate.", | |
387 "format": "float", | |
388 "type": "number" | |
389 } | 646 } |
390 }, | 647 }, |
391 "type": "object" | 648 "type": "object" |
392 }, | 649 }, |
393 "ColorInfo": { | 650 "ColorInfo": { |
394 "description": "Color information consists of RGB channels, score, a
nd the fraction of\nthe image that the color occupies in the image.", | 651 "description": "Color information consists of RGB channels, score, a
nd the fraction of\nthe image that the color occupies in the image.", |
395 "id": "ColorInfo", | 652 "id": "ColorInfo", |
396 "properties": { | 653 "properties": { |
| 654 "score": { |
| 655 "description": "Image-specific score for this color. Value i
n range [0, 1].", |
| 656 "format": "float", |
| 657 "type": "number" |
| 658 }, |
397 "pixelFraction": { | 659 "pixelFraction": { |
398 "description": "The fraction of pixels the color occupies in
the image.\nValue in range [0, 1].", | 660 "description": "The fraction of pixels the color occupies in
the image.\nValue in range [0, 1].", |
399 "format": "float", | 661 "format": "float", |
400 "type": "number" | 662 "type": "number" |
401 }, | 663 }, |
402 "color": { | 664 "color": { |
403 "$ref": "Color", | 665 "$ref": "Color", |
404 "description": "RGB components of the color." | 666 "description": "RGB components of the color." |
405 }, | |
406 "score": { | |
407 "description": "Image-specific score for this color. Value i
n range [0, 1].", | |
408 "format": "float", | |
409 "type": "number" | |
410 } | 667 } |
411 }, | 668 }, |
412 "type": "object" | 669 "type": "object" |
413 }, | 670 }, |
414 "WebPage": { | 671 "WebPage": { |
415 "description": "Metadata for web pages.", | 672 "description": "Metadata for web pages.", |
416 "id": "WebPage", | 673 "id": "WebPage", |
417 "properties": { | 674 "properties": { |
418 "score": { | 675 "score": { |
419 "description": "Overall relevancy score for the web page.\nN
ot normalized and not comparable across different image queries.", | 676 "description": "Overall relevancy score for the web page.\nN
ot normalized and not comparable across different image queries.", |
(...skipping 25 matching lines...) Expand all Loading... |
445 }, | 702 }, |
446 "mid": { | 703 "mid": { |
447 "description": "Opaque entity ID. Some IDs may be available
in\n[Google Knowledge Graph Search API](https://developers.google.com/knowledge-
graph/).", | 704 "description": "Opaque entity ID. Some IDs may be available
in\n[Google Knowledge Graph Search API](https://developers.google.com/knowledge-
graph/).", |
448 "type": "string" | 705 "type": "string" |
449 }, | 706 }, |
450 "confidence": { | 707 "confidence": { |
451 "description": "The accuracy of the entity detection in an i
mage.\nFor example, for an image in which the \"Eiffel Tower\" entity is detecte
d,\nthis field represents the confidence that there is a tower in the query\nima
ge. Range [0, 1].", | 708 "description": "The accuracy of the entity detection in an i
mage.\nFor example, for an image in which the \"Eiffel Tower\" entity is detecte
d,\nthis field represents the confidence that there is a tower in the query\nima
ge. Range [0, 1].", |
452 "format": "float", | 709 "format": "float", |
453 "type": "number" | 710 "type": "number" |
454 }, | 711 }, |
455 "locale": { | |
456 "description": "The language code for the locale in which th
e entity textual\n`description` is expressed.", | |
457 "type": "string" | |
458 }, | |
459 "boundingPoly": { | 712 "boundingPoly": { |
460 "$ref": "BoundingPoly", | 713 "$ref": "BoundingPoly", |
461 "description": "Image region to which this entity belongs. N
ot produced\nfor `LABEL_DETECTION` features." | 714 "description": "Image region to which this entity belongs. N
ot produced\nfor `LABEL_DETECTION` features." |
462 }, | 715 }, |
| 716 "locale": { |
| 717 "description": "The language code for the locale in which th
e entity textual\n`description` is expressed.", |
| 718 "type": "string" |
| 719 }, |
| 720 "description": { |
| 721 "description": "Entity textual description, expressed in its
`locale` language.", |
| 722 "type": "string" |
| 723 }, |
463 "topicality": { | 724 "topicality": { |
464 "description": "The relevancy of the ICA (Image Content Anno
tation) label to the\nimage. For example, the relevancy of \"tower\" is likely h
igher to an image\ncontaining the detected \"Eiffel Tower\" than to an image con
taining a\ndetected distant towering building, even though the confidence that\n
there is a tower in each image may be the same. Range [0, 1].", | 725 "description": "The relevancy of the ICA (Image Content Anno
tation) label to the\nimage. For example, the relevancy of \"tower\" is likely h
igher to an image\ncontaining the detected \"Eiffel Tower\" than to an image con
taining a\ndetected distant towering building, even though the confidence that\n
there is a tower in each image may be the same. Range [0, 1].", |
465 "format": "float", | 726 "format": "float", |
466 "type": "number" | 727 "type": "number" |
467 }, | 728 }, |
468 "description": { | |
469 "description": "Entity textual description, expressed in its
`locale` language.", | |
470 "type": "string" | |
471 }, | |
472 "properties": { | 729 "properties": { |
473 "description": "Some entities may have optional user-supplie
d `Property` (name/value)\nfields, such a score or string that qualifies the ent
ity.", | 730 "description": "Some entities may have optional user-supplie
d `Property` (name/value)\nfields, such a score or string that qualifies the ent
ity.", |
474 "items": { | 731 "items": { |
475 "$ref": "Property" | 732 "$ref": "Property" |
476 }, | 733 }, |
477 "type": "array" | 734 "type": "array" |
478 } | 735 } |
479 }, | 736 }, |
480 "type": "object" | 737 "type": "object" |
481 }, | 738 }, |
(...skipping 15 matching lines...) Expand all Loading... |
497 "$ref": "BoundingPoly", | 754 "$ref": "BoundingPoly", |
498 "description": "The bounding polygon for the crop region. Th
e coordinates of the bounding\nbox are in the original image's scale, as returne
d in `ImageParams`." | 755 "description": "The bounding polygon for the crop region. Th
e coordinates of the bounding\nbox are in the original image's scale, as returne
d in `ImageParams`." |
499 } | 756 } |
500 }, | 757 }, |
501 "type": "object" | 758 "type": "object" |
502 }, | 759 }, |
503 "Landmark": { | 760 "Landmark": { |
504 "description": "A face-specific landmark (for example, a face featur
e).\nLandmark positions may fall outside the bounds of the image\nif the face is
near one or more edges of the image.\nTherefore it is NOT guaranteed that `0 <=
x < width` or\n`0 <= y < height`.", | 761 "description": "A face-specific landmark (for example, a face featur
e).\nLandmark positions may fall outside the bounds of the image\nif the face is
near one or more edges of the image.\nTherefore it is NOT guaranteed that `0 <=
x < width` or\n`0 <= y < height`.", |
505 "id": "Landmark", | 762 "id": "Landmark", |
506 "properties": { | 763 "properties": { |
| 764 "position": { |
| 765 "$ref": "Position", |
| 766 "description": "Face landmark position." |
| 767 }, |
507 "type": { | 768 "type": { |
508 "description": "Face landmark type.", | 769 "description": "Face landmark type.", |
509 "enum": [ | 770 "enum": [ |
510 "UNKNOWN_LANDMARK", | 771 "UNKNOWN_LANDMARK", |
511 "LEFT_EYE", | 772 "LEFT_EYE", |
512 "RIGHT_EYE", | 773 "RIGHT_EYE", |
513 "LEFT_OF_LEFT_EYEBROW", | 774 "LEFT_OF_LEFT_EYEBROW", |
514 "RIGHT_OF_LEFT_EYEBROW", | 775 "RIGHT_OF_LEFT_EYEBROW", |
515 "LEFT_OF_RIGHT_EYEBROW", | 776 "LEFT_OF_RIGHT_EYEBROW", |
516 "RIGHT_OF_RIGHT_EYEBROW", | 777 "RIGHT_OF_RIGHT_EYEBROW", |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
574 "Left ear tragion.", | 835 "Left ear tragion.", |
575 "Right ear tragion.", | 836 "Right ear tragion.", |
576 "Left eye pupil.", | 837 "Left eye pupil.", |
577 "Right eye pupil.", | 838 "Right eye pupil.", |
578 "Forehead glabella.", | 839 "Forehead glabella.", |
579 "Chin gnathion.", | 840 "Chin gnathion.", |
580 "Chin left gonion.", | 841 "Chin left gonion.", |
581 "Chin right gonion." | 842 "Chin right gonion." |
582 ], | 843 ], |
583 "type": "string" | 844 "type": "string" |
584 }, | |
585 "position": { | |
586 "$ref": "Position", | |
587 "description": "Face landmark position." | |
588 } | 845 } |
589 }, | 846 }, |
590 "type": "object" | 847 "type": "object" |
591 }, | 848 }, |
592 "WebImage": { | 849 "WebImage": { |
593 "description": "Metadata for online images.", | 850 "description": "Metadata for online images.", |
594 "id": "WebImage", | 851 "id": "WebImage", |
595 "properties": { | 852 "properties": { |
596 "score": { | 853 "score": { |
597 "description": "Overall relevancy score for the image.\nNot
normalized and not comparable across different image queries.", | 854 "description": "Overall relevancy score for the image.\nNot
normalized and not comparable across different image queries.", |
(...skipping 22 matching lines...) Expand all Loading... |
620 "symbols": { | 877 "symbols": { |
621 "description": "List of symbols in the word.\nThe order of t
he symbols follows the natural reading order.", | 878 "description": "List of symbols in the word.\nThe order of t
he symbols follows the natural reading order.", |
622 "items": { | 879 "items": { |
623 "$ref": "Symbol" | 880 "$ref": "Symbol" |
624 }, | 881 }, |
625 "type": "array" | 882 "type": "array" |
626 } | 883 } |
627 }, | 884 }, |
628 "type": "object" | 885 "type": "object" |
629 }, | 886 }, |
| 887 "Image": { |
| 888 "description": "Client image to perform Google Cloud Vision API task
s over.", |
| 889 "id": "Image", |
| 890 "properties": { |
| 891 "source": { |
| 892 "$ref": "ImageSource", |
| 893 "description": "Google Cloud Storage image location. If both
`content` and `source`\nare provided for an image, `content` takes precedence a
nd is\nused to perform the image annotation request." |
| 894 }, |
| 895 "content": { |
| 896 "description": "Image content, represented as a stream of by
tes.\nNote: as with all `bytes` fields, protobuffers use a pure binary\nrepresen
tation, whereas JSON representations use base64.", |
| 897 "format": "byte", |
| 898 "type": "string" |
| 899 } |
| 900 }, |
| 901 "type": "object" |
| 902 }, |
630 "Paragraph": { | 903 "Paragraph": { |
631 "description": "Structural unit of text representing a number of wor
ds in certain order.", | 904 "description": "Structural unit of text representing a number of wor
ds in certain order.", |
632 "id": "Paragraph", | 905 "id": "Paragraph", |
633 "properties": { | 906 "properties": { |
| 907 "words": { |
| 908 "description": "List of words in this paragraph.", |
| 909 "items": { |
| 910 "$ref": "Word" |
| 911 }, |
| 912 "type": "array" |
| 913 }, |
634 "property": { | 914 "property": { |
635 "$ref": "TextProperty", | 915 "$ref": "TextProperty", |
636 "description": "Additional information detected for the para
graph." | 916 "description": "Additional information detected for the para
graph." |
637 }, | 917 }, |
638 "boundingBox": { | 918 "boundingBox": { |
639 "$ref": "BoundingPoly", | 919 "$ref": "BoundingPoly", |
640 "description": "The bounding box for the paragraph.\nThe ver
tices are in the order of top-left, top-right, bottom-right,\nbottom-left. When
a rotation of the bounding box is detected the rotation\nis represented as aroun
d the top-left corner as defined when the text is\nread in the 'natural' orienta
tion.\nFor example:\n * when the text is horizontal it might look like:\n 0
----1\n | |\n 3----2\n * when it's rotated 180 degrees around the to
p-left corner it becomes:\n 2----3\n | |\n 1----0\n and the vert
ice order will still be (0, 1, 2, 3)." | 920 "description": "The bounding box for the paragraph.\nThe ver
tices are in the order of top-left, top-right, bottom-right,\nbottom-left. When
a rotation of the bounding box is detected the rotation\nis represented as aroun
d the top-left corner as defined when the text is\nread in the 'natural' orienta
tion.\nFor example:\n * when the text is horizontal it might look like:\n 0
----1\n | |\n 3----2\n * when it's rotated 180 degrees around the to
p-left corner it becomes:\n 2----3\n | |\n 1----0\n and the vert
ice order will still be (0, 1, 2, 3)." |
641 }, | |
642 "words": { | |
643 "description": "List of words in this paragraph.", | |
644 "items": { | |
645 "$ref": "Word" | |
646 }, | |
647 "type": "array" | |
648 } | |
649 }, | |
650 "type": "object" | |
651 }, | |
652 "Image": { | |
653 "description": "Client image to perform Google Cloud Vision API task
s over.", | |
654 "id": "Image", | |
655 "properties": { | |
656 "source": { | |
657 "$ref": "ImageSource", | |
658 "description": "Google Cloud Storage image location. If both
`content` and `source`\nare provided for an image, `content` takes precedence a
nd is\nused to perform the image annotation request." | |
659 }, | |
660 "content": { | |
661 "description": "Image content, represented as a stream of by
tes.\nNote: as with all `bytes` fields, protobuffers use a pure binary\nrepresen
tation, whereas JSON representations use base64.", | |
662 "format": "byte", | |
663 "type": "string" | |
664 } | 921 } |
665 }, | 922 }, |
666 "type": "object" | 923 "type": "object" |
667 }, | 924 }, |
668 "FaceAnnotation": { | 925 "FaceAnnotation": { |
669 "description": "A face annotation object contains the results of fac
e detection.", | 926 "description": "A face annotation object contains the results of fac
e detection.", |
670 "id": "FaceAnnotation", | 927 "id": "FaceAnnotation", |
671 "properties": { | 928 "properties": { |
672 "angerLikelihood": { | 929 "surpriseLikelihood": { |
673 "description": "Anger likelihood.", | 930 "description": "Surprise likelihood.", |
674 "enum": [ | 931 "enum": [ |
675 "UNKNOWN", | 932 "UNKNOWN", |
676 "VERY_UNLIKELY", | 933 "VERY_UNLIKELY", |
677 "UNLIKELY", | 934 "UNLIKELY", |
678 "POSSIBLE", | 935 "POSSIBLE", |
679 "LIKELY", | 936 "LIKELY", |
680 "VERY_LIKELY" | 937 "VERY_LIKELY" |
681 ], | 938 ], |
682 "enumDescriptions": [ | 939 "enumDescriptions": [ |
683 "Unknown likelihood.", | 940 "Unknown likelihood.", |
684 "It is very unlikely that the image belongs to the speci
fied vertical.", | 941 "It is very unlikely that the image belongs to the speci
fied vertical.", |
685 "It is unlikely that the image belongs to the specified
vertical.", | 942 "It is unlikely that the image belongs to the specified
vertical.", |
686 "It is possible that the image belongs to the specified
vertical.", | 943 "It is possible that the image belongs to the specified
vertical.", |
687 "It is likely that the image belongs to the specified ve
rtical.", | 944 "It is likely that the image belongs to the specified ve
rtical.", |
688 "It is very likely that the image belongs to the specifi
ed vertical." | 945 "It is very likely that the image belongs to the specifi
ed vertical." |
689 ], | 946 ], |
690 "type": "string" | 947 "type": "string" |
691 }, | 948 }, |
692 "landmarks": { | 949 "landmarks": { |
693 "description": "Detected face landmarks.", | 950 "description": "Detected face landmarks.", |
694 "items": { | 951 "items": { |
695 "$ref": "Landmark" | 952 "$ref": "Landmark" |
696 }, | 953 }, |
697 "type": "array" | 954 "type": "array" |
698 }, | 955 }, |
699 "surpriseLikelihood": { | 956 "angerLikelihood": { |
700 "description": "Surprise likelihood.", | 957 "description": "Anger likelihood.", |
701 "enum": [ | 958 "enum": [ |
702 "UNKNOWN", | 959 "UNKNOWN", |
703 "VERY_UNLIKELY", | 960 "VERY_UNLIKELY", |
704 "UNLIKELY", | 961 "UNLIKELY", |
705 "POSSIBLE", | 962 "POSSIBLE", |
706 "LIKELY", | 963 "LIKELY", |
707 "VERY_LIKELY" | 964 "VERY_LIKELY" |
708 ], | 965 ], |
709 "enumDescriptions": [ | 966 "enumDescriptions": [ |
710 "Unknown likelihood.", | 967 "Unknown likelihood.", |
(...skipping 23 matching lines...) Expand all Loading... |
734 "enumDescriptions": [ | 991 "enumDescriptions": [ |
735 "Unknown likelihood.", | 992 "Unknown likelihood.", |
736 "It is very unlikely that the image belongs to the speci
fied vertical.", | 993 "It is very unlikely that the image belongs to the speci
fied vertical.", |
737 "It is unlikely that the image belongs to the specified
vertical.", | 994 "It is unlikely that the image belongs to the specified
vertical.", |
738 "It is possible that the image belongs to the specified
vertical.", | 995 "It is possible that the image belongs to the specified
vertical.", |
739 "It is likely that the image belongs to the specified ve
rtical.", | 996 "It is likely that the image belongs to the specified ve
rtical.", |
740 "It is very likely that the image belongs to the specifi
ed vertical." | 997 "It is very likely that the image belongs to the specifi
ed vertical." |
741 ], | 998 ], |
742 "type": "string" | 999 "type": "string" |
743 }, | 1000 }, |
744 "detectionConfidence": { | |
745 "description": "Detection confidence. Range [0, 1].", | |
746 "format": "float", | |
747 "type": "number" | |
748 }, | |
749 "panAngle": { | |
750 "description": "Yaw angle, which indicates the leftward/righ
tward angle that the face is\npointing relative to the vertical plane perpendicu
lar to the image. Range\n[-180,180].", | |
751 "format": "float", | |
752 "type": "number" | |
753 }, | |
754 "underExposedLikelihood": { | 1001 "underExposedLikelihood": { |
755 "description": "Under-exposed likelihood.", | 1002 "description": "Under-exposed likelihood.", |
756 "enum": [ | 1003 "enum": [ |
757 "UNKNOWN", | 1004 "UNKNOWN", |
758 "VERY_UNLIKELY", | 1005 "VERY_UNLIKELY", |
759 "UNLIKELY", | |
760 "POSSIBLE", | |
761 "LIKELY", | |
762 "VERY_LIKELY" | |
763 ], | |
764 "enumDescriptions": [ | |
765 "Unknown likelihood.", | |
766 "It is very unlikely that the image belongs to the speci
fied vertical.", | |
767 "It is unlikely that the image belongs to the specified
vertical.", | |
768 "It is possible that the image belongs to the specified
vertical.", | |
769 "It is likely that the image belongs to the specified ve
rtical.", | |
770 "It is very likely that the image belongs to the specifi
ed vertical." | |
771 ], | |
772 "type": "string" | |
773 }, | |
774 "blurredLikelihood": { | |
775 "description": "Blurred likelihood.", | |
776 "enum": [ | |
777 "UNKNOWN", | |
778 "VERY_UNLIKELY", | |
779 "UNLIKELY", | |
780 "POSSIBLE", | |
781 "LIKELY", | |
782 "VERY_LIKELY" | |
783 ], | |
784 "enumDescriptions": [ | |
785 "Unknown likelihood.", | |
786 "It is very unlikely that the image belongs to the speci
fied vertical.", | |
787 "It is unlikely that the image belongs to the specified
vertical.", | |
788 "It is possible that the image belongs to the specified
vertical.", | |
789 "It is likely that the image belongs to the specified ve
rtical.", | |
790 "It is very likely that the image belongs to the specifi
ed vertical." | |
791 ], | |
792 "type": "string" | |
793 }, | |
794 "headwearLikelihood": { | |
795 "description": "Headwear likelihood.", | |
796 "enum": [ | |
797 "UNKNOWN", | |
798 "VERY_UNLIKELY", | |
799 "UNLIKELY", | |
800 "POSSIBLE", | |
801 "LIKELY", | |
802 "VERY_LIKELY" | |
803 ], | |
804 "enumDescriptions": [ | |
805 "Unknown likelihood.", | |
806 "It is very unlikely that the image belongs to the speci
fied vertical.", | |
807 "It is unlikely that the image belongs to the specified
vertical.", | |
808 "It is possible that the image belongs to the specified
vertical.", | |
809 "It is likely that the image belongs to the specified ve
rtical.", | |
810 "It is very likely that the image belongs to the specifi
ed vertical." | |
811 ], | |
812 "type": "string" | |
813 }, | |
814 "boundingPoly": { | |
815 "$ref": "BoundingPoly", | |
816 "description": "The bounding polygon around the face. The co
ordinates of the bounding box\nare in the original image's scale, as returned in
`ImageParams`.\nThe bounding box is computed to \"frame\" the face in accordanc
e with human\nexpectations. It is based on the landmarker results.\nNote that on
e or more x and/or y coordinates may not be generated in the\n`BoundingPoly` (th
e polygon will be unbounded) if only a partial face\nappears in the image to be
annotated." | |
817 }, | |
818 "rollAngle": { | |
819 "description": "Roll angle, which indicates the amount of cl
ockwise/anti-clockwise rotation\nof the face relative to the image vertical abou
t the axis perpendicular to\nthe face. Range [-180,180].", | |
820 "format": "float", | |
821 "type": "number" | |
822 }, | |
823 "sorrowLikelihood": { | |
824 "description": "Sorrow likelihood.", | |
825 "enum": [ | |
826 "UNKNOWN", | |
827 "VERY_UNLIKELY", | |
828 "UNLIKELY", | |
829 "POSSIBLE", | |
830 "LIKELY", | |
831 "VERY_LIKELY" | |
832 ], | |
833 "enumDescriptions": [ | |
834 "Unknown likelihood.", | |
835 "It is very unlikely that the image belongs to the speci
fied vertical.", | |
836 "It is unlikely that the image belongs to the specified
vertical.", | |
837 "It is possible that the image belongs to the specified
vertical.", | |
838 "It is likely that the image belongs to the specified ve
rtical.", | |
839 "It is very likely that the image belongs to the specifi
ed vertical." | |
840 ], | |
841 "type": "string" | |
842 }, | |
843 "tiltAngle": { | |
844 "description": "Pitch angle, which indicates the upwards/dow
nwards angle that the face is\npointing relative to the image's horizontal plane
. Range [-180,180].", | |
845 "format": "float", | |
846 "type": "number" | |
847 }, | |
848 "fdBoundingPoly": { | |
849 "$ref": "BoundingPoly", | |
850 "description": "The `fd_bounding_poly` bounding polygon is t
ighter than the\n`boundingPoly`, and encloses only the skin part of the face. Ty
pically, it\nis used to eliminate the face from any image analysis that detects
the\n\"amount of skin\" visible in an image. It is not based on the\nlandmarker
results, only on the initial face detection, hence\nthe <code>fd</code> (face de
tection) prefix." | |
851 } | |
852 }, | |
853 "type": "object" | |
854 }, | |
855 "BatchAnnotateImagesRequest": { | |
856 "description": "Multiple image annotation requests are batched into
a single service call.", | |
857 "id": "BatchAnnotateImagesRequest", | |
858 "properties": { | |
859 "requests": { | |
860 "description": "Individual image annotation requests for thi
s batch.", | |
861 "items": { | |
862 "$ref": "AnnotateImageRequest" | |
863 }, | |
864 "type": "array" | |
865 } | |
866 }, | |
867 "type": "object" | |
868 }, | |
869 "DetectedBreak": { | |
870 "description": "Detected start or end of a structural component.", | |
871 "id": "DetectedBreak", | |
872 "properties": { | |
873 "type": { | |
874 "description": "Detected break type.", | |
875 "enum": [ | |
876 "UNKNOWN", | |
877 "SPACE", | |
878 "SURE_SPACE", | |
879 "EOL_SURE_SPACE", | |
880 "HYPHEN", | |
881 "LINE_BREAK" | |
882 ], | |
883 "enumDescriptions": [ | |
884 "Unknown break label type.", | |
885 "Regular space.", | |
886 "Sure space (very wide).", | |
887 "Line-wrapping break.", | |
888 "End-line hyphen that is not present in text; does not c
o-occur with\n`SPACE`, `LEADER_SPACE`, or `LINE_BREAK`.", | |
889 "Line break that ends a paragraph." | |
890 ], | |
891 "type": "string" | |
892 }, | |
893 "isPrefix": { | |
894 "description": "True if break prepends the element.", | |
895 "type": "boolean" | |
896 } | |
897 }, | |
898 "type": "object" | |
899 }, | |
900 "ImageContext": { | |
901 "description": "Image context and/or feature-specific parameters.", | |
902 "id": "ImageContext", | |
903 "properties": { | |
904 "latLongRect": { | |
905 "$ref": "LatLongRect", | |
906 "description": "lat/long rectangle that specifies the locati
on of the image." | |
907 }, | |
908 "cropHintsParams": { | |
909 "$ref": "CropHintsParams", | |
910 "description": "Parameters for crop hints annotation request
." | |
911 }, | |
912 "languageHints": { | |
913 "description": "List of languages to use for TEXT_DETECTION.
In most cases, an empty value\nyields the best results since it enables automat
ic language detection. For\nlanguages based on the Latin alphabet, setting `lang
uage_hints` is not\nneeded. In rare cases, when the language of the text in the
image is known,\nsetting a hint will help get better results (although it will b
e a\nsignificant hindrance if the hint is wrong). Text detection returns an\nerr
or if one or more of the specified languages is not one of the\n[supported langu
ages](/vision/docs/languages).", | |
914 "items": { | |
915 "type": "string" | |
916 }, | |
917 "type": "array" | |
918 } | |
919 }, | |
920 "type": "object" | |
921 }, | |
922 "Page": { | |
923 "description": "Detected page from OCR.", | |
924 "id": "Page", | |
925 "properties": { | |
926 "height": { | |
927 "description": "Page height in pixels.", | |
928 "format": "int32", | |
929 "type": "integer" | |
930 }, | |
931 "width": { | |
932 "description": "Page width in pixels.", | |
933 "format": "int32", | |
934 "type": "integer" | |
935 }, | |
936 "blocks": { | |
937 "description": "List of blocks of text, images etc on this p
age.", | |
938 "items": { | |
939 "$ref": "Block" | |
940 }, | |
941 "type": "array" | |
942 }, | |
943 "property": { | |
944 "$ref": "TextProperty", | |
945 "description": "Additional information detected on the page.
" | |
946 } | |
947 }, | |
948 "type": "object" | |
949 }, | |
950 "AnnotateImageRequest": { | |
951 "description": "Request for performing Google Cloud Vision API tasks
over a user-provided\nimage, with user-requested features.", | |
952 "id": "AnnotateImageRequest", | |
953 "properties": { | |
954 "features": { | |
955 "description": "Requested features.", | |
956 "items": { | |
957 "$ref": "Feature" | |
958 }, | |
959 "type": "array" | |
960 }, | |
961 "image": { | |
962 "$ref": "Image", | |
963 "description": "The image to be processed." | |
964 }, | |
965 "imageContext": { | |
966 "$ref": "ImageContext", | |
967 "description": "Additional context that may accompany the im
age." | |
968 } | |
969 }, | |
970 "type": "object" | |
971 }, | |
972 "Status": { | |
973 "description": "The `Status` type defines a logical error model that
is suitable for different\nprogramming environments, including REST APIs and RP
C APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is desig
ned to be:\n\n- Simple to use and understand for most users\n- Flexible enough t
o meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pie
ces of data: error code, error message,\nand error details. The error code shoul
d be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes
if needed. The\nerror message should be a developer-facing English message tha
t helps\ndevelopers *understand* and *resolve* the error. If a localized user-fa
cing\nerror message is needed, put the localized message in the error details or
\nlocalize it in the client. The optional error details may contain arbitrary\ni
nformation about the error. There is a predefined set of error detail types\nin
the package `google.rpc` that can be used for common error conditions.\n\n# Lang
uage mapping\n\nThe `Status` message is the logical representation of the error
model, but it\nis not necessarily the actual wire format. When the `Status` mess
age is\nexposed in different client libraries and different wire protocols, it c
an be\nmapped differently. For example, it will likely be mapped to some excepti
ons\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n
\nThe error model and the `Status` message can be used in a variety of\nenvironm
ents, either with or without APIs, to provide a\nconsistent developer experience
across different environments.\n\nExample uses of this error model include:\n\n
- Partial errors. If a service needs to return partial errors to the client,\n
it may embed the `Status` in the normal response to indicate the partial\n
errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step m
ay\n have a `Status` message for error reporting.\n\n- Batch operations. If a
client uses batch request and batch response, the\n `Status` message should
be used directly inside batch response, one for\n each error sub-response.\n\
n- Asynchronous operations. If an API call embeds asynchronous operation\n re
sults in its response, the status of those operations should be\n represented
directly using the `Status` message.\n\n- Logging. If some API errors are store
d in logs, the message `Status` could\n be used directly after any stripping
needed for security/privacy reasons.", | |
974 "id": "Status", | |
975 "properties": { | |
976 "message": { | |
977 "description": "A developer-facing error message, which shou
ld be in English. Any\nuser-facing error message should be localized and sent in
the\ngoogle.rpc.Status.details field, or localized by the client.", | |
978 "type": "string" | |
979 }, | |
980 "details": { | |
981 "description": "A list of messages that carry the error deta
ils. There is a common set of\nmessage types for APIs to use.", | |
982 "items": { | |
983 "additionalProperties": { | |
984 "description": "Properties of the object. Contains f
ield @type with type URL.", | |
985 "type": "any" | |
986 }, | |
987 "type": "object" | |
988 }, | |
989 "type": "array" | |
990 }, | |
991 "code": { | |
992 "description": "The status code, which should be an enum val
ue of google.rpc.Code.", | |
993 "format": "int32", | |
994 "type": "integer" | |
995 } | |
996 }, | |
997 "type": "object" | |
998 }, | |
999 "Symbol": { | |
1000 "description": "A single symbol representation.", | |
1001 "id": "Symbol", | |
1002 "properties": { | |
1003 "property": { | |
1004 "$ref": "TextProperty", | |
1005 "description": "Additional information detected for the symb
ol." | |
1006 }, | |
1007 "boundingBox": { | |
1008 "$ref": "BoundingPoly", | |
1009 "description": "The bounding box for the symbol.\nThe vertic
es are in the order of top-left, top-right, bottom-right,\nbottom-left. When a r
otation of the bounding box is detected the rotation\nis represented as around t
he top-left corner as defined when the text is\nread in the 'natural' orientatio
n.\nFor example:\n * when the text is horizontal it might look like:\n 0---
-1\n | |\n 3----2\n * when it's rotated 180 degrees around the top-l
eft corner it becomes:\n 2----3\n | |\n 1----0\n and the vertice
order will still be (0, 1, 2, 3)." | |
1010 }, | |
1011 "text": { | |
1012 "description": "The actual UTF-8 representation of the symbo
l.", | |
1013 "type": "string" | |
1014 } | |
1015 }, | |
1016 "type": "object" | |
1017 }, | |
1018 "LatLongRect": { | |
1019 "description": "Rectangle determined by min and max `LatLng` pairs."
, | |
1020 "id": "LatLongRect", | |
1021 "properties": { | |
1022 "minLatLng": { | |
1023 "$ref": "LatLng", | |
1024 "description": "Min lat/long pair." | |
1025 }, | |
1026 "maxLatLng": { | |
1027 "$ref": "LatLng", | |
1028 "description": "Max lat/long pair." | |
1029 } | |
1030 }, | |
1031 "type": "object" | |
1032 }, | |
1033 "CropHintsAnnotation": { | |
1034 "description": "Set of crop hints that are used to generate new crop
s when serving images.", | |
1035 "id": "CropHintsAnnotation", | |
1036 "properties": { | |
1037 "cropHints": { | |
1038 "description": "Crop hint results.", | |
1039 "items": { | |
1040 "$ref": "CropHint" | |
1041 }, | |
1042 "type": "array" | |
1043 } | |
1044 }, | |
1045 "type": "object" | |
1046 }, | |
1047 "LatLng": { | |
1048 "description": "An object representing a latitude/longitude pair. Th
is is expressed as a pair\nof doubles representing degrees latitude and degrees
longitude. Unless\nspecified otherwise, this must conform to the\n<a href=\"http
://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf\">WGS84\nstandard</a>. Values
must be within normalized ranges.\n\nExample of normalization code in Python:\n
\n def NormalizeLongitude(longitude):\n \"\"\"Wraps decimal degrees long
itude to [-180.0, 180.0].\"\"\"\n q, r = divmod(longitude, 360.0)\n if
r > 180.0 or (r == 180.0 and q <= -1.0):\n return r - 360.0\n retur
n r\n\n def NormalizeLatLng(latitude, longitude):\n \"\"\"Wraps decimal
degrees latitude and longitude to\n [-90.0, 90.0] and [-180.0, 180.0], resp
ectively.\"\"\"\n r = latitude % 360.0\n if r <= 90.0:\n return
r, NormalizeLongitude(longitude)\n elif r >= 270.0:\n return r - 36
0, NormalizeLongitude(longitude)\n else:\n return 180 - r, Normalize
Longitude(longitude + 180.0)\n\n assert 180.0 == NormalizeLongitude(180.0)\n
assert -180.0 == NormalizeLongitude(-180.0)\n assert -179.0 == NormalizeLo
ngitude(181.0)\n assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0)\n assert
(0.0, 0.0) == NormalizeLatLng(-360.0, 0.0)\n assert (85.0, 180.0) == Normali
zeLatLng(95.0, 0.0)\n assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0)\
n assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0)\n assert (-90.0, -10.
0) == NormalizeLatLng(-90.0, -10.0)\n assert (0.0, -170.0) == NormalizeLatLng
(-180.0, 10.0)\n assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0)\n as
sert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0)\n assert (90.0, 10.0) == N
ormalizeLatLng(-270.0, 10.0)", | |
1049 "id": "LatLng", | |
1050 "properties": { | |
1051 "longitude": { | |
1052 "description": "The longitude in degrees. It must be in the
range [-180.0, +180.0].", | |
1053 "format": "double", | |
1054 "type": "number" | |
1055 }, | |
1056 "latitude": { | |
1057 "description": "The latitude in degrees. It must be in the r
ange [-90.0, +90.0].", | |
1058 "format": "double", | |
1059 "type": "number" | |
1060 } | |
1061 }, | |
1062 "type": "object" | |
1063 }, | |
1064 "Color": { | |
1065 "description": "Represents a color in the RGBA color space. This rep
resentation is designed\nfor simplicity of conversion to/from color representati
ons in various\nlanguages over compactness; for example, the fields of this repr
esentation\ncan be trivially provided to the constructor of \"java.awt.Color\" i
n Java; it\ncan also be trivially provided to UIColor's \"+colorWithRed:green:bl
ue:alpha\"\nmethod in iOS; and, with just a little work, it can be easily format
ted into\na CSS \"rgba()\" string in JavaScript, as well. Here are some examples
:\n\nExample (Java):\n\n import com.google.type.Color;\n\n // ...\n
public static java.awt.Color fromProto(Color protocolor) {\n float alpha =
protocolor.hasAlpha()\n ? protocolor.getAlpha().getValue()\n
: 1.0;\n\n return new java.awt.Color(\n protocolor.getRed(),\n
protocolor.getGreen(),\n protocolor.getBlue(),\n
alpha);\n }\n\n public static Color toProto(java.awt.Color color) {\n
float red = (float) color.getRed();\n float green = (float) color.getG
reen();\n float blue = (float) color.getBlue();\n float denominator
= 255.0;\n Color.Builder resultBuilder =\n Color\n
.newBuilder()\n .setRed(red / denominator)\n .setGr
een(green / denominator)\n .setBlue(blue / denominator);\n i
nt alpha = color.getAlpha();\n if (alpha != 255) {\n result.setAlp
ha(\n FloatValue\n .newBuilder()\n .
setValue(((float) alpha) / denominator)\n .build());\n }\n
return resultBuilder.build();\n }\n // ...\n\nExample (iOS / Obj-
C):\n\n // ...\n static UIColor* fromProto(Color* protocolor) {\n
float red = [protocolor red];\n float green = [protocolor green];\n
float blue = [protocolor blue];\n FloatValue* alpha_wrapper = [protoco
lor alpha];\n float alpha = 1.0;\n if (alpha_wrapper != nil) {\n
alpha = [alpha_wrapper value];\n }\n return [UIColor color
WithRed:red green:green blue:blue alpha:alpha];\n }\n\n static Color* to
Proto(UIColor* color) {\n CGFloat red, green, blue, alpha;\n if
(![color getRed:&red green:&green blue:&blue alpha:&alpha]) {\n return
nil;\n }\n Color* result = [Color alloc] init];\n [resu
lt setRed:red];\n [result setGreen:green];\n [result setBlue:blu
e];\n if (alpha <= 0.9999) {\n [result setAlpha:floatWrapperWi
thValue(alpha)];\n }\n [result autorelease];\n return re
sult;\n }\n // ...\n\n Example (JavaScript):\n\n // ...\n\n var prot
oToCssColor = function(rgb_color) {\n var redFrac = rgb_color.red || 0.0;\
n var greenFrac = rgb_color.green || 0.0;\n var blueFrac = rgb_color
.blue || 0.0;\n var red = Math.floor(redFrac * 255);\n var green = M
ath.floor(greenFrac * 255);\n var blue = Math.floor(blueFrac * 255);\n\n
if (!('alpha' in rgb_color)) {\n return rgbToCssColor_(red, green,
blue);\n }\n\n var alphaFrac = rgb_color.alpha.value || 0.0;\n
var rgbParams = [red, green, blue].join(',');\n return ['rgba(', rgbPara
ms, ',', alphaFrac, ')'].join('');\n };\n\n var rgbToCssColor_ = function(
red, green, blue) {\n var rgbNumber = new Number((red << 16) | (green << 8)
| blue);\n var hexString = rgbNumber.toString(16);\n var missingZeros
= 6 - hexString.length;\n var resultBuilder = ['#'];\n for (var i = 0
; i < missingZeros; i++) {\n resultBuilder.push('0');\n }\n re
sultBuilder.push(hexString);\n return resultBuilder.join('');\n };\n\n
// ...", | |
1066 "id": "Color", | |
1067 "properties": { | |
1068 "alpha": { | |
1069 "description": "The fraction of this color that should be ap
plied to the pixel. That is,\nthe final pixel color is defined by the equation:\
n\n pixel color = alpha * (this color) + (1.0 - alpha) * (background color)\n\n
This means that a value of 1.0 corresponds to a solid color, whereas\na value of
0.0 corresponds to a completely transparent color. This\nuses a wrapper message
rather than a simple float scalar so that it is\npossible to distinguish betwee
n a default value and the value being unset.\nIf omitted, this color object is t
o be rendered as a solid color\n(as if the alpha value had been explicitly given
with a value of 1.0).", | |
1070 "format": "float", | |
1071 "type": "number" | |
1072 }, | |
1073 "blue": { | |
1074 "description": "The amount of blue in the color as a value i
n the interval [0, 1].", | |
1075 "format": "float", | |
1076 "type": "number" | |
1077 }, | |
1078 "green": { | |
1079 "description": "The amount of green in the color as a value
in the interval [0, 1].", | |
1080 "format": "float", | |
1081 "type": "number" | |
1082 }, | |
1083 "red": { | |
1084 "description": "The amount of red in the color as a value in
the interval [0, 1].", | |
1085 "format": "float", | |
1086 "type": "number" | |
1087 } | |
1088 }, | |
1089 "type": "object" | |
1090 }, | |
1091 "ImageProperties": { | |
1092 "description": "Stores image properties, such as dominant colors.", | |
1093 "id": "ImageProperties", | |
1094 "properties": { | |
1095 "dominantColors": { | |
1096 "$ref": "DominantColorsAnnotation", | |
1097 "description": "If present, dominant colors completed succes
sfully." | |
1098 } | |
1099 }, | |
1100 "type": "object" | |
1101 }, | |
1102 "Feature": { | |
1103 "description": "Users describe the type of Google Cloud Vision API t
asks to perform over\nimages by using *Feature*s. Each Feature indicates a type
of image\ndetection task to perform. Features encode the Cloud Vision API\nverti
cal to operate on and the number of top-scoring results to return.", | |
1104 "id": "Feature", | |
1105 "properties": { | |
1106 "maxResults": { | |
1107 "description": "Maximum number of results of this type.", | |
1108 "format": "int32", | |
1109 "type": "integer" | |
1110 }, | |
1111 "type": { | |
1112 "description": "The feature type.", | |
1113 "enum": [ | |
1114 "TYPE_UNSPECIFIED", | |
1115 "FACE_DETECTION", | |
1116 "LANDMARK_DETECTION", | |
1117 "LOGO_DETECTION", | |
1118 "LABEL_DETECTION", | |
1119 "TEXT_DETECTION", | |
1120 "DOCUMENT_TEXT_DETECTION", | |
1121 "SAFE_SEARCH_DETECTION", | |
1122 "IMAGE_PROPERTIES", | |
1123 "CROP_HINTS", | |
1124 "WEB_DETECTION" | |
1125 ], | |
1126 "enumDescriptions": [ | |
1127 "Unspecified feature type.", | |
1128 "Run face detection.", | |
1129 "Run landmark detection.", | |
1130 "Run logo detection.", | |
1131 "Run label detection.", | |
1132 "Run OCR.", | |
1133 "Run dense text document OCR. Takes precedence when both
\nDOCUMENT_TEXT_DETECTION and TEXT_DETECTION are present.", | |
1134 "Run computer vision models to compute image safe-search
properties.", | |
1135 "Compute a set of image properties, such as the image's
dominant colors.", | |
1136 "Run crop hints.", | |
1137 "Run web detection." | |
1138 ], | |
1139 "type": "string" | |
1140 } | |
1141 }, | |
1142 "type": "object" | |
1143 }, | |
1144 "SafeSearchAnnotation": { | |
1145 "description": "Set of features pertaining to the image, computed by
computer vision\nmethods over safe-search verticals (for example, adult, spoof,
medical,\nviolence).", | |
1146 "id": "SafeSearchAnnotation", | |
1147 "properties": { | |
1148 "spoof": { | |
1149 "description": "Spoof likelihood. The likelihood that an mod
ification\nwas made to the image's canonical version to make it appear\nfunny or
offensive.", | |
1150 "enum": [ | |
1151 "UNKNOWN", | |
1152 "VERY_UNLIKELY", | |
1153 "UNLIKELY", | 1006 "UNLIKELY", |
1154 "POSSIBLE", | 1007 "POSSIBLE", |
1155 "LIKELY", | 1008 "LIKELY", |
1156 "VERY_LIKELY" | 1009 "VERY_LIKELY" |
1157 ], | 1010 ], |
1158 "enumDescriptions": [ | 1011 "enumDescriptions": [ |
1159 "Unknown likelihood.", | 1012 "Unknown likelihood.", |
1160 "It is very unlikely that the image belongs to the speci
fied vertical.", | 1013 "It is very unlikely that the image belongs to the speci
fied vertical.", |
1161 "It is unlikely that the image belongs to the specified
vertical.", | 1014 "It is unlikely that the image belongs to the specified
vertical.", |
1162 "It is possible that the image belongs to the specified
vertical.", | 1015 "It is possible that the image belongs to the specified
vertical.", |
1163 "It is likely that the image belongs to the specified ve
rtical.", | 1016 "It is likely that the image belongs to the specified ve
rtical.", |
1164 "It is very likely that the image belongs to the specifi
ed vertical." | 1017 "It is very likely that the image belongs to the specifi
ed vertical." |
1165 ], | 1018 ], |
1166 "type": "string" | 1019 "type": "string" |
1167 }, | 1020 }, |
1168 "medical": { | 1021 "panAngle": { |
1169 "description": "Likelihood that this is a medical image.", | 1022 "description": "Yaw angle, which indicates the leftward/righ
tward angle that the face is\npointing relative to the vertical plane perpendicu
lar to the image. Range\n[-180,180].", |
| 1023 "format": "float", |
| 1024 "type": "number" |
| 1025 }, |
| 1026 "detectionConfidence": { |
| 1027 "description": "Detection confidence. Range [0, 1].", |
| 1028 "format": "float", |
| 1029 "type": "number" |
| 1030 }, |
| 1031 "blurredLikelihood": { |
| 1032 "description": "Blurred likelihood.", |
1170 "enum": [ | 1033 "enum": [ |
1171 "UNKNOWN", | 1034 "UNKNOWN", |
1172 "VERY_UNLIKELY", | 1035 "VERY_UNLIKELY", |
1173 "UNLIKELY", | 1036 "UNLIKELY", |
1174 "POSSIBLE", | 1037 "POSSIBLE", |
1175 "LIKELY", | 1038 "LIKELY", |
1176 "VERY_LIKELY" | 1039 "VERY_LIKELY" |
1177 ], | 1040 ], |
1178 "enumDescriptions": [ | 1041 "enumDescriptions": [ |
1179 "Unknown likelihood.", | 1042 "Unknown likelihood.", |
1180 "It is very unlikely that the image belongs to the speci
fied vertical.", | 1043 "It is very unlikely that the image belongs to the speci
fied vertical.", |
1181 "It is unlikely that the image belongs to the specified
vertical.", | 1044 "It is unlikely that the image belongs to the specified
vertical.", |
1182 "It is possible that the image belongs to the specified
vertical.", | 1045 "It is possible that the image belongs to the specified
vertical.", |
1183 "It is likely that the image belongs to the specified ve
rtical.", | 1046 "It is likely that the image belongs to the specified ve
rtical.", |
1184 "It is very likely that the image belongs to the specifi
ed vertical." | 1047 "It is very likely that the image belongs to the specifi
ed vertical." |
1185 ], | 1048 ], |
1186 "type": "string" | 1049 "type": "string" |
1187 }, | 1050 }, |
1188 "violence": { | 1051 "headwearLikelihood": { |
1189 "description": "Violence likelihood.", | 1052 "description": "Headwear likelihood.", |
1190 "enum": [ | 1053 "enum": [ |
1191 "UNKNOWN", | 1054 "UNKNOWN", |
1192 "VERY_UNLIKELY", | 1055 "VERY_UNLIKELY", |
1193 "UNLIKELY", | 1056 "UNLIKELY", |
1194 "POSSIBLE", | 1057 "POSSIBLE", |
1195 "LIKELY", | 1058 "LIKELY", |
1196 "VERY_LIKELY" | 1059 "VERY_LIKELY" |
1197 ], | 1060 ], |
1198 "enumDescriptions": [ | 1061 "enumDescriptions": [ |
1199 "Unknown likelihood.", | 1062 "Unknown likelihood.", |
1200 "It is very unlikely that the image belongs to the speci
fied vertical.", | 1063 "It is very unlikely that the image belongs to the speci
fied vertical.", |
1201 "It is unlikely that the image belongs to the specified
vertical.", | 1064 "It is unlikely that the image belongs to the specified
vertical.", |
1202 "It is possible that the image belongs to the specified
vertical.", | 1065 "It is possible that the image belongs to the specified
vertical.", |
1203 "It is likely that the image belongs to the specified ve
rtical.", | 1066 "It is likely that the image belongs to the specified ve
rtical.", |
1204 "It is very likely that the image belongs to the specifi
ed vertical." | 1067 "It is very likely that the image belongs to the specifi
ed vertical." |
1205 ], | 1068 ], |
1206 "type": "string" | 1069 "type": "string" |
1207 }, | 1070 }, |
1208 "adult": { | 1071 "boundingPoly": { |
1209 "description": "Represents the adult content likelihood for
the image.", | 1072 "$ref": "BoundingPoly", |
| 1073 "description": "The bounding polygon around the face. The co
ordinates of the bounding box\nare in the original image's scale, as returned in
`ImageParams`.\nThe bounding box is computed to \"frame\" the face in accordanc
e with human\nexpectations. It is based on the landmarker results.\nNote that on
e or more x and/or y coordinates may not be generated in the\n`BoundingPoly` (th
e polygon will be unbounded) if only a partial face\nappears in the image to be
annotated." |
| 1074 }, |
| 1075 "rollAngle": { |
| 1076 "description": "Roll angle, which indicates the amount of cl
ockwise/anti-clockwise rotation\nof the face relative to the image vertical abou
t the axis perpendicular to\nthe face. Range [-180,180].", |
| 1077 "format": "float", |
| 1078 "type": "number" |
| 1079 }, |
| 1080 "sorrowLikelihood": { |
| 1081 "description": "Sorrow likelihood.", |
1210 "enum": [ | 1082 "enum": [ |
1211 "UNKNOWN", | 1083 "UNKNOWN", |
1212 "VERY_UNLIKELY", | 1084 "VERY_UNLIKELY", |
1213 "UNLIKELY", | 1085 "UNLIKELY", |
1214 "POSSIBLE", | 1086 "POSSIBLE", |
1215 "LIKELY", | 1087 "LIKELY", |
1216 "VERY_LIKELY" | 1088 "VERY_LIKELY" |
1217 ], | 1089 ], |
1218 "enumDescriptions": [ | 1090 "enumDescriptions": [ |
1219 "Unknown likelihood.", | 1091 "Unknown likelihood.", |
1220 "It is very unlikely that the image belongs to the speci
fied vertical.", | 1092 "It is very unlikely that the image belongs to the speci
fied vertical.", |
1221 "It is unlikely that the image belongs to the specified
vertical.", | 1093 "It is unlikely that the image belongs to the specified
vertical.", |
1222 "It is possible that the image belongs to the specified
vertical.", | 1094 "It is possible that the image belongs to the specified
vertical.", |
1223 "It is likely that the image belongs to the specified ve
rtical.", | 1095 "It is likely that the image belongs to the specified ve
rtical.", |
1224 "It is very likely that the image belongs to the specifi
ed vertical." | 1096 "It is very likely that the image belongs to the specifi
ed vertical." |
1225 ], | 1097 ], |
1226 "type": "string" | 1098 "type": "string" |
1227 } | 1099 }, |
1228 }, | 1100 "tiltAngle": { |
1229 "type": "object" | 1101 "description": "Pitch angle, which indicates the upwards/dow
nwards angle that the face is\npointing relative to the image's horizontal plane
. Range [-180,180].", |
1230 }, | 1102 "format": "float", |
1231 "DominantColorsAnnotation": { | 1103 "type": "number" |
1232 "description": "Set of dominant colors and their corresponding score
s.", | 1104 }, |
1233 "id": "DominantColorsAnnotation", | 1105 "fdBoundingPoly": { |
1234 "properties": { | 1106 "$ref": "BoundingPoly", |
1235 "colors": { | 1107 "description": "The `fd_bounding_poly` bounding polygon is t
ighter than the\n`boundingPoly`, and encloses only the skin part of the face. Ty
pically, it\nis used to eliminate the face from any image analysis that detects
the\n\"amount of skin\" visible in an image. It is not based on the\nlandmarker
results, only on the initial face detection, hence\nthe <code>fd</code> (face de
tection) prefix." |
1236 "description": "RGB color values with their score and pixel
fraction.", | 1108 } |
1237 "items": { | 1109 }, |
1238 "$ref": "ColorInfo" | 1110 "type": "object" |
1239 }, | 1111 }, |
1240 "type": "array" | 1112 "BatchAnnotateImagesRequest": { |
1241 } | 1113 "description": "Multiple image annotation requests are batched into
a single service call.", |
1242 }, | 1114 "id": "BatchAnnotateImagesRequest", |
1243 "type": "object" | 1115 "properties": { |
1244 }, | 1116 "requests": { |
1245 "TextAnnotation": { | 1117 "description": "Individual image annotation requests for thi
s batch.", |
1246 "description": "TextAnnotation contains a structured representation
of OCR extracted text.\nThe hierarchy of an OCR extracted text structure is like
this:\n TextAnnotation -> Page -> Block -> Paragraph -> Word -> Symbol\nEach
structural component, starting from Page, may further have their own\npropertie
s. Properties describe detected languages, breaks etc.. Please\nrefer to the goo
gle.cloud.vision.v1.TextAnnotation.TextProperty message\ndefinition below for mo
re detail.", | 1118 "items": { |
1247 "id": "TextAnnotation", | 1119 "$ref": "AnnotateImageRequest" |
1248 "properties": { | 1120 }, |
1249 "pages": { | 1121 "type": "array" |
1250 "description": "List of pages detected by OCR.", | 1122 } |
1251 "items": { | 1123 }, |
1252 "$ref": "Page" | 1124 "type": "object" |
1253 }, | 1125 }, |
1254 "type": "array" | 1126 "DetectedBreak": { |
1255 }, | 1127 "description": "Detected start or end of a structural component.", |
1256 "text": { | 1128 "id": "DetectedBreak", |
1257 "description": "UTF-8 text detected on the pages.", | 1129 "properties": { |
1258 "type": "string" | 1130 "type": { |
1259 } | 1131 "description": "Detected break type.", |
1260 }, | 1132 "enum": [ |
1261 "type": "object" | 1133 "UNKNOWN", |
1262 }, | 1134 "SPACE", |
1263 "Vertex": { | 1135 "SURE_SPACE", |
1264 "description": "A vertex represents a 2D point in the image.\nNOTE:
the vertex coordinates are in the same scale as the original image.", | 1136 "EOL_SURE_SPACE", |
1265 "id": "Vertex", | 1137 "HYPHEN", |
1266 "properties": { | 1138 "LINE_BREAK" |
1267 "y": { | 1139 ], |
1268 "description": "Y coordinate.", | 1140 "enumDescriptions": [ |
| 1141 "Unknown break label type.", |
| 1142 "Regular space.", |
| 1143 "Sure space (very wide).", |
| 1144 "Line-wrapping break.", |
| 1145 "End-line hyphen that is not present in text; does not c
o-occur with\n`SPACE`, `LEADER_SPACE`, or `LINE_BREAK`.", |
| 1146 "Line break that ends a paragraph." |
| 1147 ], |
| 1148 "type": "string" |
| 1149 }, |
| 1150 "isPrefix": { |
| 1151 "description": "True if break prepends the element.", |
| 1152 "type": "boolean" |
| 1153 } |
| 1154 }, |
| 1155 "type": "object" |
| 1156 }, |
| 1157 "ImageContext": { |
| 1158 "description": "Image context and/or feature-specific parameters.", |
| 1159 "id": "ImageContext", |
| 1160 "properties": { |
| 1161 "cropHintsParams": { |
| 1162 "$ref": "CropHintsParams", |
| 1163 "description": "Parameters for crop hints annotation request
." |
| 1164 }, |
| 1165 "languageHints": { |
| 1166 "description": "List of languages to use for TEXT_DETECTION.
In most cases, an empty value\nyields the best results since it enables automat
ic language detection. For\nlanguages based on the Latin alphabet, setting `lang
uage_hints` is not\nneeded. In rare cases, when the language of the text in the
image is known,\nsetting a hint will help get better results (although it will b
e a\nsignificant hindrance if the hint is wrong). Text detection returns an\nerr
or if one or more of the specified languages is not one of the\n[supported langu
ages](/vision/docs/languages).", |
| 1167 "items": { |
| 1168 "type": "string" |
| 1169 }, |
| 1170 "type": "array" |
| 1171 }, |
| 1172 "latLongRect": { |
| 1173 "$ref": "LatLongRect", |
| 1174 "description": "lat/long rectangle that specifies the locati
on of the image." |
| 1175 } |
| 1176 }, |
| 1177 "type": "object" |
| 1178 }, |
| 1179 "Page": { |
| 1180 "description": "Detected page from OCR.", |
| 1181 "id": "Page", |
| 1182 "properties": { |
| 1183 "height": { |
| 1184 "description": "Page height in pixels.", |
1269 "format": "int32", | 1185 "format": "int32", |
1270 "type": "integer" | 1186 "type": "integer" |
1271 }, | 1187 }, |
1272 "x": { | 1188 "width": { |
1273 "description": "X coordinate.", | 1189 "description": "Page width in pixels.", |
1274 "format": "int32", | 1190 "format": "int32", |
1275 "type": "integer" | 1191 "type": "integer" |
1276 } | 1192 }, |
1277 }, | 1193 "blocks": { |
1278 "type": "object" | 1194 "description": "List of blocks of text, images etc on this p
age.", |
1279 }, | 1195 "items": { |
1280 "DetectedLanguage": { | 1196 "$ref": "Block" |
1281 "description": "Detected language for a structural component.", | 1197 }, |
1282 "id": "DetectedLanguage", | 1198 "type": "array" |
1283 "properties": { | 1199 }, |
1284 "languageCode": { | 1200 "property": { |
1285 "description": "The BCP-47 language code, such as \"en-US\"
or \"sr-Latn\". For more\ninformation, see\nhttp://www.unicode.org/reports/tr35/
#Unicode_locale_identifier.", | 1201 "$ref": "TextProperty", |
1286 "type": "string" | 1202 "description": "Additional information detected on the page.
" |
1287 }, | 1203 } |
1288 "confidence": { | 1204 }, |
1289 "description": "Confidence of detected language. Range [0, 1
].", | 1205 "type": "object" |
1290 "format": "float", | 1206 }, |
1291 "type": "number" | 1207 "AnnotateImageRequest": { |
1292 } | 1208 "description": "Request for performing Google Cloud Vision API tasks
over a user-provided\nimage, with user-requested features.", |
1293 }, | 1209 "id": "AnnotateImageRequest", |
1294 "type": "object" | 1210 "properties": { |
1295 }, | 1211 "features": { |
1296 "TextProperty": { | 1212 "description": "Requested features.", |
1297 "description": "Additional information detected on the structural co
mponent.", | 1213 "items": { |
1298 "id": "TextProperty", | 1214 "$ref": "Feature" |
1299 "properties": { | 1215 }, |
1300 "detectedBreak": { | 1216 "type": "array" |
1301 "$ref": "DetectedBreak", | 1217 }, |
1302 "description": "Detected start or end of a text segment." | 1218 "image": { |
1303 }, | 1219 "$ref": "Image", |
1304 "detectedLanguages": { | 1220 "description": "The image to be processed." |
1305 "description": "A list of detected languages together with c
onfidence.", | 1221 }, |
1306 "items": { | 1222 "imageContext": { |
1307 "$ref": "DetectedLanguage" | 1223 "$ref": "ImageContext", |
1308 }, | 1224 "description": "Additional context that may accompany the im
age." |
1309 "type": "array" | 1225 } |
1310 } | 1226 }, |
1311 }, | 1227 "type": "object" |
1312 "type": "object" | 1228 }, |
1313 }, | 1229 "Status": { |
1314 "BoundingPoly": { | 1230 "description": "The `Status` type defines a logical error model that
is suitable for different\nprogramming environments, including REST APIs and RP
C APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is desig
ned to be:\n\n- Simple to use and understand for most users\n- Flexible enough t
o meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pie
ces of data: error code, error message,\nand error details. The error code shoul
d be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes
if needed. The\nerror message should be a developer-facing English message tha
t helps\ndevelopers *understand* and *resolve* the error. If a localized user-fa
cing\nerror message is needed, put the localized message in the error details or
\nlocalize it in the client. The optional error details may contain arbitrary\ni
nformation about the error. There is a predefined set of error detail types\nin
the package `google.rpc` that can be used for common error conditions.\n\n# Lang
uage mapping\n\nThe `Status` message is the logical representation of the error
model, but it\nis not necessarily the actual wire format. When the `Status` mess
age is\nexposed in different client libraries and different wire protocols, it c
an be\nmapped differently. For example, it will likely be mapped to some excepti
ons\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n
\nThe error model and the `Status` message can be used in a variety of\nenvironm
ents, either with or without APIs, to provide a\nconsistent developer experience
across different environments.\n\nExample uses of this error model include:\n\n
- Partial errors. If a service needs to return partial errors to the client,\n
it may embed the `Status` in the normal response to indicate the partial\n
errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step m
ay\n have a `Status` message for error reporting.\n\n- Batch operations. If a
client uses batch request and batch response, the\n `Status` message should
be used directly inside batch response, one for\n each error sub-response.\n\
n- Asynchronous operations. If an API call embeds asynchronous operation\n re
sults in its response, the status of those operations should be\n represented
directly using the `Status` message.\n\n- Logging. If some API errors are store
d in logs, the message `Status` could\n be used directly after any stripping
needed for security/privacy reasons.", |
1315 "description": "A bounding polygon for the detected image annotation
.", | 1231 "id": "Status", |
1316 "id": "BoundingPoly", | 1232 "properties": { |
1317 "properties": { | 1233 "code": { |
1318 "vertices": { | 1234 "description": "The status code, which should be an enum val
ue of google.rpc.Code.", |
1319 "description": "The bounding polygon vertices.", | 1235 "format": "int32", |
1320 "items": { | 1236 "type": "integer" |
1321 "$ref": "Vertex" | 1237 }, |
1322 }, | 1238 "message": { |
1323 "type": "array" | 1239 "description": "A developer-facing error message, which shou
ld be in English. Any\nuser-facing error message should be localized and sent in
the\ngoogle.rpc.Status.details field, or localized by the client.", |
1324 } | 1240 "type": "string" |
1325 }, | 1241 }, |
1326 "type": "object" | 1242 "details": { |
1327 }, | 1243 "description": "A list of messages that carry the error deta
ils. There is a common set of\nmessage types for APIs to use.", |
1328 "WebEntity": { | 1244 "items": { |
1329 "description": "Entity deduced from similar images on the Internet."
, | 1245 "additionalProperties": { |
1330 "id": "WebEntity", | 1246 "description": "Properties of the object. Contains f
ield @type with type URL.", |
1331 "properties": { | 1247 "type": "any" |
1332 "entityId": { | 1248 }, |
1333 "description": "Opaque entity ID.", | 1249 "type": "object" |
1334 "type": "string" | 1250 }, |
1335 }, | 1251 "type": "array" |
1336 "description": { | 1252 } |
1337 "description": "Canonical description of the entity, in Engl
ish.", | 1253 }, |
1338 "type": "string" | 1254 "type": "object" |
1339 }, | 1255 }, |
1340 "score": { | 1256 "LatLongRect": { |
1341 "description": "Overall relevancy score for the entity.\nNot
normalized and not comparable across different image queries.", | 1257 "description": "Rectangle determined by min and max `LatLng` pairs."
, |
1342 "format": "float", | 1258 "id": "LatLongRect", |
1343 "type": "number" | 1259 "properties": { |
1344 } | 1260 "maxLatLng": { |
| 1261 "$ref": "LatLng", |
| 1262 "description": "Max lat/long pair." |
| 1263 }, |
| 1264 "minLatLng": { |
| 1265 "$ref": "LatLng", |
| 1266 "description": "Min lat/long pair." |
| 1267 } |
| 1268 }, |
| 1269 "type": "object" |
| 1270 }, |
| 1271 "Symbol": { |
| 1272 "description": "A single symbol representation.", |
| 1273 "id": "Symbol", |
| 1274 "properties": { |
| 1275 "text": { |
| 1276 "description": "The actual UTF-8 representation of the symbo
l.", |
| 1277 "type": "string" |
| 1278 }, |
| 1279 "property": { |
| 1280 "$ref": "TextProperty", |
| 1281 "description": "Additional information detected for the symb
ol." |
| 1282 }, |
| 1283 "boundingBox": { |
| 1284 "$ref": "BoundingPoly", |
| 1285 "description": "The bounding box for the symbol.\nThe vertic
es are in the order of top-left, top-right, bottom-right,\nbottom-left. When a r
otation of the bounding box is detected the rotation\nis represented as around t
he top-left corner as defined when the text is\nread in the 'natural' orientatio
n.\nFor example:\n * when the text is horizontal it might look like:\n 0---
-1\n | |\n 3----2\n * when it's rotated 180 degrees around the top-l
eft corner it becomes:\n 2----3\n | |\n 1----0\n and the vertice
order will still be (0, 1, 2, 3)." |
| 1286 } |
| 1287 }, |
| 1288 "type": "object" |
| 1289 }, |
| 1290 "CropHintsAnnotation": { |
| 1291 "description": "Set of crop hints that are used to generate new crop
s when serving images.", |
| 1292 "id": "CropHintsAnnotation", |
| 1293 "properties": { |
| 1294 "cropHints": { |
| 1295 "description": "Crop hint results.", |
| 1296 "items": { |
| 1297 "$ref": "CropHint" |
| 1298 }, |
| 1299 "type": "array" |
| 1300 } |
| 1301 }, |
| 1302 "type": "object" |
| 1303 }, |
| 1304 "LatLng": { |
| 1305 "description": "An object representing a latitude/longitude pair. Th
is is expressed as a pair\nof doubles representing degrees latitude and degrees
longitude. Unless\nspecified otherwise, this must conform to the\n<a href=\"http
://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf\">WGS84\nstandard</a>. Values
must be within normalized ranges.\n\nExample of normalization code in Python:\n
\n def NormalizeLongitude(longitude):\n \"\"\"Wraps decimal degrees long
itude to [-180.0, 180.0].\"\"\"\n q, r = divmod(longitude, 360.0)\n if
r > 180.0 or (r == 180.0 and q <= -1.0):\n return r - 360.0\n retur
n r\n\n def NormalizeLatLng(latitude, longitude):\n \"\"\"Wraps decimal
degrees latitude and longitude to\n [-90.0, 90.0] and [-180.0, 180.0], resp
ectively.\"\"\"\n r = latitude % 360.0\n if r <= 90.0:\n return
r, NormalizeLongitude(longitude)\n elif r >= 270.0:\n return r - 36
0, NormalizeLongitude(longitude)\n else:\n return 180 - r, Normalize
Longitude(longitude + 180.0)\n\n assert 180.0 == NormalizeLongitude(180.0)\n
assert -180.0 == NormalizeLongitude(-180.0)\n assert -179.0 == NormalizeLo
ngitude(181.0)\n assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0)\n assert
(0.0, 0.0) == NormalizeLatLng(-360.0, 0.0)\n assert (85.0, 180.0) == Normali
zeLatLng(95.0, 0.0)\n assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0)\
n assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0)\n assert (-90.0, -10.
0) == NormalizeLatLng(-90.0, -10.0)\n assert (0.0, -170.0) == NormalizeLatLng
(-180.0, 10.0)\n assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0)\n as
sert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0)\n assert (90.0, 10.0) == N
ormalizeLatLng(-270.0, 10.0)", |
| 1306 "id": "LatLng", |
| 1307 "properties": { |
| 1308 "latitude": { |
| 1309 "description": "The latitude in degrees. It must be in the r
ange [-90.0, +90.0].", |
| 1310 "format": "double", |
| 1311 "type": "number" |
| 1312 }, |
| 1313 "longitude": { |
| 1314 "description": "The longitude in degrees. It must be in the
range [-180.0, +180.0].", |
| 1315 "format": "double", |
| 1316 "type": "number" |
| 1317 } |
| 1318 }, |
| 1319 "type": "object" |
| 1320 }, |
| 1321 "Color": { |
| 1322 "description": "Represents a color in the RGBA color space. This rep
resentation is designed\nfor simplicity of conversion to/from color representati
ons in various\nlanguages over compactness; for example, the fields of this repr
esentation\ncan be trivially provided to the constructor of \"java.awt.Color\" i
n Java; it\ncan also be trivially provided to UIColor's \"+colorWithRed:green:bl
ue:alpha\"\nmethod in iOS; and, with just a little work, it can be easily format
ted into\na CSS \"rgba()\" string in JavaScript, as well. Here are some examples
:\n\nExample (Java):\n\n import com.google.type.Color;\n\n // ...\n
public static java.awt.Color fromProto(Color protocolor) {\n float alpha =
protocolor.hasAlpha()\n ? protocolor.getAlpha().getValue()\n
: 1.0;\n\n return new java.awt.Color(\n protocolor.getRed(),\n
protocolor.getGreen(),\n protocolor.getBlue(),\n
alpha);\n }\n\n public static Color toProto(java.awt.Color color) {\n
float red = (float) color.getRed();\n float green = (float) color.getG
reen();\n float blue = (float) color.getBlue();\n float denominator
= 255.0;\n Color.Builder resultBuilder =\n Color\n
.newBuilder()\n .setRed(red / denominator)\n .setGr
een(green / denominator)\n .setBlue(blue / denominator);\n i
nt alpha = color.getAlpha();\n if (alpha != 255) {\n result.setAlp
ha(\n FloatValue\n .newBuilder()\n .
setValue(((float) alpha) / denominator)\n .build());\n }\n
return resultBuilder.build();\n }\n // ...\n\nExample (iOS / Obj-
C):\n\n // ...\n static UIColor* fromProto(Color* protocolor) {\n
float red = [protocolor red];\n float green = [protocolor green];\n
float blue = [protocolor blue];\n FloatValue* alpha_wrapper = [protoco
lor alpha];\n float alpha = 1.0;\n if (alpha_wrapper != nil) {\n
alpha = [alpha_wrapper value];\n }\n return [UIColor color
WithRed:red green:green blue:blue alpha:alpha];\n }\n\n static Color* to
Proto(UIColor* color) {\n CGFloat red, green, blue, alpha;\n if
(![color getRed:&red green:&green blue:&blue alpha:&alpha]) {\n return
nil;\n }\n Color* result = [Color alloc] init];\n [resu
lt setRed:red];\n [result setGreen:green];\n [result setBlue:blu
e];\n if (alpha <= 0.9999) {\n [result setAlpha:floatWrapperWi
thValue(alpha)];\n }\n [result autorelease];\n return re
sult;\n }\n // ...\n\n Example (JavaScript):\n\n // ...\n\n var prot
oToCssColor = function(rgb_color) {\n var redFrac = rgb_color.red || 0.0;\
n var greenFrac = rgb_color.green || 0.0;\n var blueFrac = rgb_color
.blue || 0.0;\n var red = Math.floor(redFrac * 255);\n var green = M
ath.floor(greenFrac * 255);\n var blue = Math.floor(blueFrac * 255);\n\n
if (!('alpha' in rgb_color)) {\n return rgbToCssColor_(red, green,
blue);\n }\n\n var alphaFrac = rgb_color.alpha.value || 0.0;\n
var rgbParams = [red, green, blue].join(',');\n return ['rgba(', rgbPara
ms, ',', alphaFrac, ')'].join('');\n };\n\n var rgbToCssColor_ = function(
red, green, blue) {\n var rgbNumber = new Number((red << 16) | (green << 8)
| blue);\n var hexString = rgbNumber.toString(16);\n var missingZeros
= 6 - hexString.length;\n var resultBuilder = ['#'];\n for (var i = 0
; i < missingZeros; i++) {\n resultBuilder.push('0');\n }\n re
sultBuilder.push(hexString);\n return resultBuilder.join('');\n };\n\n
// ...", |
| 1323 "id": "Color", |
| 1324 "properties": { |
| 1325 "alpha": { |
| 1326 "description": "The fraction of this color that should be ap
plied to the pixel. That is,\nthe final pixel color is defined by the equation:\
n\n pixel color = alpha * (this color) + (1.0 - alpha) * (background color)\n\n
This means that a value of 1.0 corresponds to a solid color, whereas\na value of
0.0 corresponds to a completely transparent color. This\nuses a wrapper message
rather than a simple float scalar so that it is\npossible to distinguish betwee
n a default value and the value being unset.\nIf omitted, this color object is t
o be rendered as a solid color\n(as if the alpha value had been explicitly given
with a value of 1.0).", |
| 1327 "format": "float", |
| 1328 "type": "number" |
| 1329 }, |
| 1330 "blue": { |
| 1331 "description": "The amount of blue in the color as a value i
n the interval [0, 1].", |
| 1332 "format": "float", |
| 1333 "type": "number" |
| 1334 }, |
| 1335 "green": { |
| 1336 "description": "The amount of green in the color as a value
in the interval [0, 1].", |
| 1337 "format": "float", |
| 1338 "type": "number" |
| 1339 }, |
| 1340 "red": { |
| 1341 "description": "The amount of red in the color as a value in
the interval [0, 1].", |
| 1342 "format": "float", |
| 1343 "type": "number" |
| 1344 } |
1345 }, | 1345 }, |
1346 "type": "object" | 1346 "type": "object" |
1347 } | 1347 } |
1348 }, | 1348 }, |
1349 "servicePath": "", | 1349 "servicePath": "", |
1350 "title": "Google Cloud Vision API", | 1350 "title": "Google Cloud Vision API", |
1351 "version": "v1" | 1351 "version": "v1" |
1352 } | 1352 } |
OLD | NEW |