Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(107)

Side by Side Diff: discovery/googleapis/vision__v1.json

Issue 2695743002: Api-roll 45: 2017-02-13 (Closed)
Patch Set: reverted local changes to pubspec file Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « discovery/googleapis/storage__v1.json ('k') | discovery/googleapis/webmasters__v3.json » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 { 1 {
2 "auth": { 2 "auth": {
3 "oauth2": { 3 "oauth2": {
4 "scopes": { 4 "scopes": {
5 "https://www.googleapis.com/auth/cloud-platform": { 5 "https://www.googleapis.com/auth/cloud-platform": {
6 "description": "View and manage your data across Google Clou d Platform services" 6 "description": "View and manage your data across Google Clou d Platform services"
7 } 7 }
8 } 8 }
9 } 9 }
10 }, 10 },
11 "basePath": "", 11 "basePath": "",
12 "baseUrl": "https://vision.googleapis.com/", 12 "baseUrl": "https://vision.googleapis.com/",
13 "batchPath": "batch", 13 "batchPath": "batch",
14 "canonicalName": "Vision", 14 "canonicalName": "Vision",
15 "description": "Integrates Google Vision features, including image labeling, face, logo, and landmark detection, optical character recognition (OCR), and de tection of explicit content, into applications.", 15 "description": "Integrates Google Vision features, including image labeling, face, logo, and landmark detection, optical character recognition (OCR), and de tection of explicit content, into applications.",
16 "discoveryVersion": "v1", 16 "discoveryVersion": "v1",
17 "documentationLink": "https://cloud.google.com/vision/", 17 "documentationLink": "https://cloud.google.com/vision/",
18 "icons": { 18 "icons": {
19 "x16": "http://www.google.com/images/icons/product/search-16.gif", 19 "x16": "http://www.google.com/images/icons/product/search-16.gif",
20 "x32": "http://www.google.com/images/icons/product/search-32.gif" 20 "x32": "http://www.google.com/images/icons/product/search-32.gif"
21 }, 21 },
22 "id": "vision:v1", 22 "id": "vision:v1",
23 "kind": "discovery#restDescription", 23 "kind": "discovery#restDescription",
24 "name": "vision", 24 "name": "vision",
25 "ownerDomain": "google.com", 25 "ownerDomain": "google.com",
26 "ownerName": "Google", 26 "ownerName": "Google",
27 "parameters": { 27 "parameters": {
28 "access_token": {
29 "description": "OAuth access token.",
30 "location": "query",
31 "type": "string"
32 },
33 "prettyPrint": {
34 "default": "true",
35 "description": "Returns response with indentations and line breaks." ,
36 "location": "query",
37 "type": "boolean"
38 },
39 "key": {
40 "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.",
41 "location": "query",
42 "type": "string"
43 },
44 "quotaUser": {
45 "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.",
46 "location": "query",
47 "type": "string"
48 },
49 "pp": {
50 "default": "true",
51 "description": "Pretty-print response.",
52 "location": "query",
53 "type": "boolean"
54 },
55 "fields": { 28 "fields": {
56 "description": "Selector specifying which fields to include in a par tial response.", 29 "description": "Selector specifying which fields to include in a par tial response.",
57 "location": "query", 30 "location": "query",
58 "type": "string" 31 "type": "string"
59 }, 32 },
33 "uploadType": {
34 "description": "Legacy upload protocol for media (e.g. \"media\", \" multipart\").",
35 "location": "query",
36 "type": "string"
37 },
38 "$.xgafv": {
39 "description": "V1 error format.",
40 "enum": [
41 "1",
42 "2"
43 ],
44 "enumDescriptions": [
45 "v1 error format",
46 "v2 error format"
47 ],
48 "location": "query",
49 "type": "string"
50 },
51 "callback": {
52 "description": "JSONP",
53 "location": "query",
54 "type": "string"
55 },
60 "alt": { 56 "alt": {
61 "default": "json", 57 "default": "json",
62 "description": "Data format for response.", 58 "description": "Data format for response.",
63 "enum": [ 59 "enum": [
64 "json", 60 "json",
65 "media", 61 "media",
66 "proto" 62 "proto"
67 ], 63 ],
68 "enumDescriptions": [ 64 "enumDescriptions": [
69 "Responses with Content-Type of application/json", 65 "Responses with Content-Type of application/json",
70 "Media download with context-dependent Content-Type", 66 "Media download with context-dependent Content-Type",
71 "Responses with Content-Type of application/x-protobuf" 67 "Responses with Content-Type of application/x-protobuf"
72 ], 68 ],
73 "location": "query", 69 "location": "query",
74 "type": "string" 70 "type": "string"
75 }, 71 },
76 "$.xgafv": { 72 "access_token": {
77 "description": "V1 error format.", 73 "description": "OAuth access token.",
78 "enum": [
79 "1",
80 "2"
81 ],
82 "enumDescriptions": [
83 "v1 error format",
84 "v2 error format"
85 ],
86 "location": "query", 74 "location": "query",
87 "type": "string" 75 "type": "string"
88 }, 76 },
89 "callback": { 77 "key": {
90 "description": "JSONP", 78 "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.",
91 "location": "query", 79 "location": "query",
92 "type": "string" 80 "type": "string"
93 }, 81 },
82 "quotaUser": {
83 "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.",
84 "location": "query",
85 "type": "string"
86 },
87 "pp": {
88 "default": "true",
89 "description": "Pretty-print response.",
90 "location": "query",
91 "type": "boolean"
92 },
94 "oauth_token": { 93 "oauth_token": {
95 "description": "OAuth 2.0 token for the current user.", 94 "description": "OAuth 2.0 token for the current user.",
96 "location": "query", 95 "location": "query",
97 "type": "string" 96 "type": "string"
98 }, 97 },
99 "uploadType": {
100 "description": "Legacy upload protocol for media (e.g. \"media\", \" multipart\").",
101 "location": "query",
102 "type": "string"
103 },
104 "bearer_token": { 98 "bearer_token": {
105 "description": "OAuth bearer token.", 99 "description": "OAuth bearer token.",
106 "location": "query", 100 "location": "query",
107 "type": "string" 101 "type": "string"
108 }, 102 },
109 "upload_protocol": { 103 "upload_protocol": {
110 "description": "Upload protocol for media (e.g. \"raw\", \"multipart \").", 104 "description": "Upload protocol for media (e.g. \"raw\", \"multipart \").",
111 "location": "query", 105 "location": "query",
112 "type": "string" 106 "type": "string"
107 },
108 "prettyPrint": {
109 "default": "true",
110 "description": "Returns response with indentations and line breaks." ,
111 "location": "query",
112 "type": "boolean"
113 } 113 }
114 }, 114 },
115 "protocol": "rest", 115 "protocol": "rest",
116 "resources": { 116 "resources": {
117 "images": { 117 "images": {
118 "methods": { 118 "methods": {
119 "annotate": { 119 "annotate": {
120 "description": "Run image detection and annotation for a bat ch of images.", 120 "description": "Run image detection and annotation for a bat ch of images.",
121 "httpMethod": "POST", 121 "httpMethod": "POST",
122 "id": "vision.images.annotate", 122 "id": "vision.images.annotate",
123 "parameterOrder": [], 123 "parameterOrder": [],
124 "parameters": {}, 124 "parameters": {},
125 "path": "v1/images:annotate", 125 "path": "v1/images:annotate",
126 "request": { 126 "request": {
127 "$ref": "BatchAnnotateImagesRequest" 127 "$ref": "BatchAnnotateImagesRequest"
128 }, 128 },
129 "response": { 129 "response": {
130 "$ref": "BatchAnnotateImagesResponse" 130 "$ref": "BatchAnnotateImagesResponse"
131 }, 131 },
132 "scopes": [ 132 "scopes": [
133 "https://www.googleapis.com/auth/cloud-platform" 133 "https://www.googleapis.com/auth/cloud-platform"
134 ] 134 ]
135 } 135 }
136 } 136 }
137 } 137 }
138 }, 138 },
139 "revision": "20170112", 139 "revision": "20170131",
140 "rootUrl": "https://vision.googleapis.com/", 140 "rootUrl": "https://vision.googleapis.com/",
141 "schemas": { 141 "schemas": {
142 "ImageSource": { 142 "ImageContext": {
143 "description": "External image source (Google Cloud Storage image lo cation).", 143 "description": "Image context and/or feature-specific parameters.",
144 "id": "ImageSource", 144 "id": "ImageContext",
145 "properties": { 145 "properties": {
146 "gcsImageUri": { 146 "languageHints": {
147 "description": "Google Cloud Storage image URI, which must b e in the following form:\n`gs://bucket_name/object_name` (for details, see\n[Goo gle Cloud Storage Request URIs](https://cloud.google.com/storage/docs/reference- uris)).\nNOTE: Cloud Storage object versioning is not supported.", 147 "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).",
148 "type": "string" 148 "items": {
149 "type": "string"
150 },
151 "type": "array"
152 },
153 "latLongRect": {
154 "$ref": "LatLongRect",
155 "description": "lat/long rectangle that specifies the locati on of the image."
149 } 156 }
150 }, 157 },
151 "type": "object" 158 "type": "object"
152 }, 159 },
153 "AnnotateImageRequest": { 160 "AnnotateImageRequest": {
154 "description": "Request for performing Google Cloud Vision API tasks over a user-provided\nimage, with user-requested features.", 161 "description": "Request for performing Google Cloud Vision API tasks over a user-provided\nimage, with user-requested features.",
155 "id": "AnnotateImageRequest", 162 "id": "AnnotateImageRequest",
156 "properties": { 163 "properties": {
164 "imageContext": {
165 "$ref": "ImageContext",
166 "description": "Additional context that may accompany the im age."
167 },
157 "image": { 168 "image": {
158 "$ref": "Image", 169 "$ref": "Image",
159 "description": "The image to be processed." 170 "description": "The image to be processed."
160 }, 171 },
161 "imageContext": {
162 "$ref": "ImageContext",
163 "description": "Additional context that may accompany the im age."
164 },
165 "features": { 172 "features": {
166 "description": "Requested features.", 173 "description": "Requested features.",
167 "items": { 174 "items": {
168 "$ref": "Feature" 175 "$ref": "Feature"
169 }, 176 },
170 "type": "array" 177 "type": "array"
171 } 178 }
172 }, 179 },
173 "type": "object" 180 "type": "object"
174 }, 181 },
175 "AnnotateImageResponse": { 182 "Status": {
176 "description": "Response to an image annotation request.", 183 "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` which can be used for common error conditions.\n\n# Lan guage 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` mes sage is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some except ions\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\nenviron ments, either with or without APIs, to provide a\nconsistent developer experienc e 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 may\n have a `Status` message for error reporting purpose.\n\n- Batch operati ons. If a client uses batch request and batch response, the\n `Status` messag e should be used directly inside batch response, one for\n each error sub-res ponse.\n\n- Asynchronous operations. If an API call embeds asynchronous operatio n\n results in its response, the status of those operations should be\n re presented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any s tripping needed for security/privacy reasons.",
177 "id": "AnnotateImageResponse", 184 "id": "Status",
178 "properties": { 185 "properties": {
179 "labelAnnotations": { 186 "details": {
180 "description": "If present, label detection has completed su ccessfully.", 187 "description": "A list of messages that carry the error deta ils. There will be a\ncommon set of message types for APIs to use.",
181 "items": { 188 "items": {
182 "$ref": "EntityAnnotation" 189 "additionalProperties": {
190 "description": "Properties of the object. Contains f ield @type with type URL.",
191 "type": "any"
192 },
193 "type": "object"
183 }, 194 },
184 "type": "array" 195 "type": "array"
185 }, 196 },
186 "landmarkAnnotations": { 197 "code": {
187 "description": "If present, landmark detection has completed successfully.", 198 "description": "The status code, which should be an enum val ue of google.rpc.Code.",
188 "items": { 199 "format": "int32",
189 "$ref": "EntityAnnotation" 200 "type": "integer"
190 },
191 "type": "array"
192 }, 201 },
193 "safeSearchAnnotation": { 202 "message": {
194 "$ref": "SafeSearchAnnotation", 203 "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.",
195 "description": "If present, safe-search annotation has compl eted successfully." 204 "type": "string"
196 },
197 "imagePropertiesAnnotation": {
198 "$ref": "ImageProperties",
199 "description": "If present, image properties were extracted successfully."
200 },
201 "textAnnotations": {
202 "description": "If present, text (OCR) detection has complet ed successfully.",
203 "items": {
204 "$ref": "EntityAnnotation"
205 },
206 "type": "array"
207 },
208 "logoAnnotations": {
209 "description": "If present, logo detection has completed suc cessfully.",
210 "items": {
211 "$ref": "EntityAnnotation"
212 },
213 "type": "array"
214 },
215 "faceAnnotations": {
216 "description": "If present, face detection has completed suc cessfully.",
217 "items": {
218 "$ref": "FaceAnnotation"
219 },
220 "type": "array"
221 },
222 "error": {
223 "$ref": "Status",
224 "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."
225 } 205 }
226 }, 206 },
227 "type": "object" 207 "type": "object"
228 }, 208 },
229 "LatLongRect": { 209 "LatLongRect": {
230 "description": "Rectangle determined by min and max `LatLng` pairs." , 210 "description": "Rectangle determined by min and max `LatLng` pairs." ,
231 "id": "LatLongRect", 211 "id": "LatLongRect",
232 "properties": { 212 "properties": {
213 "minLatLng": {
214 "$ref": "LatLng",
215 "description": "Min lat/long pair."
216 },
233 "maxLatLng": { 217 "maxLatLng": {
234 "$ref": "LatLng", 218 "$ref": "LatLng",
235 "description": "Max lat/long pair." 219 "description": "Max lat/long pair."
236 },
237 "minLatLng": {
238 "$ref": "LatLng",
239 "description": "Min lat/long pair."
240 } 220 }
241 }, 221 },
242 "type": "object" 222 "type": "object"
243 }, 223 },
244 "Status": { 224 "LatLng": {
245 "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` which can be used for common error conditions.\n\n# Lan guage 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` mes sage is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some except ions\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\nenviron ments, either with or without APIs, to provide a\nconsistent developer experienc e 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 may\n have a `Status` message for error reporting purpose.\n\n- Batch operati ons. If a client uses batch request and batch response, the\n `Status` messag e should be used directly inside batch response, one for\n each error sub-res ponse.\n\n- Asynchronous operations. If an API call embeds asynchronous operatio n\n results in its response, the status of those operations should be\n re presented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any s tripping needed for security/privacy reasons.", 225 "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)\n\nThe code in logs/storage/validator/logs_validato r_traits.cc treats this type\nas if it were annotated as ST_LOCATION.",
246 "id": "Status", 226 "id": "LatLng",
247 "properties": { 227 "properties": {
248 "code": { 228 "latitude": {
249 "description": "The status code, which should be an enum val ue of google.rpc.Code.", 229 "description": "The latitude in degrees. It must be in the r ange [-90.0, +90.0].",
250 "format": "int32", 230 "format": "double",
251 "type": "integer" 231 "type": "number"
252 }, 232 },
253 "details": { 233 "longitude": {
254 "description": "A list of messages that carry the error deta ils. There will be a\ncommon set of message types for APIs to use.", 234 "description": "The longitude in degrees. It must be in the range [-180.0, +180.0].",
255 "items": { 235 "format": "double",
256 "additionalProperties": { 236 "type": "number"
257 "description": "Properties of the object. Contains f ield @type with type URL.",
258 "type": "any"
259 },
260 "type": "object"
261 },
262 "type": "array"
263 },
264 "message": {
265 "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.",
266 "type": "string"
267 } 237 }
268 }, 238 },
269 "type": "object" 239 "type": "object"
270 }, 240 },
271 "FaceAnnotation": { 241 "Color": {
272 "description": "A face annotation object contains the results of fac e detection.", 242 "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 // ...",
273 "id": "FaceAnnotation", 243 "id": "Color",
274 "properties": { 244 "properties": {
275 "tiltAngle": { 245 "green": {
276 "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].", 246 "description": "The amount of green in the color as a value in the interval [0, 1].",
277 "format": "float", 247 "format": "float",
278 "type": "number" 248 "type": "number"
279 }, 249 },
280 "underExposedLikelihood": { 250 "blue": {
281 "description": "Under-exposed likelihood.", 251 "description": "The amount of blue in the color as a value i n the interval [0, 1].",
252 "format": "float",
253 "type": "number"
254 },
255 "alpha": {
256 "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).",
257 "format": "float",
258 "type": "number"
259 },
260 "red": {
261 "description": "The amount of red in the color as a value in the interval [0, 1].",
262 "format": "float",
263 "type": "number"
264 }
265 },
266 "type": "object"
267 },
268 "Feature": {
269 "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.",
270 "id": "Feature",
271 "properties": {
272 "type": {
273 "description": "The feature type.",
274 "enum": [
275 "TYPE_UNSPECIFIED",
276 "FACE_DETECTION",
277 "LANDMARK_DETECTION",
278 "LOGO_DETECTION",
279 "LABEL_DETECTION",
280 "TEXT_DETECTION",
281 "SAFE_SEARCH_DETECTION",
282 "IMAGE_PROPERTIES"
283 ],
284 "enumDescriptions": [
285 "Unspecified feature type.",
286 "Run face detection.",
287 "Run landmark detection.",
288 "Run logo detection.",
289 "Run label detection.",
290 "Run OCR.",
291 "Run computer vision models to compute image safe-search properties.",
292 "Compute a set of image properties, such as the image's dominant colors."
293 ],
294 "type": "string"
295 },
296 "maxResults": {
297 "description": "Maximum number of results of this type.",
298 "format": "int32",
299 "type": "integer"
300 }
301 },
302 "type": "object"
303 },
304 "ImageProperties": {
305 "description": "Stores image properties, such as dominant colors.",
306 "id": "ImageProperties",
307 "properties": {
308 "dominantColors": {
309 "$ref": "DominantColorsAnnotation",
310 "description": "If present, dominant colors completed succes sfully."
311 }
312 },
313 "type": "object"
314 },
315 "SafeSearchAnnotation": {
316 "description": "Set of features pertaining to the image, computed by computer vision\nmethods over safe-search verticals (for example, adult, spoof, medical,\nviolence).",
317 "id": "SafeSearchAnnotation",
318 "properties": {
319 "violence": {
320 "description": "Violence likelihood.",
282 "enum": [ 321 "enum": [
283 "UNKNOWN", 322 "UNKNOWN",
284 "VERY_UNLIKELY", 323 "VERY_UNLIKELY",
285 "UNLIKELY",
286 "POSSIBLE",
287 "LIKELY",
288 "VERY_LIKELY"
289 ],
290 "enumDescriptions": [
291 "Unknown likelihood.",
292 "It is very unlikely that the image belongs to the speci fied vertical.",
293 "It is unlikely that the image belongs to the specified vertical.",
294 "It is possible that the image belongs to the specified vertical.",
295 "It is likely that the image belongs to the specified ve rtical.",
296 "It is very likely that the image belongs to the specifi ed vertical."
297 ],
298 "type": "string"
299 },
300 "fdBoundingPoly": {
301 "$ref": "BoundingPoly",
302 "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."
303 },
304 "landmarkingConfidence": {
305 "description": "Face landmarking confidence. Range [0, 1].",
306 "format": "float",
307 "type": "number"
308 },
309 "joyLikelihood": {
310 "description": "Joy likelihood.",
311 "enum": [
312 "UNKNOWN",
313 "VERY_UNLIKELY",
314 "UNLIKELY",
315 "POSSIBLE",
316 "LIKELY",
317 "VERY_LIKELY"
318 ],
319 "enumDescriptions": [
320 "Unknown likelihood.",
321 "It is very unlikely that the image belongs to the speci fied vertical.",
322 "It is unlikely that the image belongs to the specified vertical.",
323 "It is possible that the image belongs to the specified vertical.",
324 "It is likely that the image belongs to the specified ve rtical.",
325 "It is very likely that the image belongs to the specifi ed vertical."
326 ],
327 "type": "string"
328 },
329 "detectionConfidence": {
330 "description": "Detection confidence. Range [0, 1].",
331 "format": "float",
332 "type": "number"
333 },
334 "surpriseLikelihood": {
335 "description": "Surprise likelihood.",
336 "enum": [
337 "UNKNOWN",
338 "VERY_UNLIKELY",
339 "UNLIKELY",
340 "POSSIBLE",
341 "LIKELY",
342 "VERY_LIKELY"
343 ],
344 "enumDescriptions": [
345 "Unknown likelihood.",
346 "It is very unlikely that the image belongs to the speci fied vertical.",
347 "It is unlikely that the image belongs to the specified vertical.",
348 "It is possible that the image belongs to the specified vertical.",
349 "It is likely that the image belongs to the specified ve rtical.",
350 "It is very likely that the image belongs to the specifi ed vertical."
351 ],
352 "type": "string"
353 },
354 "angerLikelihood": {
355 "description": "Anger likelihood.",
356 "enum": [
357 "UNKNOWN",
358 "VERY_UNLIKELY",
359 "UNLIKELY", 324 "UNLIKELY",
360 "POSSIBLE", 325 "POSSIBLE",
361 "LIKELY", 326 "LIKELY",
362 "VERY_LIKELY" 327 "VERY_LIKELY"
363 ], 328 ],
364 "enumDescriptions": [ 329 "enumDescriptions": [
365 "Unknown likelihood.", 330 "Unknown likelihood.",
366 "It is very unlikely that the image belongs to the speci fied vertical.", 331 "It is very unlikely that the image belongs to the speci fied vertical.",
367 "It is unlikely that the image belongs to the specified vertical.", 332 "It is unlikely that the image belongs to the specified vertical.",
368 "It is possible that the image belongs to the specified vertical.", 333 "It is possible that the image belongs to the specified vertical.",
369 "It is likely that the image belongs to the specified ve rtical.", 334 "It is likely that the image belongs to the specified ve rtical.",
370 "It is very likely that the image belongs to the specifi ed vertical." 335 "It is very likely that the image belongs to the specifi ed vertical."
371 ], 336 ],
372 "type": "string" 337 "type": "string"
373 }, 338 },
374 "headwearLikelihood": { 339 "adult": {
375 "description": "Headwear likelihood.", 340 "description": "Represents the adult content likelihood for the image.",
376 "enum": [ 341 "enum": [
377 "UNKNOWN", 342 "UNKNOWN",
378 "VERY_UNLIKELY", 343 "VERY_UNLIKELY",
379 "UNLIKELY", 344 "UNLIKELY",
380 "POSSIBLE", 345 "POSSIBLE",
381 "LIKELY", 346 "LIKELY",
382 "VERY_LIKELY" 347 "VERY_LIKELY"
383 ], 348 ],
384 "enumDescriptions": [ 349 "enumDescriptions": [
385 "Unknown likelihood.", 350 "Unknown likelihood.",
386 "It is very unlikely that the image belongs to the speci fied vertical.", 351 "It is very unlikely that the image belongs to the speci fied vertical.",
387 "It is unlikely that the image belongs to the specified vertical.", 352 "It is unlikely that the image belongs to the specified vertical.",
388 "It is possible that the image belongs to the specified vertical.", 353 "It is possible that the image belongs to the specified vertical.",
389 "It is likely that the image belongs to the specified ve rtical.", 354 "It is likely that the image belongs to the specified ve rtical.",
390 "It is very likely that the image belongs to the specifi ed vertical." 355 "It is very likely that the image belongs to the specifi ed vertical."
391 ], 356 ],
392 "type": "string" 357 "type": "string"
393 }, 358 },
394 "panAngle": { 359 "spoof": {
395 "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].", 360 "description": "Spoof likelihood. The likelihood that an mod ification\nwas made to the image's canonical version to make it appear\nfunny or offensive.",
396 "format": "float",
397 "type": "number"
398 },
399 "boundingPoly": {
400 "$ref": "BoundingPoly",
401 "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."
402 },
403 "landmarks": {
404 "description": "Detected face landmarks.",
405 "items": {
406 "$ref": "Landmark"
407 },
408 "type": "array"
409 },
410 "blurredLikelihood": {
411 "description": "Blurred likelihood.",
412 "enum": [ 361 "enum": [
413 "UNKNOWN", 362 "UNKNOWN",
414 "VERY_UNLIKELY", 363 "VERY_UNLIKELY",
415 "UNLIKELY", 364 "UNLIKELY",
416 "POSSIBLE", 365 "POSSIBLE",
417 "LIKELY", 366 "LIKELY",
418 "VERY_LIKELY" 367 "VERY_LIKELY"
419 ], 368 ],
420 "enumDescriptions": [ 369 "enumDescriptions": [
421 "Unknown likelihood.", 370 "Unknown likelihood.",
422 "It is very unlikely that the image belongs to the speci fied vertical.", 371 "It is very unlikely that the image belongs to the speci fied vertical.",
423 "It is unlikely that the image belongs to the specified vertical.", 372 "It is unlikely that the image belongs to the specified vertical.",
424 "It is possible that the image belongs to the specified vertical.", 373 "It is possible that the image belongs to the specified vertical.",
425 "It is likely that the image belongs to the specified ve rtical.", 374 "It is likely that the image belongs to the specified ve rtical.",
426 "It is very likely that the image belongs to the specifi ed vertical." 375 "It is very likely that the image belongs to the specifi ed vertical."
427 ], 376 ],
428 "type": "string" 377 "type": "string"
429 }, 378 },
430 "rollAngle": { 379 "medical": {
431 "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].", 380 "description": "Likelihood that this is a medical image.",
432 "format": "float",
433 "type": "number"
434 },
435 "sorrowLikelihood": {
436 "description": "Sorrow likelihood.",
437 "enum": [ 381 "enum": [
438 "UNKNOWN", 382 "UNKNOWN",
439 "VERY_UNLIKELY", 383 "VERY_UNLIKELY",
440 "UNLIKELY", 384 "UNLIKELY",
441 "POSSIBLE", 385 "POSSIBLE",
442 "LIKELY", 386 "LIKELY",
443 "VERY_LIKELY" 387 "VERY_LIKELY"
444 ], 388 ],
445 "enumDescriptions": [ 389 "enumDescriptions": [
446 "Unknown likelihood.", 390 "Unknown likelihood.",
447 "It is very unlikely that the image belongs to the speci fied vertical.", 391 "It is very unlikely that the image belongs to the speci fied vertical.",
448 "It is unlikely that the image belongs to the specified vertical.", 392 "It is unlikely that the image belongs to the specified vertical.",
449 "It is possible that the image belongs to the specified vertical.", 393 "It is possible that the image belongs to the specified vertical.",
450 "It is likely that the image belongs to the specified ve rtical.", 394 "It is likely that the image belongs to the specified ve rtical.",
451 "It is very likely that the image belongs to the specifi ed vertical." 395 "It is very likely that the image belongs to the specifi ed vertical."
452 ], 396 ],
453 "type": "string" 397 "type": "string"
454 } 398 }
455 }, 399 },
456 "type": "object" 400 "type": "object"
457 }, 401 },
402 "DominantColorsAnnotation": {
403 "description": "Set of dominant colors and their corresponding score s.",
404 "id": "DominantColorsAnnotation",
405 "properties": {
406 "colors": {
407 "description": "RGB color values with their score and pixel fraction.",
408 "items": {
409 "$ref": "ColorInfo"
410 },
411 "type": "array"
412 }
413 },
414 "type": "object"
415 },
458 "Vertex": { 416 "Vertex": {
459 "description": "A vertex represents a 2D point in the image.\nNOTE: the vertex coordinates are in the same scale as the original image.", 417 "description": "A vertex represents a 2D point in the image.\nNOTE: the vertex coordinates are in the same scale as the original image.",
460 "id": "Vertex", 418 "id": "Vertex",
461 "properties": { 419 "properties": {
462 "y": { 420 "y": {
463 "description": "Y coordinate.", 421 "description": "Y coordinate.",
464 "format": "int32", 422 "format": "int32",
465 "type": "integer" 423 "type": "integer"
466 }, 424 },
467 "x": { 425 "x": {
468 "description": "X coordinate.", 426 "description": "X coordinate.",
469 "format": "int32", 427 "format": "int32",
470 "type": "integer" 428 "type": "integer"
471 } 429 }
472 }, 430 },
473 "type": "object" 431 "type": "object"
474 }, 432 },
475 "ColorInfo": {
476 "description": "Color information consists of RGB channels, score, a nd the fraction of\nthe image that the color occupies in the image.",
477 "id": "ColorInfo",
478 "properties": {
479 "pixelFraction": {
480 "description": "The fraction of pixels the color occupies in the image.\nValue in range [0, 1].",
481 "format": "float",
482 "type": "number"
483 },
484 "color": {
485 "$ref": "Color",
486 "description": "RGB components of the color."
487 },
488 "score": {
489 "description": "Image-specific score for this color. Value i n range [0, 1].",
490 "format": "float",
491 "type": "number"
492 }
493 },
494 "type": "object"
495 },
496 "BoundingPoly": { 433 "BoundingPoly": {
497 "description": "A bounding polygon for the detected image annotation .", 434 "description": "A bounding polygon for the detected image annotation .",
498 "id": "BoundingPoly", 435 "id": "BoundingPoly",
499 "properties": { 436 "properties": {
500 "vertices": { 437 "vertices": {
501 "description": "The bounding polygon vertices.", 438 "description": "The bounding polygon vertices.",
502 "items": { 439 "items": {
503 "$ref": "Vertex" 440 "$ref": "Vertex"
504 }, 441 },
505 "type": "array" 442 "type": "array"
506 } 443 }
507 }, 444 },
508 "type": "object" 445 "type": "object"
509 }, 446 },
510 "Landmark": { 447 "AnnotateImageResponse": {
511 "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`.", 448 "description": "Response to an image annotation request.",
512 "id": "Landmark", 449 "id": "AnnotateImageResponse",
513 "properties": { 450 "properties": {
514 "position": { 451 "imagePropertiesAnnotation": {
515 "$ref": "Position", 452 "$ref": "ImageProperties",
516 "description": "Face landmark position." 453 "description": "If present, image properties were extracted successfully."
517 }, 454 },
518 "type": { 455 "faceAnnotations": {
519 "description": "Face landmark type.", 456 "description": "If present, face detection has completed suc cessfully.",
520 "enum": [ 457 "items": {
521 "UNKNOWN_LANDMARK", 458 "$ref": "FaceAnnotation"
522 "LEFT_EYE", 459 },
523 "RIGHT_EYE", 460 "type": "array"
524 "LEFT_OF_LEFT_EYEBROW",
525 "RIGHT_OF_LEFT_EYEBROW",
526 "LEFT_OF_RIGHT_EYEBROW",
527 "RIGHT_OF_RIGHT_EYEBROW",
528 "MIDPOINT_BETWEEN_EYES",
529 "NOSE_TIP",
530 "UPPER_LIP",
531 "LOWER_LIP",
532 "MOUTH_LEFT",
533 "MOUTH_RIGHT",
534 "MOUTH_CENTER",
535 "NOSE_BOTTOM_RIGHT",
536 "NOSE_BOTTOM_LEFT",
537 "NOSE_BOTTOM_CENTER",
538 "LEFT_EYE_TOP_BOUNDARY",
539 "LEFT_EYE_RIGHT_CORNER",
540 "LEFT_EYE_BOTTOM_BOUNDARY",
541 "LEFT_EYE_LEFT_CORNER",
542 "RIGHT_EYE_TOP_BOUNDARY",
543 "RIGHT_EYE_RIGHT_CORNER",
544 "RIGHT_EYE_BOTTOM_BOUNDARY",
545 "RIGHT_EYE_LEFT_CORNER",
546 "LEFT_EYEBROW_UPPER_MIDPOINT",
547 "RIGHT_EYEBROW_UPPER_MIDPOINT",
548 "LEFT_EAR_TRAGION",
549 "RIGHT_EAR_TRAGION",
550 "LEFT_EYE_PUPIL",
551 "RIGHT_EYE_PUPIL",
552 "FOREHEAD_GLABELLA",
553 "CHIN_GNATHION",
554 "CHIN_LEFT_GONION",
555 "CHIN_RIGHT_GONION"
556 ],
557 "enumDescriptions": [
558 "Unknown face landmark detected. Should not be filled.",
559 "Left eye.",
560 "Right eye.",
561 "Left of left eyebrow.",
562 "Right of left eyebrow.",
563 "Left of right eyebrow.",
564 "Right of right eyebrow.",
565 "Midpoint between eyes.",
566 "Nose tip.",
567 "Upper lip.",
568 "Lower lip.",
569 "Mouth left.",
570 "Mouth right.",
571 "Mouth center.",
572 "Nose, bottom right.",
573 "Nose, bottom left.",
574 "Nose, bottom center.",
575 "Left eye, top boundary.",
576 "Left eye, right corner.",
577 "Left eye, bottom boundary.",
578 "Left eye, left corner.",
579 "Right eye, top boundary.",
580 "Right eye, right corner.",
581 "Right eye, bottom boundary.",
582 "Right eye, left corner.",
583 "Left eyebrow, upper midpoint.",
584 "Right eyebrow, upper midpoint.",
585 "Left ear tragion.",
586 "Right ear tragion.",
587 "Left eye pupil.",
588 "Right eye pupil.",
589 "Forehead glabella.",
590 "Chin gnathion.",
591 "Chin left gonion.",
592 "Chin right gonion."
593 ],
594 "type": "string"
595 }
596 },
597 "type": "object"
598 },
599 "ImageContext": {
600 "description": "Image context and/or feature-specific parameters.",
601 "id": "ImageContext",
602 "properties": {
603 "latLongRect": {
604 "$ref": "LatLongRect",
605 "description": "lat/long rectangle that specifies the locati on of the image."
606 }, 461 },
607 "languageHints": { 462 "logoAnnotations": {
608 "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).", 463 "description": "If present, logo detection has completed suc cessfully.",
609 "items": { 464 "items": {
610 "type": "string" 465 "$ref": "EntityAnnotation"
466 },
467 "type": "array"
468 },
469 "labelAnnotations": {
470 "description": "If present, label detection has completed su ccessfully.",
471 "items": {
472 "$ref": "EntityAnnotation"
473 },
474 "type": "array"
475 },
476 "safeSearchAnnotation": {
477 "$ref": "SafeSearchAnnotation",
478 "description": "If present, safe-search annotation has compl eted successfully."
479 },
480 "error": {
481 "$ref": "Status",
482 "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."
483 },
484 "landmarkAnnotations": {
485 "description": "If present, landmark detection has completed successfully.",
486 "items": {
487 "$ref": "EntityAnnotation"
488 },
489 "type": "array"
490 },
491 "textAnnotations": {
492 "description": "If present, text (OCR) detection or document (OCR) text detection has\ncompleted successfully.",
493 "items": {
494 "$ref": "EntityAnnotation"
611 }, 495 },
612 "type": "array" 496 "type": "array"
613 } 497 }
614 }, 498 },
615 "type": "object" 499 "type": "object"
616 }, 500 },
617 "BatchAnnotateImagesRequest": { 501 "Property": {
618 "description": "Multiple image annotation requests are batched into a single service call.", 502 "description": "A `Property` consists of a user-supplied name/value pair.",
619 "id": "BatchAnnotateImagesRequest", 503 "id": "Property",
620 "properties": { 504 "properties": {
621 "requests": { 505 "value": {
622 "description": "Individual image annotation requests for thi s batch.", 506 "description": "Value of the property.",
507 "type": "string"
508 },
509 "name": {
510 "description": "Name of the property.",
511 "type": "string"
512 }
513 },
514 "type": "object"
515 },
516 "LocationInfo": {
517 "description": "Detected entity location information.",
518 "id": "LocationInfo",
519 "properties": {
520 "latLng": {
521 "$ref": "LatLng",
522 "description": "lat/long location coordinates."
523 }
524 },
525 "type": "object"
526 },
527 "BatchAnnotateImagesResponse": {
528 "description": "Response to a batch image annotation request.",
529 "id": "BatchAnnotateImagesResponse",
530 "properties": {
531 "responses": {
532 "description": "Individual responses to image annotation req uests within the batch.",
623 "items": { 533 "items": {
624 "$ref": "AnnotateImageRequest" 534 "$ref": "AnnotateImageResponse"
625 }, 535 },
626 "type": "array" 536 "type": "array"
627 } 537 }
628 }, 538 },
629 "type": "object" 539 "type": "object"
630 }, 540 },
541 "ImageSource": {
542 "description": "External image source (Google Cloud Storage image lo cation).",
543 "id": "ImageSource",
544 "properties": {
545 "gcsImageUri": {
546 "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.",
547 "type": "string"
548 }
549 },
550 "type": "object"
551 },
552 "Position": {
553 "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.",
554 "id": "Position",
555 "properties": {
556 "x": {
557 "description": "X coordinate.",
558 "format": "float",
559 "type": "number"
560 },
561 "z": {
562 "description": "Z coordinate (or depth).",
563 "format": "float",
564 "type": "number"
565 },
566 "y": {
567 "description": "Y coordinate.",
568 "format": "float",
569 "type": "number"
570 }
571 },
572 "type": "object"
573 },
574 "ColorInfo": {
575 "description": "Color information consists of RGB channels, score, a nd the fraction of\nthe image that the color occupies in the image.",
576 "id": "ColorInfo",
577 "properties": {
578 "pixelFraction": {
579 "description": "The fraction of pixels the color occupies in the image.\nValue in range [0, 1].",
580 "format": "float",
581 "type": "number"
582 },
583 "color": {
584 "$ref": "Color",
585 "description": "RGB components of the color."
586 },
587 "score": {
588 "description": "Image-specific score for this color. Value i n range [0, 1].",
589 "format": "float",
590 "type": "number"
591 }
592 },
593 "type": "object"
594 },
631 "EntityAnnotation": { 595 "EntityAnnotation": {
632 "description": "Set of detected entity features.", 596 "description": "Set of detected entity features.",
633 "id": "EntityAnnotation", 597 "id": "EntityAnnotation",
634 "properties": { 598 "properties": {
635 "mid": { 599 "mid": {
636 "description": "Opaque entity ID. Some IDs may be available in\n[Google Knowledge Graph Search API](https://developers.google.com/knowledge- graph/).", 600 "description": "Opaque entity ID. Some IDs may be available in\n[Google Knowledge Graph Search API](https://developers.google.com/knowledge- graph/).",
637 "type": "string" 601 "type": "string"
638 }, 602 },
603 "confidence": {
604 "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].",
605 "format": "float",
606 "type": "number"
607 },
608 "boundingPoly": {
609 "$ref": "BoundingPoly",
610 "description": "Image region to which this entity belongs. C urrently not produced\nfor `LABEL_DETECTION` features. For `TEXT_DETECTION` (OCR ), `boundingPoly`s\nare produced for the entire text detected in an image region , followed by\n`boundingPoly`s for each word within the detected text."
611 },
612 "locale": {
613 "description": "The language code for the locale in which th e entity textual\n`description` is expressed.",
614 "type": "string"
615 },
639 "description": { 616 "description": {
640 "description": "Entity textual description, expressed in its `locale` language.", 617 "description": "Entity textual description, expressed in its `locale` language.",
641 "type": "string" 618 "type": "string"
642 }, 619 },
643 "topicality": { 620 "topicality": {
644 "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].", 621 "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].",
645 "format": "float", 622 "format": "float",
646 "type": "number" 623 "type": "number"
647 }, 624 },
648 "locale": {
649 "description": "The language code for the locale in which th e entity textual\n`description` is expressed.",
650 "type": "string"
651 },
652 "properties": { 625 "properties": {
653 "description": "Some entities may have optional user-supplie d `Property` (name/value)\nfields, such a score or string that qualifies the ent ity.", 626 "description": "Some entities may have optional user-supplie d `Property` (name/value)\nfields, such a score or string that qualifies the ent ity.",
654 "items": { 627 "items": {
655 "$ref": "Property" 628 "$ref": "Property"
656 }, 629 },
657 "type": "array" 630 "type": "array"
658 }, 631 },
659 "score": { 632 "score": {
660 "description": "Overall score of the result. Range [0, 1].", 633 "description": "Overall score of the result. Range [0, 1].",
661 "format": "float", 634 "format": "float",
662 "type": "number" 635 "type": "number"
663 }, 636 },
664 "boundingPoly": {
665 "$ref": "BoundingPoly",
666 "description": "Image region to which this entity belongs. C urrently not produced\nfor `LABEL_DETECTION` features. For `TEXT_DETECTION` (OCR ), `boundingPoly`s\nare produced for the entire text detected in an image region , followed by\n`boundingPoly`s for each word within the detected text."
667 },
668 "locations": { 637 "locations": {
669 "description": "The location information for the detected en tity. Multiple\n`LocationInfo` elements can be present because one location may\ nindicate the location of the scene in the image, and another location\nmay indi cate the location of the place where the image was taken.\nLocation information is usually present for landmarks.", 638 "description": "The location information for the detected en tity. Multiple\n`LocationInfo` elements can be present because one location may\ nindicate the location of the scene in the image, and another location\nmay indi cate the location of the place where the image was taken.\nLocation information is usually present for landmarks.",
670 "items": { 639 "items": {
671 "$ref": "LocationInfo" 640 "$ref": "LocationInfo"
672 }, 641 },
673 "type": "array" 642 "type": "array"
674 },
675 "confidence": {
676 "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].",
677 "format": "float",
678 "type": "number"
679 } 643 }
680 }, 644 },
681 "type": "object" 645 "type": "object"
682 }, 646 },
683 "Property": { 647 "Landmark": {
684 "description": "A `Property` consists of a user-supplied name/value pair.", 648 "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`.",
685 "id": "Property", 649 "id": "Landmark",
686 "properties": { 650 "properties": {
687 "value": { 651 "position": {
688 "description": "Value of the property.", 652 "$ref": "Position",
689 "type": "string" 653 "description": "Face landmark position."
690 }, 654 },
691 "name": { 655 "type": {
692 "description": "Name of the property.", 656 "description": "Face landmark type.",
657 "enum": [
658 "UNKNOWN_LANDMARK",
659 "LEFT_EYE",
660 "RIGHT_EYE",
661 "LEFT_OF_LEFT_EYEBROW",
662 "RIGHT_OF_LEFT_EYEBROW",
663 "LEFT_OF_RIGHT_EYEBROW",
664 "RIGHT_OF_RIGHT_EYEBROW",
665 "MIDPOINT_BETWEEN_EYES",
666 "NOSE_TIP",
667 "UPPER_LIP",
668 "LOWER_LIP",
669 "MOUTH_LEFT",
670 "MOUTH_RIGHT",
671 "MOUTH_CENTER",
672 "NOSE_BOTTOM_RIGHT",
673 "NOSE_BOTTOM_LEFT",
674 "NOSE_BOTTOM_CENTER",
675 "LEFT_EYE_TOP_BOUNDARY",
676 "LEFT_EYE_RIGHT_CORNER",
677 "LEFT_EYE_BOTTOM_BOUNDARY",
678 "LEFT_EYE_LEFT_CORNER",
679 "RIGHT_EYE_TOP_BOUNDARY",
680 "RIGHT_EYE_RIGHT_CORNER",
681 "RIGHT_EYE_BOTTOM_BOUNDARY",
682 "RIGHT_EYE_LEFT_CORNER",
683 "LEFT_EYEBROW_UPPER_MIDPOINT",
684 "RIGHT_EYEBROW_UPPER_MIDPOINT",
685 "LEFT_EAR_TRAGION",
686 "RIGHT_EAR_TRAGION",
687 "LEFT_EYE_PUPIL",
688 "RIGHT_EYE_PUPIL",
689 "FOREHEAD_GLABELLA",
690 "CHIN_GNATHION",
691 "CHIN_LEFT_GONION",
692 "CHIN_RIGHT_GONION"
693 ],
694 "enumDescriptions": [
695 "Unknown face landmark detected. Should not be filled.",
696 "Left eye.",
697 "Right eye.",
698 "Left of left eyebrow.",
699 "Right of left eyebrow.",
700 "Left of right eyebrow.",
701 "Right of right eyebrow.",
702 "Midpoint between eyes.",
703 "Nose tip.",
704 "Upper lip.",
705 "Lower lip.",
706 "Mouth left.",
707 "Mouth right.",
708 "Mouth center.",
709 "Nose, bottom right.",
710 "Nose, bottom left.",
711 "Nose, bottom center.",
712 "Left eye, top boundary.",
713 "Left eye, right corner.",
714 "Left eye, bottom boundary.",
715 "Left eye, left corner.",
716 "Right eye, top boundary.",
717 "Right eye, right corner.",
718 "Right eye, bottom boundary.",
719 "Right eye, left corner.",
720 "Left eyebrow, upper midpoint.",
721 "Right eyebrow, upper midpoint.",
722 "Left ear tragion.",
723 "Right ear tragion.",
724 "Left eye pupil.",
725 "Right eye pupil.",
726 "Forehead glabella.",
727 "Chin gnathion.",
728 "Chin left gonion.",
729 "Chin right gonion."
730 ],
693 "type": "string" 731 "type": "string"
694 } 732 }
695 }, 733 },
696 "type": "object" 734 "type": "object"
697 }, 735 },
698 "Color": { 736 "Image": {
699 "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 // ...", 737 "description": "Client image to perform Google Cloud Vision API task s over.",
700 "id": "Color", 738 "id": "Image",
701 "properties": { 739 "properties": {
702 "green": { 740 "content": {
703 "description": "The amount of green in the color as a value in the interval [0, 1].", 741 "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.",
704 "format": "float", 742 "format": "byte",
705 "type": "number" 743 "type": "string"
706 }, 744 },
707 "blue": { 745 "source": {
708 "description": "The amount of blue in the color as a value i n the interval [0, 1].", 746 "$ref": "ImageSource",
709 "format": "float", 747 "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."
710 "type": "number"
711 },
712 "red": {
713 "description": "The amount of red in the color as a value in the interval [0, 1].",
714 "format": "float",
715 "type": "number"
716 },
717 "alpha": {
718 "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).",
719 "format": "float",
720 "type": "number"
721 } 748 }
722 }, 749 },
723 "type": "object" 750 "type": "object"
724 }, 751 },
725 "LocationInfo": { 752 "FaceAnnotation": {
726 "description": "Detected entity location information.", 753 "description": "A face annotation object contains the results of fac e detection.",
727 "id": "LocationInfo", 754 "id": "FaceAnnotation",
728 "properties": { 755 "properties": {
729 "latLng": { 756 "blurredLikelihood": {
730 "$ref": "LatLng", 757 "description": "Blurred likelihood.",
731 "description": "lat/long location coordinates."
732 }
733 },
734 "type": "object"
735 },
736 "SafeSearchAnnotation": {
737 "id": "SafeSearchAnnotation",
738 "properties": {
739 "medical": {
740 "description": "Likelihood that this is a medical image.",
741 "enum": [ 758 "enum": [
742 "UNKNOWN", 759 "UNKNOWN",
743 "VERY_UNLIKELY", 760 "VERY_UNLIKELY",
744 "UNLIKELY", 761 "UNLIKELY",
745 "POSSIBLE", 762 "POSSIBLE",
746 "LIKELY", 763 "LIKELY",
747 "VERY_LIKELY" 764 "VERY_LIKELY"
748 ], 765 ],
749 "enumDescriptions": [ 766 "enumDescriptions": [
750 "Unknown likelihood.", 767 "Unknown likelihood.",
751 "It is very unlikely that the image belongs to the speci fied vertical.", 768 "It is very unlikely that the image belongs to the speci fied vertical.",
752 "It is unlikely that the image belongs to the specified vertical.", 769 "It is unlikely that the image belongs to the specified vertical.",
753 "It is possible that the image belongs to the specified vertical.", 770 "It is possible that the image belongs to the specified vertical.",
754 "It is likely that the image belongs to the specified ve rtical.", 771 "It is likely that the image belongs to the specified ve rtical.",
755 "It is very likely that the image belongs to the specifi ed vertical." 772 "It is very likely that the image belongs to the specifi ed vertical."
756 ], 773 ],
757 "type": "string" 774 "type": "string"
758 }, 775 },
759 "spoof": { 776 "headwearLikelihood": {
760 "description": "Spoof likelihood. The likelihood that an mod ification\nwas made to the image's canonical version to make it appear\nfunny or offensive.", 777 "description": "Headwear likelihood.",
761 "enum": [ 778 "enum": [
762 "UNKNOWN", 779 "UNKNOWN",
763 "VERY_UNLIKELY", 780 "VERY_UNLIKELY",
764 "UNLIKELY", 781 "UNLIKELY",
765 "POSSIBLE", 782 "POSSIBLE",
766 "LIKELY", 783 "LIKELY",
767 "VERY_LIKELY" 784 "VERY_LIKELY"
768 ], 785 ],
769 "enumDescriptions": [ 786 "enumDescriptions": [
770 "Unknown likelihood.", 787 "Unknown likelihood.",
771 "It is very unlikely that the image belongs to the speci fied vertical.", 788 "It is very unlikely that the image belongs to the speci fied vertical.",
772 "It is unlikely that the image belongs to the specified vertical.", 789 "It is unlikely that the image belongs to the specified vertical.",
773 "It is possible that the image belongs to the specified vertical.", 790 "It is possible that the image belongs to the specified vertical.",
774 "It is likely that the image belongs to the specified ve rtical.", 791 "It is likely that the image belongs to the specified ve rtical.",
775 "It is very likely that the image belongs to the specifi ed vertical." 792 "It is very likely that the image belongs to the specifi ed vertical."
776 ], 793 ],
777 "type": "string" 794 "type": "string"
778 }, 795 },
779 "violence": { 796 "boundingPoly": {
780 "description": "Violence likelihood.", 797 "$ref": "BoundingPoly",
798 "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."
799 },
800 "rollAngle": {
801 "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].",
802 "format": "float",
803 "type": "number"
804 },
805 "sorrowLikelihood": {
806 "description": "Sorrow likelihood.",
781 "enum": [ 807 "enum": [
782 "UNKNOWN", 808 "UNKNOWN",
783 "VERY_UNLIKELY", 809 "VERY_UNLIKELY",
784 "UNLIKELY", 810 "UNLIKELY",
785 "POSSIBLE", 811 "POSSIBLE",
786 "LIKELY", 812 "LIKELY",
787 "VERY_LIKELY" 813 "VERY_LIKELY"
788 ], 814 ],
789 "enumDescriptions": [ 815 "enumDescriptions": [
790 "Unknown likelihood.", 816 "Unknown likelihood.",
791 "It is very unlikely that the image belongs to the speci fied vertical.", 817 "It is very unlikely that the image belongs to the speci fied vertical.",
792 "It is unlikely that the image belongs to the specified vertical.", 818 "It is unlikely that the image belongs to the specified vertical.",
793 "It is possible that the image belongs to the specified vertical.", 819 "It is possible that the image belongs to the specified vertical.",
794 "It is likely that the image belongs to the specified ve rtical.", 820 "It is likely that the image belongs to the specified ve rtical.",
795 "It is very likely that the image belongs to the specifi ed vertical." 821 "It is very likely that the image belongs to the specifi ed vertical."
796 ], 822 ],
797 "type": "string" 823 "type": "string"
798 }, 824 },
799 "adult": { 825 "tiltAngle": {
800 "description": "Represents the adult content likelihood for the image.", 826 "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].",
827 "format": "float",
828 "type": "number"
829 },
830 "fdBoundingPoly": {
831 "$ref": "BoundingPoly",
832 "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."
833 },
834 "surpriseLikelihood": {
835 "description": "Surprise likelihood.",
801 "enum": [ 836 "enum": [
802 "UNKNOWN", 837 "UNKNOWN",
803 "VERY_UNLIKELY", 838 "VERY_UNLIKELY",
804 "UNLIKELY", 839 "UNLIKELY",
805 "POSSIBLE", 840 "POSSIBLE",
806 "LIKELY", 841 "LIKELY",
807 "VERY_LIKELY" 842 "VERY_LIKELY"
808 ], 843 ],
809 "enumDescriptions": [ 844 "enumDescriptions": [
810 "Unknown likelihood.", 845 "Unknown likelihood.",
811 "It is very unlikely that the image belongs to the speci fied vertical.", 846 "It is very unlikely that the image belongs to the speci fied vertical.",
812 "It is unlikely that the image belongs to the specified vertical.", 847 "It is unlikely that the image belongs to the specified vertical.",
813 "It is possible that the image belongs to the specified vertical.", 848 "It is possible that the image belongs to the specified vertical.",
814 "It is likely that the image belongs to the specified ve rtical.", 849 "It is likely that the image belongs to the specified ve rtical.",
815 "It is very likely that the image belongs to the specifi ed vertical." 850 "It is very likely that the image belongs to the specifi ed vertical."
816 ], 851 ],
817 "type": "string" 852 "type": "string"
818 }
819 },
820 "type": "object"
821 },
822 "Image": {
823 "description": "Client image to perform Google Cloud Vision API task s over.",
824 "id": "Image",
825 "properties": {
826 "source": {
827 "$ref": "ImageSource",
828 "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."
829 }, 853 },
830 "content": { 854 "landmarks": {
831 "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.", 855 "description": "Detected face landmarks.",
832 "format": "byte",
833 "type": "string"
834 }
835 },
836 "type": "object"
837 },
838 "DominantColorsAnnotation": {
839 "description": "Set of dominant colors and their corresponding score s.",
840 "id": "DominantColorsAnnotation",
841 "properties": {
842 "colors": {
843 "description": "RGB color values with their score and pixel fraction.",
844 "items": { 856 "items": {
845 "$ref": "ColorInfo" 857 "$ref": "Landmark"
846 }, 858 },
847 "type": "array" 859 "type": "array"
848 } 860 },
849 }, 861 "angerLikelihood": {
850 "type": "object" 862 "description": "Anger likelihood.",
851 },
852 "Feature": {
853 "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.",
854 "id": "Feature",
855 "properties": {
856 "type": {
857 "description": "The feature type.",
858 "enum": [ 863 "enum": [
859 "TYPE_UNSPECIFIED", 864 "UNKNOWN",
860 "FACE_DETECTION", 865 "VERY_UNLIKELY",
861 "LANDMARK_DETECTION", 866 "UNLIKELY",
862 "LOGO_DETECTION", 867 "POSSIBLE",
863 "LABEL_DETECTION", 868 "LIKELY",
864 "TEXT_DETECTION", 869 "VERY_LIKELY"
865 "SAFE_SEARCH_DETECTION",
866 "IMAGE_PROPERTIES"
867 ], 870 ],
868 "enumDescriptions": [ 871 "enumDescriptions": [
869 "Unspecified feature type.", 872 "Unknown likelihood.",
870 "Run face detection.", 873 "It is very unlikely that the image belongs to the speci fied vertical.",
871 "Run landmark detection.", 874 "It is unlikely that the image belongs to the specified vertical.",
872 "Run logo detection.", 875 "It is possible that the image belongs to the specified vertical.",
873 "Run label detection.", 876 "It is likely that the image belongs to the specified ve rtical.",
874 "Run OCR.", 877 "It is very likely that the image belongs to the specifi ed vertical."
875 "Run computer vision models to compute image safe-search properties.",
876 "Compute a set of image properties, such as the image's dominant colors."
877 ], 878 ],
878 "type": "string" 879 "type": "string"
879 }, 880 },
880 "maxResults": { 881 "joyLikelihood": {
881 "description": "Maximum number of results of this type.", 882 "description": "Joy likelihood.",
882 "format": "int32", 883 "enum": [
883 "type": "integer" 884 "UNKNOWN",
884 } 885 "VERY_UNLIKELY",
885 }, 886 "UNLIKELY",
886 "type": "object" 887 "POSSIBLE",
887 }, 888 "LIKELY",
888 "BatchAnnotateImagesResponse": { 889 "VERY_LIKELY"
889 "description": "Response to a batch image annotation request.", 890 ],
890 "id": "BatchAnnotateImagesResponse", 891 "enumDescriptions": [
891 "properties": { 892 "Unknown likelihood.",
892 "responses": { 893 "It is very unlikely that the image belongs to the speci fied vertical.",
893 "description": "Individual responses to image annotation req uests within the batch.", 894 "It is unlikely that the image belongs to the specified vertical.",
894 "items": { 895 "It is possible that the image belongs to the specified vertical.",
895 "$ref": "AnnotateImageResponse" 896 "It is likely that the image belongs to the specified ve rtical.",
896 }, 897 "It is very likely that the image belongs to the specifi ed vertical."
897 "type": "array" 898 ],
898 } 899 "type": "string"
899 }, 900 },
900 "type": "object" 901 "landmarkingConfidence": {
901 }, 902 "description": "Face landmarking confidence. Range [0, 1].",
902 "ImageProperties": { 903 "format": "float",
903 "description": "Stores image properties, such as dominant colors.",
904 "id": "ImageProperties",
905 "properties": {
906 "dominantColors": {
907 "$ref": "DominantColorsAnnotation",
908 "description": "If present, dominant colors completed succes sfully."
909 }
910 },
911 "type": "object"
912 },
913 "LatLng": {
914 "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)\n\nThe code in logs/storage/validator/logs_validato r_traits.cc treats this type\nas if it were annotated as ST_LOCATION.",
915 "id": "LatLng",
916 "properties": {
917 "latitude": {
918 "description": "The latitude in degrees. It must be in the r ange [-90.0, +90.0].",
919 "format": "double",
920 "type": "number" 904 "type": "number"
921 }, 905 },
922 "longitude": { 906 "underExposedLikelihood": {
923 "description": "The longitude in degrees. It must be in the range [-180.0, +180.0].", 907 "description": "Under-exposed likelihood.",
924 "format": "double", 908 "enum": [
909 "UNKNOWN",
910 "VERY_UNLIKELY",
911 "UNLIKELY",
912 "POSSIBLE",
913 "LIKELY",
914 "VERY_LIKELY"
915 ],
916 "enumDescriptions": [
917 "Unknown likelihood.",
918 "It is very unlikely that the image belongs to the speci fied vertical.",
919 "It is unlikely that the image belongs to the specified vertical.",
920 "It is possible that the image belongs to the specified vertical.",
921 "It is likely that the image belongs to the specified ve rtical.",
922 "It is very likely that the image belongs to the specifi ed vertical."
923 ],
924 "type": "string"
925 },
926 "panAngle": {
927 "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].",
928 "format": "float",
929 "type": "number"
930 },
931 "detectionConfidence": {
932 "description": "Detection confidence. Range [0, 1].",
933 "format": "float",
925 "type": "number" 934 "type": "number"
926 } 935 }
927 }, 936 },
928 "type": "object" 937 "type": "object"
929 }, 938 },
930 "Position": { 939 "BatchAnnotateImagesRequest": {
931 "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.", 940 "description": "Multiple image annotation requests are batched into a single service call.",
932 "id": "Position", 941 "id": "BatchAnnotateImagesRequest",
933 "properties": { 942 "properties": {
934 "y": { 943 "requests": {
935 "description": "Y coordinate.", 944 "description": "Individual image annotation requests for thi s batch.",
936 "format": "float", 945 "items": {
937 "type": "number" 946 "$ref": "AnnotateImageRequest"
938 }, 947 },
939 "x": { 948 "type": "array"
940 "description": "X coordinate.",
941 "format": "float",
942 "type": "number"
943 },
944 "z": {
945 "description": "Z coordinate (or depth).",
946 "format": "float",
947 "type": "number"
948 } 949 }
949 }, 950 },
950 "type": "object" 951 "type": "object"
951 } 952 }
952 }, 953 },
953 "servicePath": "", 954 "servicePath": "",
954 "title": "Google Cloud Vision API", 955 "title": "Google Cloud Vision API",
955 "version": "v1" 956 "version": "v1"
956 } 957 }
OLDNEW
« no previous file with comments | « discovery/googleapis/storage__v1.json ('k') | discovery/googleapis/webmasters__v3.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698