blob: 0fac1b481db072baa9f5c57bf2afaca6bc822284 [file] [log] [blame]
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070075<h1><a href="vision_v1.html">Cloud Vision API</a> . <a href="vision_v1.images.html">images</a></h1>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070076<h2>Instance Methods</h2>
77<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070078 <code><a href="#annotate">annotate(body=None, x__xgafv=None)</a></code></p>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070079<p class="firstline">Run image detection and annotation for a batch of images.</p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070080<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070081 <code><a href="#asyncBatchAnnotate">asyncBatchAnnotate(body=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070082<p class="firstline">Run asynchronous image detection and annotation for a list of images.</p>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070083<h3>Method Details</h3>
84<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -070085 <code class="details" id="annotate">annotate(body=None, x__xgafv=None)</code>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070086 <pre>Run image detection and annotation for a batch of images.
87
88Args:
Dan O'Mearadd494642020-05-01 07:42:23 -070089 body: object, The request body.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070090 The object takes the form of:
91
92{ # Multiple image annotation requests are batched into a single service call.
Bu Sun Kim65020912020-05-20 12:08:20 -070093 &quot;parent&quot;: &quot;A String&quot;, # Optional. Target project and location to make a call.
94 #
95 # Format: `projects/{project-id}/locations/{location-id}`.
96 #
97 # If no parent is specified, a region will be chosen automatically.
98 #
99 # Supported location-ids:
100 # `us`: USA country only,
101 # `asia`: East asia areas, like Japan, Taiwan,
102 # `eu`: The European Union.
103 #
104 # Example: `projects/project-A/locations/eu`.
105 &quot;requests&quot;: [ # Required. Individual image annotation requests for this batch.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700106 { # Request for performing Google Cloud Vision API tasks over a user-provided
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700107 # image, with user-requested features, and with context information.
Bu Sun Kim65020912020-05-20 12:08:20 -0700108 &quot;image&quot;: { # Client image to perform Google Cloud Vision API tasks over. # The image to be processed.
109 &quot;content&quot;: &quot;A String&quot;, # Image content, represented as a stream of bytes.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700110 # Note: As with all `bytes` fields, protobuffers use a pure binary
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700111 # representation, whereas JSON representations use base64.
Bu Sun Kim65020912020-05-20 12:08:20 -0700112 &quot;source&quot;: { # External image source (Google Cloud Storage or web URL image location). # Google Cloud Storage image location, or publicly-accessible image
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700113 # URL. If both `content` and `source` are provided for an image, `content`
114 # takes precedence and is used to perform the image annotation request.
Bu Sun Kim65020912020-05-20 12:08:20 -0700115 &quot;gcsImageUri&quot;: &quot;A String&quot;, # **Use `image_uri` instead.**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700116 #
117 # The Google Cloud Storage URI of the form
118 # `gs://bucket_name/object_name`. Object versioning is not supported. See
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400119 # [Google Cloud Storage Request
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700120 # URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.
Bu Sun Kim65020912020-05-20 12:08:20 -0700121 &quot;imageUri&quot;: &quot;A String&quot;, # The URI of the source image. Can be either:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700122 #
123 # 1. A Google Cloud Storage URI of the form
124 # `gs://bucket_name/object_name`. Object versioning is not supported. See
125 # [Google Cloud Storage Request
126 # URIs](https://cloud.google.com/storage/docs/reference-uris) for more
127 # info.
128 #
129 # 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from
130 # HTTP/HTTPS URLs, Google cannot guarantee that the request will be
131 # completed. Your request may fail if the specified host denies the
132 # request (e.g. due to request throttling or DOS prevention), or if Google
133 # throttles requests to the site for abuse prevention. You should not
134 # depend on externally-hosted images for production applications.
135 #
136 # When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400137 # precedence.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700138 },
139 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700140 &quot;features&quot;: [ # Requested features.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700141 { # The type of Google Cloud Vision API detection to perform, and the maximum
142 # number of results to return for that type. Multiple `Feature` objects can
143 # be specified in the `features` list.
Bu Sun Kim65020912020-05-20 12:08:20 -0700144 &quot;model&quot;: &quot;A String&quot;, # Model to use for the feature.
145 # Supported values: &quot;builtin/stable&quot; (the default if unset) and
146 # &quot;builtin/latest&quot;.
147 &quot;type&quot;: &quot;A String&quot;, # The feature type.
148 &quot;maxResults&quot;: 42, # Maximum number of results of this type. Does not apply to
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700149 # `TEXT_DETECTION`, `DOCUMENT_TEXT_DETECTION`, or `CROP_HINTS`.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700150 },
151 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700152 &quot;imageContext&quot;: { # Image context and/or feature-specific parameters. # Additional context that may accompany the image.
153 &quot;languageHints&quot;: [ # List of languages to use for TEXT_DETECTION. In most cases, an empty value
154 # yields the best results since it enables automatic language detection. For
155 # languages based on the Latin alphabet, setting `language_hints` is not
156 # needed. In rare cases, when the language of the text in the image is known,
157 # setting a hint will help get better results (although it will be a
158 # significant hindrance if the hint is wrong). Text detection returns an
159 # error if one or more of the specified languages is not one of the
160 # [supported languages](https://cloud.google.com/vision/docs/languages).
161 &quot;A String&quot;,
162 ],
163 &quot;webDetectionParams&quot;: { # Parameters for web detection request. # Parameters for web detection.
164 &quot;includeGeoResults&quot;: True or False, # Whether to include results derived from the geo information in the image.
165 },
166 &quot;latLongRect&quot;: { # Rectangle determined by min and max `LatLng` pairs. # Not used.
167 &quot;maxLatLng&quot;: { # An object representing a latitude/longitude pair. This is expressed as a pair # Max lat/long pair.
168 # of doubles representing degrees latitude and degrees longitude. Unless
169 # specified otherwise, this must conform to the
170 # &lt;a href=&quot;http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf&quot;&gt;WGS84
171 # standard&lt;/a&gt;. Values must be within normalized ranges.
172 &quot;latitude&quot;: 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
173 &quot;longitude&quot;: 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
174 },
175 &quot;minLatLng&quot;: { # An object representing a latitude/longitude pair. This is expressed as a pair # Min lat/long pair.
176 # of doubles representing degrees latitude and degrees longitude. Unless
177 # specified otherwise, this must conform to the
178 # &lt;a href=&quot;http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf&quot;&gt;WGS84
179 # standard&lt;/a&gt;. Values must be within normalized ranges.
180 &quot;latitude&quot;: 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
181 &quot;longitude&quot;: 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
182 },
183 },
184 &quot;cropHintsParams&quot;: { # Parameters for crop hints annotation request. # Parameters for crop hints annotation request.
185 &quot;aspectRatios&quot;: [ # Aspect ratios in floats, representing the ratio of the width to the height
186 # of the image. For example, if the desired aspect ratio is 4/3, the
187 # corresponding float value should be 1.33333. If not specified, the
188 # best possible crop is returned. The number of provided aspect ratios is
189 # limited to a maximum of 16; any aspect ratios provided after the 16th are
190 # ignored.
191 3.14,
192 ],
193 },
194 &quot;productSearchParams&quot;: { # Parameters for a product search request. # Parameters for product search.
195 &quot;productCategories&quot;: [ # The list of product categories to search in. Currently, we only consider
196 # the first category, and either &quot;homegoods-v2&quot;, &quot;apparel-v2&quot;, &quot;toys-v2&quot;,
197 # &quot;packagedgoods-v1&quot;, or &quot;general-v1&quot; should be specified. The legacy
198 # categories &quot;homegoods&quot;, &quot;apparel&quot;, and &quot;toys&quot; are still supported but will
199 # be deprecated. For new products, please use &quot;homegoods-v2&quot;, &quot;apparel-v2&quot;,
200 # or &quot;toys-v2&quot; for better product search accuracy. It is recommended to
201 # migrate existing products to these categories as well.
202 &quot;A String&quot;,
203 ],
204 &quot;filter&quot;: &quot;A String&quot;, # The filtering expression. This can be used to restrict search results based
205 # on Product labels. We currently support an AND of OR of key-value
206 # expressions, where each expression within an OR must have the same key. An
207 # &#x27;=&#x27; should be used to connect the key and value.
208 #
209 # For example, &quot;(color = red OR color = blue) AND brand = Google&quot; is
210 # acceptable, but &quot;(color = red OR brand = Google)&quot; is not acceptable.
211 # &quot;color: red&quot; is not acceptable because it uses a &#x27;:&#x27; instead of an &#x27;=&#x27;.
212 &quot;productSet&quot;: &quot;A String&quot;, # The resource name of a ProductSet to be searched for similar images.
213 #
214 # Format is:
215 # `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
216 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon around the area of interest in the image.
217 # If it is not specified, system discretion will be applied.
218 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
219 { # A vertex represents a 2D point in the image.
220 # NOTE: the normalized vertex coordinates are relative to the original image
221 # and range from 0 to 1.
222 &quot;y&quot;: 3.14, # Y coordinate.
223 &quot;x&quot;: 3.14, # X coordinate.
224 },
225 ],
226 &quot;vertices&quot;: [ # The bounding polygon vertices.
227 { # A vertex represents a 2D point in the image.
228 # NOTE: the vertex coordinates are in the same scale as the original image.
229 &quot;y&quot;: 42, # Y coordinate.
230 &quot;x&quot;: 42, # X coordinate.
231 },
232 ],
233 },
234 },
235 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700236 },
237 ],
238 }
239
240 x__xgafv: string, V1 error format.
241 Allowed values
242 1 - v1 error format
243 2 - v2 error format
244
245Returns:
246 An object of the form:
247
248 { # Response to a batch image annotation request.
Bu Sun Kim65020912020-05-20 12:08:20 -0700249 &quot;responses&quot;: [ # Individual responses to image annotation requests within the batch.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700250 { # Response to an image annotation request.
Bu Sun Kim65020912020-05-20 12:08:20 -0700251 &quot;faceAnnotations&quot;: [ # If present, face detection has completed successfully.
252 { # A face annotation object contains the results of face detection.
253 &quot;tiltAngle&quot;: 3.14, # Pitch angle, which indicates the upwards/downwards angle that the face is
254 # pointing relative to the image&#x27;s horizontal plane. Range [-180,180].
255 &quot;fdBoundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The `fd_bounding_poly` bounding polygon is tighter than the
256 # `boundingPoly`, and encloses only the skin part of the face. Typically, it
257 # is used to eliminate the face from any image analysis that detects the
258 # &quot;amount of skin&quot; visible in an image. It is not based on the
259 # landmarker results, only on the initial face detection, hence
260 # the &lt;code&gt;fd&lt;/code&gt; (face detection) prefix.
261 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
262 { # A vertex represents a 2D point in the image.
263 # NOTE: the normalized vertex coordinates are relative to the original image
264 # and range from 0 to 1.
265 &quot;y&quot;: 3.14, # Y coordinate.
266 &quot;x&quot;: 3.14, # X coordinate.
267 },
268 ],
269 &quot;vertices&quot;: [ # The bounding polygon vertices.
270 { # A vertex represents a 2D point in the image.
271 # NOTE: the vertex coordinates are in the same scale as the original image.
272 &quot;y&quot;: 42, # Y coordinate.
273 &quot;x&quot;: 42, # X coordinate.
274 },
275 ],
276 },
277 &quot;angerLikelihood&quot;: &quot;A String&quot;, # Anger likelihood.
278 &quot;landmarks&quot;: [ # Detected face landmarks.
279 { # A face-specific landmark (for example, a face feature).
280 &quot;position&quot;: { # A 3D position in the image, used primarily for Face detection landmarks. # Face landmark position.
281 # A valid Position must have both x and y coordinates.
282 # The position coordinates are in the same scale as the original image.
283 &quot;y&quot;: 3.14, # Y coordinate.
284 &quot;x&quot;: 3.14, # X coordinate.
285 &quot;z&quot;: 3.14, # Z coordinate (or depth).
286 },
287 &quot;type&quot;: &quot;A String&quot;, # Face landmark type.
288 },
289 ],
290 &quot;surpriseLikelihood&quot;: &quot;A String&quot;, # Surprise likelihood.
291 &quot;landmarkingConfidence&quot;: 3.14, # Face landmarking confidence. Range [0, 1].
292 &quot;joyLikelihood&quot;: &quot;A String&quot;, # Joy likelihood.
293 &quot;underExposedLikelihood&quot;: &quot;A String&quot;, # Under-exposed likelihood.
294 &quot;panAngle&quot;: 3.14, # Yaw angle, which indicates the leftward/rightward angle that the face is
295 # pointing relative to the vertical plane perpendicular to the image. Range
296 # [-180,180].
297 &quot;detectionConfidence&quot;: 3.14, # Detection confidence. Range [0, 1].
298 &quot;blurredLikelihood&quot;: &quot;A String&quot;, # Blurred likelihood.
299 &quot;headwearLikelihood&quot;: &quot;A String&quot;, # Headwear likelihood.
300 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon around the face. The coordinates of the bounding box
301 # are in the original image&#x27;s scale.
302 # The bounding box is computed to &quot;frame&quot; the face in accordance with human
303 # expectations. It is based on the landmarker results.
304 # Note that one or more x and/or y coordinates may not be generated in the
305 # `BoundingPoly` (the polygon will be unbounded) if only a partial face
306 # appears in the image to be annotated.
307 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
308 { # A vertex represents a 2D point in the image.
309 # NOTE: the normalized vertex coordinates are relative to the original image
310 # and range from 0 to 1.
311 &quot;y&quot;: 3.14, # Y coordinate.
312 &quot;x&quot;: 3.14, # X coordinate.
313 },
314 ],
315 &quot;vertices&quot;: [ # The bounding polygon vertices.
316 { # A vertex represents a 2D point in the image.
317 # NOTE: the vertex coordinates are in the same scale as the original image.
318 &quot;y&quot;: 42, # Y coordinate.
319 &quot;x&quot;: 42, # X coordinate.
320 },
321 ],
322 },
323 &quot;rollAngle&quot;: 3.14, # Roll angle, which indicates the amount of clockwise/anti-clockwise rotation
324 # of the face relative to the image vertical about the axis perpendicular to
325 # the face. Range [-180,180].
326 &quot;sorrowLikelihood&quot;: &quot;A String&quot;, # Sorrow likelihood.
327 },
328 ],
329 &quot;cropHintsAnnotation&quot;: { # Set of crop hints that are used to generate new crops when serving images. # If present, crop hints have completed successfully.
330 &quot;cropHints&quot;: [ # Crop hint results.
331 { # Single crop hint that is used to generate a new crop when serving an image.
332 &quot;confidence&quot;: 3.14, # Confidence of this being a salient region. Range [0, 1].
333 &quot;importanceFraction&quot;: 3.14, # Fraction of importance of this salient region with respect to the original
334 # image.
335 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon for the crop region. The coordinates of the bounding
336 # box are in the original image&#x27;s scale.
337 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
338 { # A vertex represents a 2D point in the image.
339 # NOTE: the normalized vertex coordinates are relative to the original image
340 # and range from 0 to 1.
341 &quot;y&quot;: 3.14, # Y coordinate.
342 &quot;x&quot;: 3.14, # X coordinate.
343 },
344 ],
345 &quot;vertices&quot;: [ # The bounding polygon vertices.
346 { # A vertex represents a 2D point in the image.
347 # NOTE: the vertex coordinates are in the same scale as the original image.
348 &quot;y&quot;: 42, # Y coordinate.
349 &quot;x&quot;: 42, # X coordinate.
350 },
351 ],
352 },
353 },
354 ],
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700355 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700356 &quot;labelAnnotations&quot;: [ # If present, label detection has completed successfully.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700357 { # Set of detected entity features.
Bu Sun Kim65020912020-05-20 12:08:20 -0700358 &quot;score&quot;: 3.14, # Overall score of the result. Range [0, 1].
359 &quot;locations&quot;: [ # The location information for the detected entity. Multiple
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800360 # `LocationInfo` elements can be present because one location may
361 # indicate the location of the scene in the image, and another location
362 # may indicate the location of the place where the image was taken.
363 # Location information is usually present for landmarks.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700364 { # Detected entity location information.
Bu Sun Kim65020912020-05-20 12:08:20 -0700365 &quot;latLng&quot;: { # An object representing a latitude/longitude pair. This is expressed as a pair # lat/long location coordinates.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700366 # of doubles representing degrees latitude and degrees longitude. Unless
367 # specified otherwise, this must conform to the
Bu Sun Kim65020912020-05-20 12:08:20 -0700368 # &lt;a href=&quot;http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf&quot;&gt;WGS84
Dan O'Mearadd494642020-05-01 07:42:23 -0700369 # standard&lt;/a&gt;. Values must be within normalized ranges.
Bu Sun Kim65020912020-05-20 12:08:20 -0700370 &quot;latitude&quot;: 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
371 &quot;longitude&quot;: 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700372 },
373 },
374 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700375 &quot;mid&quot;: &quot;A String&quot;, # Opaque entity ID. Some IDs may be available in
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700376 # [Google Knowledge Graph Search
377 # API](https://developers.google.com/knowledge-graph/).
Bu Sun Kim65020912020-05-20 12:08:20 -0700378 &quot;confidence&quot;: 3.14, # **Deprecated. Use `score` instead.**
379 # The accuracy of the entity detection in an image.
380 # For example, for an image in which the &quot;Eiffel Tower&quot; entity is detected,
381 # this field represents the confidence that there is a tower in the query
382 # image. Range [0, 1].
383 &quot;locale&quot;: &quot;A String&quot;, # The language code for the locale in which the entity textual
384 # `description` is expressed.
385 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # Image region to which this entity belongs. Not produced
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700386 # for `LABEL_DETECTION` features.
Bu Sun Kim65020912020-05-20 12:08:20 -0700387 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700388 { # A vertex represents a 2D point in the image.
389 # NOTE: the normalized vertex coordinates are relative to the original image
390 # and range from 0 to 1.
Bu Sun Kim65020912020-05-20 12:08:20 -0700391 &quot;y&quot;: 3.14, # Y coordinate.
392 &quot;x&quot;: 3.14, # X coordinate.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700393 },
394 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700395 &quot;vertices&quot;: [ # The bounding polygon vertices.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700396 { # A vertex represents a 2D point in the image.
397 # NOTE: the vertex coordinates are in the same scale as the original image.
Bu Sun Kim65020912020-05-20 12:08:20 -0700398 &quot;y&quot;: 42, # Y coordinate.
399 &quot;x&quot;: 42, # X coordinate.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700400 },
401 ],
402 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700403 &quot;description&quot;: &quot;A String&quot;, # Entity textual description, expressed in its `locale` language.
404 &quot;topicality&quot;: 3.14, # The relevancy of the ICA (Image Content Annotation) label to the
405 # image. For example, the relevancy of &quot;tower&quot; is likely higher to an image
406 # containing the detected &quot;Eiffel Tower&quot; than to an image containing a
407 # detected distant towering building, even though the confidence that
408 # there is a tower in each image may be the same. Range [0, 1].
409 &quot;properties&quot;: [ # Some entities may have optional user-supplied `Property` (name/value)
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800410 # fields, such a score or string that qualifies the entity.
411 { # A `Property` consists of a user-supplied name/value pair.
Bu Sun Kim65020912020-05-20 12:08:20 -0700412 &quot;value&quot;: &quot;A String&quot;, # Value of the property.
413 &quot;uint64Value&quot;: &quot;A String&quot;, # Value of numeric properties.
414 &quot;name&quot;: &quot;A String&quot;, # Name of the property.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700415 },
416 ],
417 },
418 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700419 &quot;productSearchResults&quot;: { # Results for a product search request. # If present, product search has completed successfully.
420 &quot;indexTime&quot;: &quot;A String&quot;, # Timestamp of the index which provided these results. Products added to the
421 # product set and products removed from the product set after this time are
422 # not reflected in the current results.
423 &quot;productGroupedResults&quot;: [ # List of results grouped by products detected in the query image. Each entry
424 # corresponds to one bounding polygon in the query image, and contains the
425 # matching products specific to that region. There may be duplicate product
426 # matches in the union of all the per-product results.
427 { # Information about the products similar to a single product in a query
428 # image.
429 &quot;objectAnnotations&quot;: [ # List of generic predictions for the object in the bounding box.
430 { # Prediction for what the object in the bounding box is.
431 &quot;name&quot;: &quot;A String&quot;, # Object name, expressed in its `language_code` language.
432 &quot;score&quot;: 3.14, # Score of the result. Range [0, 1].
433 &quot;languageCode&quot;: &quot;A String&quot;, # The BCP-47 language code, such as &quot;en-US&quot; or &quot;sr-Latn&quot;. For more
434 # information, see
435 # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
436 &quot;mid&quot;: &quot;A String&quot;, # Object ID that should align with EntityAnnotation mid.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700437 },
438 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700439 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon around the product detected in the query image.
440 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
441 { # A vertex represents a 2D point in the image.
442 # NOTE: the normalized vertex coordinates are relative to the original image
443 # and range from 0 to 1.
444 &quot;y&quot;: 3.14, # Y coordinate.
445 &quot;x&quot;: 3.14, # X coordinate.
446 },
447 ],
448 &quot;vertices&quot;: [ # The bounding polygon vertices.
449 { # A vertex represents a 2D point in the image.
450 # NOTE: the vertex coordinates are in the same scale as the original image.
451 &quot;y&quot;: 42, # Y coordinate.
452 &quot;x&quot;: 42, # X coordinate.
453 },
454 ],
455 },
456 &quot;results&quot;: [ # List of results, one for each product match.
457 { # Information about a product.
458 &quot;image&quot;: &quot;A String&quot;, # The resource name of the image from the product that is the closest match
459 # to the query.
460 &quot;product&quot;: { # A Product contains ReferenceImages. # The Product.
461 &quot;name&quot;: &quot;A String&quot;, # The resource name of the product.
462 #
463 # Format is:
464 # `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
465 #
466 # This field is ignored when creating a product.
467 &quot;displayName&quot;: &quot;A String&quot;, # The user-provided name for this Product. Must not be empty. Must be at most
468 # 4096 characters long.
469 &quot;description&quot;: &quot;A String&quot;, # User-provided metadata to be stored with this product. Must be at most 4096
470 # characters long.
471 &quot;productCategory&quot;: &quot;A String&quot;, # Immutable. The category for the product identified by the reference image. This should
472 # be either &quot;homegoods-v2&quot;, &quot;apparel-v2&quot;, or &quot;toys-v2&quot;. The legacy categories
473 # &quot;homegoods&quot;, &quot;apparel&quot;, and &quot;toys&quot; are still supported, but these should
474 # not be used for new products.
475 &quot;productLabels&quot;: [ # Key-value pairs that can be attached to a product. At query time,
476 # constraints can be specified based on the product_labels.
477 #
478 # Note that integer values can be provided as strings, e.g. &quot;1199&quot;. Only
479 # strings with integer values can match a range-based restriction which is
480 # to be supported soon.
481 #
482 # Multiple values can be assigned to the same key. One product may have up to
483 # 500 product_labels.
484 #
485 # Notice that the total number of distinct product_labels over all products
486 # in one ProductSet cannot exceed 1M, otherwise the product search pipeline
487 # will refuse to work for that ProductSet.
488 { # A product label represented as a key-value pair.
489 &quot;value&quot;: &quot;A String&quot;, # The value of the label attached to the product. Cannot be empty and
490 # cannot exceed 128 bytes.
491 &quot;key&quot;: &quot;A String&quot;, # The key of the label attached to the product. Cannot be empty and cannot
492 # exceed 128 bytes.
493 },
494 ],
495 },
496 &quot;score&quot;: 3.14, # A confidence level on the match, ranging from 0 (no confidence) to
497 # 1 (full confidence).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700498 },
499 ],
500 },
501 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700502 &quot;results&quot;: [ # List of results, one for each product match.
503 { # Information about a product.
504 &quot;image&quot;: &quot;A String&quot;, # The resource name of the image from the product that is the closest match
505 # to the query.
506 &quot;product&quot;: { # A Product contains ReferenceImages. # The Product.
507 &quot;name&quot;: &quot;A String&quot;, # The resource name of the product.
508 #
509 # Format is:
510 # `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
511 #
512 # This field is ignored when creating a product.
513 &quot;displayName&quot;: &quot;A String&quot;, # The user-provided name for this Product. Must not be empty. Must be at most
514 # 4096 characters long.
515 &quot;description&quot;: &quot;A String&quot;, # User-provided metadata to be stored with this product. Must be at most 4096
516 # characters long.
517 &quot;productCategory&quot;: &quot;A String&quot;, # Immutable. The category for the product identified by the reference image. This should
518 # be either &quot;homegoods-v2&quot;, &quot;apparel-v2&quot;, or &quot;toys-v2&quot;. The legacy categories
519 # &quot;homegoods&quot;, &quot;apparel&quot;, and &quot;toys&quot; are still supported, but these should
520 # not be used for new products.
521 &quot;productLabels&quot;: [ # Key-value pairs that can be attached to a product. At query time,
522 # constraints can be specified based on the product_labels.
523 #
524 # Note that integer values can be provided as strings, e.g. &quot;1199&quot;. Only
525 # strings with integer values can match a range-based restriction which is
526 # to be supported soon.
527 #
528 # Multiple values can be assigned to the same key. One product may have up to
529 # 500 product_labels.
530 #
531 # Notice that the total number of distinct product_labels over all products
532 # in one ProductSet cannot exceed 1M, otherwise the product search pipeline
533 # will refuse to work for that ProductSet.
534 { # A product label represented as a key-value pair.
535 &quot;value&quot;: &quot;A String&quot;, # The value of the label attached to the product. Cannot be empty and
536 # cannot exceed 128 bytes.
537 &quot;key&quot;: &quot;A String&quot;, # The key of the label attached to the product. Cannot be empty and cannot
538 # exceed 128 bytes.
539 },
540 ],
541 },
542 &quot;score&quot;: 3.14, # A confidence level on the match, ranging from 0 (no confidence) to
543 # 1 (full confidence).
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400544 },
545 ],
546 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700547 &quot;localizedObjectAnnotations&quot;: [ # If present, localized object detection has completed successfully.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700548 # This will be sorted descending by confidence score.
549 { # Set of detected objects with bounding boxes.
Bu Sun Kim65020912020-05-20 12:08:20 -0700550 &quot;name&quot;: &quot;A String&quot;, # Object name, expressed in its `language_code` language.
551 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # Image region to which this object belongs. This must be populated.
552 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700553 { # A vertex represents a 2D point in the image.
554 # NOTE: the normalized vertex coordinates are relative to the original image
555 # and range from 0 to 1.
Bu Sun Kim65020912020-05-20 12:08:20 -0700556 &quot;y&quot;: 3.14, # Y coordinate.
557 &quot;x&quot;: 3.14, # X coordinate.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700558 },
559 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700560 &quot;vertices&quot;: [ # The bounding polygon vertices.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700561 { # A vertex represents a 2D point in the image.
562 # NOTE: the vertex coordinates are in the same scale as the original image.
Bu Sun Kim65020912020-05-20 12:08:20 -0700563 &quot;y&quot;: 42, # Y coordinate.
564 &quot;x&quot;: 42, # X coordinate.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700565 },
566 ],
567 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700568 &quot;score&quot;: 3.14, # Score of the result. Range [0, 1].
569 &quot;languageCode&quot;: &quot;A String&quot;, # The BCP-47 language code, such as &quot;en-US&quot; or &quot;sr-Latn&quot;. For more
570 # information, see
571 # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
572 &quot;mid&quot;: &quot;A String&quot;, # Object ID that should align with EntityAnnotation mid.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700573 },
574 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700575 &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for # If set, represents the error message for the operation.
576 # Note that filled-in image annotations are guaranteed to be
577 # correct, even when `error` is set.
578 # different programming environments, including REST APIs and RPC APIs. It is
579 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
580 # three pieces of data: error code, error message, and error details.
581 #
582 # You can find out more about this error model and how to work with it in the
583 # [API Design Guide](https://cloud.google.com/apis/design/errors).
584 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
585 # message types for APIs to use.
586 {
587 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
588 },
589 ],
590 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
591 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
592 # user-facing error message should be localized and sent in the
593 # google.rpc.Status.details field, or localized by the client.
594 },
595 &quot;fullTextAnnotation&quot;: { # TextAnnotation contains a structured representation of OCR extracted text. # If present, text (OCR) detection or document (OCR) text detection has
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400596 # completed successfully.
597 # This annotation provides the structural hierarchy for the OCR detected
598 # text.
599 # The hierarchy of an OCR extracted text structure is like this:
Dan O'Mearadd494642020-05-01 07:42:23 -0700600 # TextAnnotation -&gt; Page -&gt; Block -&gt; Paragraph -&gt; Word -&gt; Symbol
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400601 # Each structural component, starting from Page, may further have their own
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700602 # properties. Properties describe detected languages, breaks etc.. Please refer
603 # to the TextAnnotation.TextProperty message definition below for more
604 # detail.
Bu Sun Kim65020912020-05-20 12:08:20 -0700605 &quot;pages&quot;: [ # List of pages detected by OCR.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400606 { # Detected page from OCR.
Bu Sun Kim65020912020-05-20 12:08:20 -0700607 &quot;height&quot;: 42, # Page height. For PDFs the unit is points. For images (including
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700608 # TIFFs) the unit is pixels.
Bu Sun Kim65020912020-05-20 12:08:20 -0700609 &quot;width&quot;: 42, # Page width. For PDFs the unit is points. For images (including
610 # TIFFs) the unit is pixels.
611 &quot;blocks&quot;: [ # List of blocks of text, images etc on this page.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400612 { # Logical element on the page.
Bu Sun Kim65020912020-05-20 12:08:20 -0700613 &quot;property&quot;: { # Additional information detected on the structural component. # Additional information detected for the block.
614 &quot;detectedLanguages&quot;: [ # A list of detected languages together with confidence.
615 { # Detected language for a structural component.
616 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range [0, 1].
617 &quot;languageCode&quot;: &quot;A String&quot;, # The BCP-47 language code, such as &quot;en-US&quot; or &quot;sr-Latn&quot;. For more
618 # information, see
619 # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
620 },
621 ],
622 &quot;detectedBreak&quot;: { # Detected start or end of a structural component. # Detected start or end of a text segment.
623 &quot;type&quot;: &quot;A String&quot;, # Detected break type.
624 &quot;isPrefix&quot;: True or False, # True if break prepends the element.
625 },
626 },
627 &quot;blockType&quot;: &quot;A String&quot;, # Detected block type (text, image etc) for this block.
628 &quot;boundingBox&quot;: { # A bounding polygon for the detected image annotation. # The bounding box for the block.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400629 # The vertices are in the order of top-left, top-right, bottom-right,
630 # bottom-left. When a rotation of the bounding box is detected the rotation
631 # is represented as around the top-left corner as defined when the text is
Bu Sun Kim65020912020-05-20 12:08:20 -0700632 # read in the &#x27;natural&#x27; orientation.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400633 # For example:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700634 #
635 # * when the text is horizontal it might look like:
636 #
637 # 0----1
638 # | |
639 # 3----2
640 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700641 # * when it&#x27;s rotated 180 degrees around the top-left corner it becomes:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700642 #
643 # 2----3
644 # | |
645 # 1----0
646 #
647 # and the vertex order will still be (0, 1, 2, 3).
Bu Sun Kim65020912020-05-20 12:08:20 -0700648 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700649 { # A vertex represents a 2D point in the image.
650 # NOTE: the normalized vertex coordinates are relative to the original image
651 # and range from 0 to 1.
Bu Sun Kim65020912020-05-20 12:08:20 -0700652 &quot;y&quot;: 3.14, # Y coordinate.
653 &quot;x&quot;: 3.14, # X coordinate.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700654 },
655 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700656 &quot;vertices&quot;: [ # The bounding polygon vertices.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400657 { # A vertex represents a 2D point in the image.
658 # NOTE: the vertex coordinates are in the same scale as the original image.
Bu Sun Kim65020912020-05-20 12:08:20 -0700659 &quot;y&quot;: 42, # Y coordinate.
660 &quot;x&quot;: 42, # X coordinate.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400661 },
662 ],
663 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700664 &quot;confidence&quot;: 3.14, # Confidence of the OCR results on the block. Range [0, 1].
665 &quot;paragraphs&quot;: [ # List of paragraphs in this block (if this blocks is of type text).
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400666 { # Structural unit of text representing a number of words in certain order.
Bu Sun Kim65020912020-05-20 12:08:20 -0700667 &quot;property&quot;: { # Additional information detected on the structural component. # Additional information detected for the paragraph.
668 &quot;detectedLanguages&quot;: [ # A list of detected languages together with confidence.
669 { # Detected language for a structural component.
670 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range [0, 1].
671 &quot;languageCode&quot;: &quot;A String&quot;, # The BCP-47 language code, such as &quot;en-US&quot; or &quot;sr-Latn&quot;. For more
672 # information, see
673 # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
674 },
675 ],
676 &quot;detectedBreak&quot;: { # Detected start or end of a structural component. # Detected start or end of a text segment.
677 &quot;type&quot;: &quot;A String&quot;, # Detected break type.
678 &quot;isPrefix&quot;: True or False, # True if break prepends the element.
679 },
680 },
681 &quot;boundingBox&quot;: { # A bounding polygon for the detected image annotation. # The bounding box for the paragraph.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400682 # The vertices are in the order of top-left, top-right, bottom-right,
683 # bottom-left. When a rotation of the bounding box is detected the rotation
684 # is represented as around the top-left corner as defined when the text is
Bu Sun Kim65020912020-05-20 12:08:20 -0700685 # read in the &#x27;natural&#x27; orientation.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400686 # For example:
687 # * when the text is horizontal it might look like:
688 # 0----1
689 # | |
690 # 3----2
Bu Sun Kim65020912020-05-20 12:08:20 -0700691 # * when it&#x27;s rotated 180 degrees around the top-left corner it becomes:
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400692 # 2----3
693 # | |
694 # 1----0
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700695 # and the vertex order will still be (0, 1, 2, 3).
Bu Sun Kim65020912020-05-20 12:08:20 -0700696 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700697 { # A vertex represents a 2D point in the image.
698 # NOTE: the normalized vertex coordinates are relative to the original image
699 # and range from 0 to 1.
Bu Sun Kim65020912020-05-20 12:08:20 -0700700 &quot;y&quot;: 3.14, # Y coordinate.
701 &quot;x&quot;: 3.14, # X coordinate.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700702 },
703 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700704 &quot;vertices&quot;: [ # The bounding polygon vertices.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400705 { # A vertex represents a 2D point in the image.
706 # NOTE: the vertex coordinates are in the same scale as the original image.
Bu Sun Kim65020912020-05-20 12:08:20 -0700707 &quot;y&quot;: 42, # Y coordinate.
708 &quot;x&quot;: 42, # X coordinate.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400709 },
710 ],
711 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700712 &quot;confidence&quot;: 3.14, # Confidence of the OCR results for the paragraph. Range [0, 1].
713 &quot;words&quot;: [ # List of all words in this paragraph.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400714 { # A word representation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700715 &quot;boundingBox&quot;: { # A bounding polygon for the detected image annotation. # The bounding box for the word.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400716 # The vertices are in the order of top-left, top-right, bottom-right,
717 # bottom-left. When a rotation of the bounding box is detected the rotation
718 # is represented as around the top-left corner as defined when the text is
Bu Sun Kim65020912020-05-20 12:08:20 -0700719 # read in the &#x27;natural&#x27; orientation.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400720 # For example:
721 # * when the text is horizontal it might look like:
722 # 0----1
723 # | |
724 # 3----2
Bu Sun Kim65020912020-05-20 12:08:20 -0700725 # * when it&#x27;s rotated 180 degrees around the top-left corner it becomes:
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400726 # 2----3
727 # | |
728 # 1----0
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700729 # and the vertex order will still be (0, 1, 2, 3).
Bu Sun Kim65020912020-05-20 12:08:20 -0700730 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700731 { # A vertex represents a 2D point in the image.
732 # NOTE: the normalized vertex coordinates are relative to the original image
733 # and range from 0 to 1.
Bu Sun Kim65020912020-05-20 12:08:20 -0700734 &quot;y&quot;: 3.14, # Y coordinate.
735 &quot;x&quot;: 3.14, # X coordinate.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700736 },
737 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700738 &quot;vertices&quot;: [ # The bounding polygon vertices.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400739 { # A vertex represents a 2D point in the image.
740 # NOTE: the vertex coordinates are in the same scale as the original image.
Bu Sun Kim65020912020-05-20 12:08:20 -0700741 &quot;y&quot;: 42, # Y coordinate.
742 &quot;x&quot;: 42, # X coordinate.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400743 },
744 ],
745 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700746 &quot;confidence&quot;: 3.14, # Confidence of the OCR results for the word. Range [0, 1].
747 &quot;symbols&quot;: [ # List of symbols in the word.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400748 # The order of the symbols follows the natural reading order.
749 { # A single symbol representation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700750 &quot;boundingBox&quot;: { # A bounding polygon for the detected image annotation. # The bounding box for the symbol.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400751 # The vertices are in the order of top-left, top-right, bottom-right,
752 # bottom-left. When a rotation of the bounding box is detected the rotation
753 # is represented as around the top-left corner as defined when the text is
Bu Sun Kim65020912020-05-20 12:08:20 -0700754 # read in the &#x27;natural&#x27; orientation.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400755 # For example:
756 # * when the text is horizontal it might look like:
757 # 0----1
758 # | |
759 # 3----2
Bu Sun Kim65020912020-05-20 12:08:20 -0700760 # * when it&#x27;s rotated 180 degrees around the top-left corner it becomes:
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400761 # 2----3
762 # | |
763 # 1----0
Dan O'Mearadd494642020-05-01 07:42:23 -0700764 # and the vertex order will still be (0, 1, 2, 3).
Bu Sun Kim65020912020-05-20 12:08:20 -0700765 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700766 { # A vertex represents a 2D point in the image.
767 # NOTE: the normalized vertex coordinates are relative to the original image
768 # and range from 0 to 1.
Bu Sun Kim65020912020-05-20 12:08:20 -0700769 &quot;y&quot;: 3.14, # Y coordinate.
770 &quot;x&quot;: 3.14, # X coordinate.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700771 },
772 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700773 &quot;vertices&quot;: [ # The bounding polygon vertices.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400774 { # A vertex represents a 2D point in the image.
775 # NOTE: the vertex coordinates are in the same scale as the original image.
Bu Sun Kim65020912020-05-20 12:08:20 -0700776 &quot;y&quot;: 42, # Y coordinate.
777 &quot;x&quot;: 42, # X coordinate.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400778 },
779 ],
780 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700781 &quot;confidence&quot;: 3.14, # Confidence of the OCR results for the symbol. Range [0, 1].
782 &quot;text&quot;: &quot;A String&quot;, # The actual UTF-8 representation of the symbol.
783 &quot;property&quot;: { # Additional information detected on the structural component. # Additional information detected for the symbol.
784 &quot;detectedLanguages&quot;: [ # A list of detected languages together with confidence.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400785 { # Detected language for a structural component.
Bu Sun Kim65020912020-05-20 12:08:20 -0700786 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range [0, 1].
787 &quot;languageCode&quot;: &quot;A String&quot;, # The BCP-47 language code, such as &quot;en-US&quot; or &quot;sr-Latn&quot;. For more
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400788 # information, see
789 # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400790 },
791 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700792 &quot;detectedBreak&quot;: { # Detected start or end of a structural component. # Detected start or end of a text segment.
793 &quot;type&quot;: &quot;A String&quot;, # Detected break type.
794 &quot;isPrefix&quot;: True or False, # True if break prepends the element.
795 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400796 },
797 },
798 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700799 &quot;property&quot;: { # Additional information detected on the structural component. # Additional information detected for the word.
800 &quot;detectedLanguages&quot;: [ # A list of detected languages together with confidence.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400801 { # Detected language for a structural component.
Bu Sun Kim65020912020-05-20 12:08:20 -0700802 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range [0, 1].
803 &quot;languageCode&quot;: &quot;A String&quot;, # The BCP-47 language code, such as &quot;en-US&quot; or &quot;sr-Latn&quot;. For more
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400804 # information, see
805 # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400806 },
807 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700808 &quot;detectedBreak&quot;: { # Detected start or end of a structural component. # Detected start or end of a text segment.
809 &quot;type&quot;: &quot;A String&quot;, # Detected break type.
810 &quot;isPrefix&quot;: True or False, # True if break prepends the element.
811 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400812 },
813 },
814 ],
815 },
816 ],
817 },
818 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700819 &quot;property&quot;: { # Additional information detected on the structural component. # Additional information detected on the page.
820 &quot;detectedLanguages&quot;: [ # A list of detected languages together with confidence.
821 { # Detected language for a structural component.
822 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range [0, 1].
823 &quot;languageCode&quot;: &quot;A String&quot;, # The BCP-47 language code, such as &quot;en-US&quot; or &quot;sr-Latn&quot;. For more
824 # information, see
825 # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
826 },
827 ],
828 &quot;detectedBreak&quot;: { # Detected start or end of a structural component. # Detected start or end of a text segment.
829 &quot;type&quot;: &quot;A String&quot;, # Detected break type.
830 &quot;isPrefix&quot;: True or False, # True if break prepends the element.
831 },
832 },
833 &quot;confidence&quot;: 3.14, # Confidence of the OCR results on the page. Range [0, 1].
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400834 },
835 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700836 &quot;text&quot;: &quot;A String&quot;, # UTF-8 text detected on the pages.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400837 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700838 &quot;textAnnotations&quot;: [ # If present, text (OCR) detection has completed successfully.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700839 { # Set of detected entity features.
Bu Sun Kim65020912020-05-20 12:08:20 -0700840 &quot;score&quot;: 3.14, # Overall score of the result. Range [0, 1].
841 &quot;locations&quot;: [ # The location information for the detected entity. Multiple
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800842 # `LocationInfo` elements can be present because one location may
843 # indicate the location of the scene in the image, and another location
844 # may indicate the location of the place where the image was taken.
845 # Location information is usually present for landmarks.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700846 { # Detected entity location information.
Bu Sun Kim65020912020-05-20 12:08:20 -0700847 &quot;latLng&quot;: { # An object representing a latitude/longitude pair. This is expressed as a pair # lat/long location coordinates.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700848 # of doubles representing degrees latitude and degrees longitude. Unless
849 # specified otherwise, this must conform to the
Bu Sun Kim65020912020-05-20 12:08:20 -0700850 # &lt;a href=&quot;http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf&quot;&gt;WGS84
Dan O'Mearadd494642020-05-01 07:42:23 -0700851 # standard&lt;/a&gt;. Values must be within normalized ranges.
Bu Sun Kim65020912020-05-20 12:08:20 -0700852 &quot;latitude&quot;: 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
853 &quot;longitude&quot;: 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700854 },
855 },
856 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700857 &quot;mid&quot;: &quot;A String&quot;, # Opaque entity ID. Some IDs may be available in
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700858 # [Google Knowledge Graph Search
859 # API](https://developers.google.com/knowledge-graph/).
Bu Sun Kim65020912020-05-20 12:08:20 -0700860 &quot;confidence&quot;: 3.14, # **Deprecated. Use `score` instead.**
861 # The accuracy of the entity detection in an image.
862 # For example, for an image in which the &quot;Eiffel Tower&quot; entity is detected,
863 # this field represents the confidence that there is a tower in the query
864 # image. Range [0, 1].
865 &quot;locale&quot;: &quot;A String&quot;, # The language code for the locale in which the entity textual
866 # `description` is expressed.
867 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # Image region to which this entity belongs. Not produced
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700868 # for `LABEL_DETECTION` features.
Bu Sun Kim65020912020-05-20 12:08:20 -0700869 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700870 { # A vertex represents a 2D point in the image.
871 # NOTE: the normalized vertex coordinates are relative to the original image
872 # and range from 0 to 1.
Bu Sun Kim65020912020-05-20 12:08:20 -0700873 &quot;y&quot;: 3.14, # Y coordinate.
874 &quot;x&quot;: 3.14, # X coordinate.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700875 },
876 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700877 &quot;vertices&quot;: [ # The bounding polygon vertices.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700878 { # A vertex represents a 2D point in the image.
879 # NOTE: the vertex coordinates are in the same scale as the original image.
Bu Sun Kim65020912020-05-20 12:08:20 -0700880 &quot;y&quot;: 42, # Y coordinate.
881 &quot;x&quot;: 42, # X coordinate.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700882 },
883 ],
884 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700885 &quot;description&quot;: &quot;A String&quot;, # Entity textual description, expressed in its `locale` language.
886 &quot;topicality&quot;: 3.14, # The relevancy of the ICA (Image Content Annotation) label to the
887 # image. For example, the relevancy of &quot;tower&quot; is likely higher to an image
888 # containing the detected &quot;Eiffel Tower&quot; than to an image containing a
889 # detected distant towering building, even though the confidence that
890 # there is a tower in each image may be the same. Range [0, 1].
891 &quot;properties&quot;: [ # Some entities may have optional user-supplied `Property` (name/value)
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800892 # fields, such a score or string that qualifies the entity.
893 { # A `Property` consists of a user-supplied name/value pair.
Bu Sun Kim65020912020-05-20 12:08:20 -0700894 &quot;value&quot;: &quot;A String&quot;, # Value of the property.
895 &quot;uint64Value&quot;: &quot;A String&quot;, # Value of numeric properties.
896 &quot;name&quot;: &quot;A String&quot;, # Name of the property.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700897 },
898 ],
899 },
900 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700901 &quot;imagePropertiesAnnotation&quot;: { # Stores image properties, such as dominant colors. # If present, image properties were extracted successfully.
902 &quot;dominantColors&quot;: { # Set of dominant colors and their corresponding scores. # If present, dominant colors completed successfully.
903 &quot;colors&quot;: [ # RGB color values with their score and pixel fraction.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800904 { # Color information consists of RGB channels, score, and the fraction of
905 # the image that the color occupies in the image.
Bu Sun Kim65020912020-05-20 12:08:20 -0700906 &quot;pixelFraction&quot;: 3.14, # The fraction of pixels the color occupies in the image.
907 # Value in range [0, 1].
908 &quot;color&quot;: { # Represents a color in the RGBA color space. This representation is designed # RGB components of the color.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700909 # for simplicity of conversion to/from color representations in various
910 # languages over compactness; for example, the fields of this representation
Bu Sun Kim65020912020-05-20 12:08:20 -0700911 # can be trivially provided to the constructor of &quot;java.awt.Color&quot; in Java; it
912 # can also be trivially provided to UIColor&#x27;s &quot;+colorWithRed:green:blue:alpha&quot;
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700913 # method in iOS; and, with just a little work, it can be easily formatted into
Bu Sun Kim65020912020-05-20 12:08:20 -0700914 # a CSS &quot;rgba()&quot; string in JavaScript, as well.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700915 #
916 # Note: this proto does not carry information about the absolute color space
917 # that should be used to interpret the RGB value (e.g. sRGB, Adobe RGB,
918 # DCI-P3, BT.2020, etc.). By default, applications SHOULD assume the sRGB color
919 # space.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700920 #
921 # Example (Java):
922 #
923 # import com.google.type.Color;
924 #
925 # // ...
926 # public static java.awt.Color fromProto(Color protocolor) {
927 # float alpha = protocolor.hasAlpha()
928 # ? protocolor.getAlpha().getValue()
929 # : 1.0;
930 #
931 # return new java.awt.Color(
932 # protocolor.getRed(),
933 # protocolor.getGreen(),
934 # protocolor.getBlue(),
935 # alpha);
936 # }
937 #
938 # public static Color toProto(java.awt.Color color) {
939 # float red = (float) color.getRed();
940 # float green = (float) color.getGreen();
941 # float blue = (float) color.getBlue();
942 # float denominator = 255.0;
943 # Color.Builder resultBuilder =
944 # Color
945 # .newBuilder()
946 # .setRed(red / denominator)
947 # .setGreen(green / denominator)
948 # .setBlue(blue / denominator);
949 # int alpha = color.getAlpha();
950 # if (alpha != 255) {
951 # result.setAlpha(
952 # FloatValue
953 # .newBuilder()
954 # .setValue(((float) alpha) / denominator)
955 # .build());
956 # }
957 # return resultBuilder.build();
958 # }
959 # // ...
960 #
961 # Example (iOS / Obj-C):
962 #
963 # // ...
964 # static UIColor* fromProto(Color* protocolor) {
965 # float red = [protocolor red];
966 # float green = [protocolor green];
967 # float blue = [protocolor blue];
968 # FloatValue* alpha_wrapper = [protocolor alpha];
969 # float alpha = 1.0;
970 # if (alpha_wrapper != nil) {
971 # alpha = [alpha_wrapper value];
972 # }
973 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
974 # }
975 #
976 # static Color* toProto(UIColor* color) {
977 # CGFloat red, green, blue, alpha;
Dan O'Mearadd494642020-05-01 07:42:23 -0700978 # if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) {
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700979 # return nil;
980 # }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700981 # Color* result = [[Color alloc] init];
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700982 # [result setRed:red];
983 # [result setGreen:green];
984 # [result setBlue:blue];
Dan O'Mearadd494642020-05-01 07:42:23 -0700985 # if (alpha &lt;= 0.9999) {
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700986 # [result setAlpha:floatWrapperWithValue(alpha)];
987 # }
988 # [result autorelease];
989 # return result;
990 # }
991 # // ...
992 #
993 # Example (JavaScript):
994 #
995 # // ...
996 #
997 # var protoToCssColor = function(rgb_color) {
998 # var redFrac = rgb_color.red || 0.0;
999 # var greenFrac = rgb_color.green || 0.0;
1000 # var blueFrac = rgb_color.blue || 0.0;
1001 # var red = Math.floor(redFrac * 255);
1002 # var green = Math.floor(greenFrac * 255);
1003 # var blue = Math.floor(blueFrac * 255);
1004 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001005 # if (!(&#x27;alpha&#x27; in rgb_color)) {
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001006 # return rgbToCssColor_(red, green, blue);
1007 # }
1008 #
1009 # var alphaFrac = rgb_color.alpha.value || 0.0;
Bu Sun Kim65020912020-05-20 12:08:20 -07001010 # var rgbParams = [red, green, blue].join(&#x27;,&#x27;);
1011 # return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;);
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001012 # };
1013 #
1014 # var rgbToCssColor_ = function(red, green, blue) {
Dan O'Mearadd494642020-05-01 07:42:23 -07001015 # var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue);
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001016 # var hexString = rgbNumber.toString(16);
1017 # var missingZeros = 6 - hexString.length;
Bu Sun Kim65020912020-05-20 12:08:20 -07001018 # var resultBuilder = [&#x27;#&#x27;];
Dan O'Mearadd494642020-05-01 07:42:23 -07001019 # for (var i = 0; i &lt; missingZeros; i++) {
Bu Sun Kim65020912020-05-20 12:08:20 -07001020 # resultBuilder.push(&#x27;0&#x27;);
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001021 # }
1022 # resultBuilder.push(hexString);
Bu Sun Kim65020912020-05-20 12:08:20 -07001023 # return resultBuilder.join(&#x27;&#x27;);
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001024 # };
1025 #
1026 # // ...
Bu Sun Kim65020912020-05-20 12:08:20 -07001027 &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
1028 &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
1029 &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
1030 &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001031 # the final pixel color is defined by the equation:
1032 #
1033 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
1034 #
1035 # This means that a value of 1.0 corresponds to a solid color, whereas
1036 # a value of 0.0 corresponds to a completely transparent color. This
1037 # uses a wrapper message rather than a simple float scalar so that it is
1038 # possible to distinguish between a default value and the value being unset.
1039 # If omitted, this color object is to be rendered as a solid color
1040 # (as if the alpha value had been explicitly given with a value of 1.0).
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001041 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001042 &quot;score&quot;: 3.14, # Image-specific score for this color. Value in range [0, 1].
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001043 },
1044 ],
1045 },
1046 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001047 &quot;logoAnnotations&quot;: [ # If present, logo detection has completed successfully.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001048 { # Set of detected entity features.
Bu Sun Kim65020912020-05-20 12:08:20 -07001049 &quot;score&quot;: 3.14, # Overall score of the result. Range [0, 1].
1050 &quot;locations&quot;: [ # The location information for the detected entity. Multiple
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001051 # `LocationInfo` elements can be present because one location may
1052 # indicate the location of the scene in the image, and another location
1053 # may indicate the location of the place where the image was taken.
1054 # Location information is usually present for landmarks.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001055 { # Detected entity location information.
Bu Sun Kim65020912020-05-20 12:08:20 -07001056 &quot;latLng&quot;: { # An object representing a latitude/longitude pair. This is expressed as a pair # lat/long location coordinates.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001057 # of doubles representing degrees latitude and degrees longitude. Unless
1058 # specified otherwise, this must conform to the
Bu Sun Kim65020912020-05-20 12:08:20 -07001059 # &lt;a href=&quot;http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf&quot;&gt;WGS84
Dan O'Mearadd494642020-05-01 07:42:23 -07001060 # standard&lt;/a&gt;. Values must be within normalized ranges.
Bu Sun Kim65020912020-05-20 12:08:20 -07001061 &quot;latitude&quot;: 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
1062 &quot;longitude&quot;: 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001063 },
1064 },
1065 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001066 &quot;mid&quot;: &quot;A String&quot;, # Opaque entity ID. Some IDs may be available in
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001067 # [Google Knowledge Graph Search
1068 # API](https://developers.google.com/knowledge-graph/).
Bu Sun Kim65020912020-05-20 12:08:20 -07001069 &quot;confidence&quot;: 3.14, # **Deprecated. Use `score` instead.**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001070 # The accuracy of the entity detection in an image.
Bu Sun Kim65020912020-05-20 12:08:20 -07001071 # For example, for an image in which the &quot;Eiffel Tower&quot; entity is detected,
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001072 # this field represents the confidence that there is a tower in the query
1073 # image. Range [0, 1].
Bu Sun Kim65020912020-05-20 12:08:20 -07001074 &quot;locale&quot;: &quot;A String&quot;, # The language code for the locale in which the entity textual
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001075 # `description` is expressed.
Bu Sun Kim65020912020-05-20 12:08:20 -07001076 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # Image region to which this entity belongs. Not produced
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001077 # for `LABEL_DETECTION` features.
Bu Sun Kim65020912020-05-20 12:08:20 -07001078 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001079 { # A vertex represents a 2D point in the image.
1080 # NOTE: the normalized vertex coordinates are relative to the original image
1081 # and range from 0 to 1.
Bu Sun Kim65020912020-05-20 12:08:20 -07001082 &quot;y&quot;: 3.14, # Y coordinate.
1083 &quot;x&quot;: 3.14, # X coordinate.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001084 },
1085 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001086 &quot;vertices&quot;: [ # The bounding polygon vertices.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001087 { # A vertex represents a 2D point in the image.
1088 # NOTE: the vertex coordinates are in the same scale as the original image.
Bu Sun Kim65020912020-05-20 12:08:20 -07001089 &quot;y&quot;: 42, # Y coordinate.
1090 &quot;x&quot;: 42, # X coordinate.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001091 },
1092 ],
1093 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001094 &quot;description&quot;: &quot;A String&quot;, # Entity textual description, expressed in its `locale` language.
1095 &quot;topicality&quot;: 3.14, # The relevancy of the ICA (Image Content Annotation) label to the
1096 # image. For example, the relevancy of &quot;tower&quot; is likely higher to an image
1097 # containing the detected &quot;Eiffel Tower&quot; than to an image containing a
1098 # detected distant towering building, even though the confidence that
1099 # there is a tower in each image may be the same. Range [0, 1].
1100 &quot;properties&quot;: [ # Some entities may have optional user-supplied `Property` (name/value)
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001101 # fields, such a score or string that qualifies the entity.
1102 { # A `Property` consists of a user-supplied name/value pair.
Bu Sun Kim65020912020-05-20 12:08:20 -07001103 &quot;value&quot;: &quot;A String&quot;, # Value of the property.
1104 &quot;uint64Value&quot;: &quot;A String&quot;, # Value of numeric properties.
1105 &quot;name&quot;: &quot;A String&quot;, # Name of the property.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001106 },
1107 ],
1108 },
1109 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001110 &quot;context&quot;: { # If an image was produced from a file (e.g. a PDF), this message gives # If present, contextual information is needed to understand where this image
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001111 # comes from.
1112 # information about the source of that image.
Bu Sun Kim65020912020-05-20 12:08:20 -07001113 &quot;uri&quot;: &quot;A String&quot;, # The URI of the file used to produce the image.
1114 &quot;pageNumber&quot;: 42, # If the file was a PDF or TIFF, this field gives the page number within
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001115 # the file used to produce the image.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001116 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001117 &quot;webDetection&quot;: { # Relevant information for the image from the Internet. # If present, web detection has completed successfully.
1118 &quot;fullMatchingImages&quot;: [ # Fully matching images from the Internet.
1119 # Can include resized copies of the query image.
1120 { # Metadata for online images.
1121 &quot;url&quot;: &quot;A String&quot;, # The result image URL.
1122 &quot;score&quot;: 3.14, # (Deprecated) Overall relevancy score for the image.
1123 },
1124 ],
1125 &quot;webEntities&quot;: [ # Deduced entities from similar images on the Internet.
1126 { # Entity deduced from similar images on the Internet.
1127 &quot;score&quot;: 3.14, # Overall relevancy score for the entity.
1128 # Not normalized and not comparable across different image queries.
1129 &quot;entityId&quot;: &quot;A String&quot;, # Opaque entity ID.
1130 &quot;description&quot;: &quot;A String&quot;, # Canonical description of the entity, in English.
1131 },
1132 ],
1133 &quot;pagesWithMatchingImages&quot;: [ # Web pages containing the matching images from the Internet.
1134 { # Metadata for web pages.
1135 &quot;score&quot;: 3.14, # (Deprecated) Overall relevancy score for the web page.
1136 &quot;partialMatchingImages&quot;: [ # Partial matching images on the page.
1137 # Those images are similar enough to share some key-point features. For
1138 # example an original image will likely have partial matching for its
1139 # crops.
1140 { # Metadata for online images.
1141 &quot;url&quot;: &quot;A String&quot;, # The result image URL.
1142 &quot;score&quot;: 3.14, # (Deprecated) Overall relevancy score for the image.
1143 },
1144 ],
1145 &quot;url&quot;: &quot;A String&quot;, # The result web page URL.
1146 &quot;pageTitle&quot;: &quot;A String&quot;, # Title for the web page, may contain HTML markups.
1147 &quot;fullMatchingImages&quot;: [ # Fully matching images on the page.
1148 # Can include resized copies of the query image.
1149 { # Metadata for online images.
1150 &quot;url&quot;: &quot;A String&quot;, # The result image URL.
1151 &quot;score&quot;: 3.14, # (Deprecated) Overall relevancy score for the image.
1152 },
1153 ],
1154 },
1155 ],
1156 &quot;partialMatchingImages&quot;: [ # Partial matching images from the Internet.
1157 # Those images are similar enough to share some key-point features. For
1158 # example an original image will likely have partial matching for its crops.
1159 { # Metadata for online images.
1160 &quot;url&quot;: &quot;A String&quot;, # The result image URL.
1161 &quot;score&quot;: 3.14, # (Deprecated) Overall relevancy score for the image.
1162 },
1163 ],
1164 &quot;visuallySimilarImages&quot;: [ # The visually similar image results.
1165 { # Metadata for online images.
1166 &quot;url&quot;: &quot;A String&quot;, # The result image URL.
1167 &quot;score&quot;: 3.14, # (Deprecated) Overall relevancy score for the image.
1168 },
1169 ],
1170 &quot;bestGuessLabels&quot;: [ # The service&#x27;s best guess as to the topic of the request image.
1171 # Inferred from similar images on the open web.
1172 { # Label to provide extra metadata for the web detection.
1173 &quot;label&quot;: &quot;A String&quot;, # Label for extra metadata.
1174 &quot;languageCode&quot;: &quot;A String&quot;, # The BCP-47 language code for `label`, such as &quot;en-US&quot; or &quot;sr-Latn&quot;.
1175 # For more information, see
1176 # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001177 },
1178 ],
1179 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001180 &quot;safeSearchAnnotation&quot;: { # Set of features pertaining to the image, computed by computer vision # If present, safe-search annotation has completed successfully.
1181 # methods over safe-search verticals (for example, adult, spoof, medical,
1182 # violence).
1183 &quot;adult&quot;: &quot;A String&quot;, # Represents the adult content likelihood for the image. Adult content may
1184 # contain elements such as nudity, pornographic images or cartoons, or
1185 # sexual activities.
1186 &quot;spoof&quot;: &quot;A String&quot;, # Spoof likelihood. The likelihood that an modification
1187 # was made to the image&#x27;s canonical version to make it appear
1188 # funny or offensive.
1189 &quot;medical&quot;: &quot;A String&quot;, # Likelihood that this is a medical image.
1190 &quot;racy&quot;: &quot;A String&quot;, # Likelihood that the request image contains racy content. Racy content may
1191 # include (but is not limited to) skimpy or sheer clothing, strategically
1192 # covered nudity, lewd or provocative poses, or close-ups of sensitive
1193 # body areas.
1194 &quot;violence&quot;: &quot;A String&quot;, # Likelihood that this image contains violent content.
1195 },
1196 &quot;landmarkAnnotations&quot;: [ # If present, landmark detection has completed successfully.
1197 { # Set of detected entity features.
1198 &quot;score&quot;: 3.14, # Overall score of the result. Range [0, 1].
1199 &quot;locations&quot;: [ # The location information for the detected entity. Multiple
1200 # `LocationInfo` elements can be present because one location may
1201 # indicate the location of the scene in the image, and another location
1202 # may indicate the location of the place where the image was taken.
1203 # Location information is usually present for landmarks.
1204 { # Detected entity location information.
1205 &quot;latLng&quot;: { # An object representing a latitude/longitude pair. This is expressed as a pair # lat/long location coordinates.
1206 # of doubles representing degrees latitude and degrees longitude. Unless
1207 # specified otherwise, this must conform to the
1208 # &lt;a href=&quot;http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf&quot;&gt;WGS84
1209 # standard&lt;/a&gt;. Values must be within normalized ranges.
1210 &quot;latitude&quot;: 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
1211 &quot;longitude&quot;: 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
1212 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001213 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001214 ],
1215 &quot;mid&quot;: &quot;A String&quot;, # Opaque entity ID. Some IDs may be available in
1216 # [Google Knowledge Graph Search
1217 # API](https://developers.google.com/knowledge-graph/).
1218 &quot;confidence&quot;: 3.14, # **Deprecated. Use `score` instead.**
1219 # The accuracy of the entity detection in an image.
1220 # For example, for an image in which the &quot;Eiffel Tower&quot; entity is detected,
1221 # this field represents the confidence that there is a tower in the query
1222 # image. Range [0, 1].
1223 &quot;locale&quot;: &quot;A String&quot;, # The language code for the locale in which the entity textual
1224 # `description` is expressed.
1225 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # Image region to which this entity belongs. Not produced
1226 # for `LABEL_DETECTION` features.
1227 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
1228 { # A vertex represents a 2D point in the image.
1229 # NOTE: the normalized vertex coordinates are relative to the original image
1230 # and range from 0 to 1.
1231 &quot;y&quot;: 3.14, # Y coordinate.
1232 &quot;x&quot;: 3.14, # X coordinate.
1233 },
1234 ],
1235 &quot;vertices&quot;: [ # The bounding polygon vertices.
1236 { # A vertex represents a 2D point in the image.
1237 # NOTE: the vertex coordinates are in the same scale as the original image.
1238 &quot;y&quot;: 42, # Y coordinate.
1239 &quot;x&quot;: 42, # X coordinate.
1240 },
1241 ],
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001242 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001243 &quot;description&quot;: &quot;A String&quot;, # Entity textual description, expressed in its `locale` language.
1244 &quot;topicality&quot;: 3.14, # The relevancy of the ICA (Image Content Annotation) label to the
1245 # image. For example, the relevancy of &quot;tower&quot; is likely higher to an image
1246 # containing the detected &quot;Eiffel Tower&quot; than to an image containing a
1247 # detected distant towering building, even though the confidence that
1248 # there is a tower in each image may be the same. Range [0, 1].
1249 &quot;properties&quot;: [ # Some entities may have optional user-supplied `Property` (name/value)
1250 # fields, such a score or string that qualifies the entity.
1251 { # A `Property` consists of a user-supplied name/value pair.
1252 &quot;value&quot;: &quot;A String&quot;, # Value of the property.
1253 &quot;uint64Value&quot;: &quot;A String&quot;, # Value of numeric properties.
1254 &quot;name&quot;: &quot;A String&quot;, # Name of the property.
1255 },
1256 ],
1257 },
1258 ],
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001259 },
1260 ],
1261 }</pre>
1262</div>
1263
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001264<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001265 <code class="details" id="asyncBatchAnnotate">asyncBatchAnnotate(body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001266 <pre>Run asynchronous image detection and annotation for a list of images.
1267
1268Progress and results can be retrieved through the
1269`google.longrunning.Operations` interface.
1270`Operation.metadata` contains `OperationMetadata` (metadata).
1271`Operation.response` contains `AsyncBatchAnnotateImagesResponse` (results).
1272
1273This service will write image annotation outputs to json files in customer
1274GCS bucket, each json file containing BatchAnnotateImagesResponse proto.
1275
1276Args:
Dan O'Mearadd494642020-05-01 07:42:23 -07001277 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001278 The object takes the form of:
1279
1280{ # Request for async image annotation for a list of images.
Bu Sun Kim65020912020-05-20 12:08:20 -07001281 &quot;parent&quot;: &quot;A String&quot;, # Optional. Target project and location to make a call.
1282 #
1283 # Format: `projects/{project-id}/locations/{location-id}`.
1284 #
1285 # If no parent is specified, a region will be chosen automatically.
1286 #
1287 # Supported location-ids:
1288 # `us`: USA country only,
1289 # `asia`: East asia areas, like Japan, Taiwan,
1290 # `eu`: The European Union.
1291 #
1292 # Example: `projects/project-A/locations/eu`.
1293 &quot;outputConfig&quot;: { # The desired output location and metadata. # Required. The desired output location and metadata (e.g. format).
1294 &quot;gcsDestination&quot;: { # The Google Cloud Storage location where the output will be written to. # The Google Cloud Storage location to write the output(s) to.
1295 &quot;uri&quot;: &quot;A String&quot;, # Google Cloud Storage URI prefix where the results will be stored. Results
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001296 # will be in JSON format and preceded by its corresponding input URI prefix.
1297 # This field can either represent a gcs file prefix or gcs directory. In
1298 # either case, the uri should be unique because in order to get all of the
1299 # output files, you will need to do a wildcard gcs search on the uri prefix
1300 # you provide.
1301 #
1302 # Examples:
1303 #
1304 # * File Prefix: gs://bucket-name/here/filenameprefix The output files
1305 # will be created in gs://bucket-name/here/ and the names of the
Bu Sun Kim65020912020-05-20 12:08:20 -07001306 # output files will begin with &quot;filenameprefix&quot;.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001307 #
1308 # * Directory Prefix: gs://bucket-name/some/location/ The output files
1309 # will be created in gs://bucket-name/some/location/ and the names of the
1310 # output files could be anything because there was no filename prefix
1311 # specified.
1312 #
1313 # If multiple outputs, each response is still AnnotateFileResponse, each of
1314 # which contains some subset of the full list of AnnotateImageResponse.
1315 # Multiple outputs can happen if, for example, the output JSON is too large
1316 # and overflows into multiple sharded files.
1317 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001318 &quot;batchSize&quot;: 42, # The max number of response protos to put into each output JSON file on
1319 # Google Cloud Storage.
1320 # The valid range is [1, 100]. If not specified, the default value is 20.
1321 #
1322 # For example, for one pdf file with 100 pages, 100 response protos will
1323 # be generated. If `batch_size` = 20, then 5 json files each
1324 # containing 20 response protos will be written under the prefix
1325 # `gcs_destination`.`uri`.
1326 #
1327 # Currently, batch_size only applies to GcsDestination, with potential future
1328 # support for other output configurations.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001329 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001330 &quot;requests&quot;: [ # Required. Individual image annotation requests for this batch.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001331 { # Request for performing Google Cloud Vision API tasks over a user-provided
1332 # image, with user-requested features, and with context information.
Bu Sun Kim65020912020-05-20 12:08:20 -07001333 &quot;image&quot;: { # Client image to perform Google Cloud Vision API tasks over. # The image to be processed.
1334 &quot;content&quot;: &quot;A String&quot;, # Image content, represented as a stream of bytes.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001335 # Note: As with all `bytes` fields, protobuffers use a pure binary
1336 # representation, whereas JSON representations use base64.
Bu Sun Kim65020912020-05-20 12:08:20 -07001337 &quot;source&quot;: { # External image source (Google Cloud Storage or web URL image location). # Google Cloud Storage image location, or publicly-accessible image
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001338 # URL. If both `content` and `source` are provided for an image, `content`
1339 # takes precedence and is used to perform the image annotation request.
Bu Sun Kim65020912020-05-20 12:08:20 -07001340 &quot;gcsImageUri&quot;: &quot;A String&quot;, # **Use `image_uri` instead.**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001341 #
1342 # The Google Cloud Storage URI of the form
1343 # `gs://bucket_name/object_name`. Object versioning is not supported. See
1344 # [Google Cloud Storage Request
1345 # URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.
Bu Sun Kim65020912020-05-20 12:08:20 -07001346 &quot;imageUri&quot;: &quot;A String&quot;, # The URI of the source image. Can be either:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001347 #
1348 # 1. A Google Cloud Storage URI of the form
1349 # `gs://bucket_name/object_name`. Object versioning is not supported. See
1350 # [Google Cloud Storage Request
1351 # URIs](https://cloud.google.com/storage/docs/reference-uris) for more
1352 # info.
1353 #
1354 # 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from
1355 # HTTP/HTTPS URLs, Google cannot guarantee that the request will be
1356 # completed. Your request may fail if the specified host denies the
1357 # request (e.g. due to request throttling or DOS prevention), or if Google
1358 # throttles requests to the site for abuse prevention. You should not
1359 # depend on externally-hosted images for production applications.
1360 #
1361 # When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
1362 # precedence.
1363 },
1364 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001365 &quot;features&quot;: [ # Requested features.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001366 { # The type of Google Cloud Vision API detection to perform, and the maximum
1367 # number of results to return for that type. Multiple `Feature` objects can
1368 # be specified in the `features` list.
Bu Sun Kim65020912020-05-20 12:08:20 -07001369 &quot;model&quot;: &quot;A String&quot;, # Model to use for the feature.
1370 # Supported values: &quot;builtin/stable&quot; (the default if unset) and
1371 # &quot;builtin/latest&quot;.
1372 &quot;type&quot;: &quot;A String&quot;, # The feature type.
1373 &quot;maxResults&quot;: 42, # Maximum number of results of this type. Does not apply to
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001374 # `TEXT_DETECTION`, `DOCUMENT_TEXT_DETECTION`, or `CROP_HINTS`.
1375 },
1376 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001377 &quot;imageContext&quot;: { # Image context and/or feature-specific parameters. # Additional context that may accompany the image.
1378 &quot;languageHints&quot;: [ # List of languages to use for TEXT_DETECTION. In most cases, an empty value
1379 # yields the best results since it enables automatic language detection. For
1380 # languages based on the Latin alphabet, setting `language_hints` is not
1381 # needed. In rare cases, when the language of the text in the image is known,
1382 # setting a hint will help get better results (although it will be a
1383 # significant hindrance if the hint is wrong). Text detection returns an
1384 # error if one or more of the specified languages is not one of the
1385 # [supported languages](https://cloud.google.com/vision/docs/languages).
1386 &quot;A String&quot;,
1387 ],
1388 &quot;webDetectionParams&quot;: { # Parameters for web detection request. # Parameters for web detection.
1389 &quot;includeGeoResults&quot;: True or False, # Whether to include results derived from the geo information in the image.
1390 },
1391 &quot;latLongRect&quot;: { # Rectangle determined by min and max `LatLng` pairs. # Not used.
1392 &quot;maxLatLng&quot;: { # An object representing a latitude/longitude pair. This is expressed as a pair # Max lat/long pair.
1393 # of doubles representing degrees latitude and degrees longitude. Unless
1394 # specified otherwise, this must conform to the
1395 # &lt;a href=&quot;http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf&quot;&gt;WGS84
1396 # standard&lt;/a&gt;. Values must be within normalized ranges.
1397 &quot;latitude&quot;: 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
1398 &quot;longitude&quot;: 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
1399 },
1400 &quot;minLatLng&quot;: { # An object representing a latitude/longitude pair. This is expressed as a pair # Min lat/long pair.
1401 # of doubles representing degrees latitude and degrees longitude. Unless
1402 # specified otherwise, this must conform to the
1403 # &lt;a href=&quot;http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf&quot;&gt;WGS84
1404 # standard&lt;/a&gt;. Values must be within normalized ranges.
1405 &quot;latitude&quot;: 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
1406 &quot;longitude&quot;: 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
1407 },
1408 },
1409 &quot;cropHintsParams&quot;: { # Parameters for crop hints annotation request. # Parameters for crop hints annotation request.
1410 &quot;aspectRatios&quot;: [ # Aspect ratios in floats, representing the ratio of the width to the height
1411 # of the image. For example, if the desired aspect ratio is 4/3, the
1412 # corresponding float value should be 1.33333. If not specified, the
1413 # best possible crop is returned. The number of provided aspect ratios is
1414 # limited to a maximum of 16; any aspect ratios provided after the 16th are
1415 # ignored.
1416 3.14,
1417 ],
1418 },
1419 &quot;productSearchParams&quot;: { # Parameters for a product search request. # Parameters for product search.
1420 &quot;productCategories&quot;: [ # The list of product categories to search in. Currently, we only consider
1421 # the first category, and either &quot;homegoods-v2&quot;, &quot;apparel-v2&quot;, &quot;toys-v2&quot;,
1422 # &quot;packagedgoods-v1&quot;, or &quot;general-v1&quot; should be specified. The legacy
1423 # categories &quot;homegoods&quot;, &quot;apparel&quot;, and &quot;toys&quot; are still supported but will
1424 # be deprecated. For new products, please use &quot;homegoods-v2&quot;, &quot;apparel-v2&quot;,
1425 # or &quot;toys-v2&quot; for better product search accuracy. It is recommended to
1426 # migrate existing products to these categories as well.
1427 &quot;A String&quot;,
1428 ],
1429 &quot;filter&quot;: &quot;A String&quot;, # The filtering expression. This can be used to restrict search results based
1430 # on Product labels. We currently support an AND of OR of key-value
1431 # expressions, where each expression within an OR must have the same key. An
1432 # &#x27;=&#x27; should be used to connect the key and value.
1433 #
1434 # For example, &quot;(color = red OR color = blue) AND brand = Google&quot; is
1435 # acceptable, but &quot;(color = red OR brand = Google)&quot; is not acceptable.
1436 # &quot;color: red&quot; is not acceptable because it uses a &#x27;:&#x27; instead of an &#x27;=&#x27;.
1437 &quot;productSet&quot;: &quot;A String&quot;, # The resource name of a ProductSet to be searched for similar images.
1438 #
1439 # Format is:
1440 # `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
1441 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon around the area of interest in the image.
1442 # If it is not specified, system discretion will be applied.
1443 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
1444 { # A vertex represents a 2D point in the image.
1445 # NOTE: the normalized vertex coordinates are relative to the original image
1446 # and range from 0 to 1.
1447 &quot;y&quot;: 3.14, # Y coordinate.
1448 &quot;x&quot;: 3.14, # X coordinate.
1449 },
1450 ],
1451 &quot;vertices&quot;: [ # The bounding polygon vertices.
1452 { # A vertex represents a 2D point in the image.
1453 # NOTE: the vertex coordinates are in the same scale as the original image.
1454 &quot;y&quot;: 42, # Y coordinate.
1455 &quot;x&quot;: 42, # X coordinate.
1456 },
1457 ],
1458 },
1459 },
1460 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001461 },
1462 ],
1463 }
1464
1465 x__xgafv: string, V1 error format.
1466 Allowed values
1467 1 - v1 error format
1468 2 - v2 error format
1469
1470Returns:
1471 An object of the form:
1472
1473 { # This resource represents a long-running operation that is the result of a
1474 # network API call.
Bu Sun Kim65020912020-05-20 12:08:20 -07001475 &quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress.
1476 # If `true`, the operation is completed, and either `error` or `response` is
1477 # available.
1478 &quot;response&quot;: { # The normal response of the operation in case of success. If the original
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001479 # method returns no data on success, such as `Delete`, the response is
1480 # `google.protobuf.Empty`. If the original method is standard
1481 # `Get`/`Create`/`Update`, the response should be the resource. For other
1482 # methods, the response should have the type `XxxResponse`, where `Xxx`
1483 # is the original method name. For example, if the original method name
1484 # is `TakeSnapshot()`, the inferred response type is
1485 # `TakeSnapshotResponse`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001486 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001487 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001488 &quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001489 # originally returns it. If you use the default HTTP mapping, the
1490 # `name` should be a resource name ending with `operations/{unique_id}`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001491 &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for # The error result of the operation in case of failure or cancellation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001492 # different programming environments, including REST APIs and RPC APIs. It is
1493 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
1494 # three pieces of data: error code, error message, and error details.
1495 #
1496 # You can find out more about this error model and how to work with it in the
1497 # [API Design Guide](https://cloud.google.com/apis/design/errors).
Bu Sun Kim65020912020-05-20 12:08:20 -07001498 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001499 # message types for APIs to use.
1500 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001501 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001502 },
1503 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001504 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
1505 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
1506 # user-facing error message should be localized and sent in the
1507 # google.rpc.Status.details field, or localized by the client.
1508 },
1509 &quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically
1510 # contains progress information and common metadata such as create time.
1511 # Some services might not provide such metadata. Any method that returns a
1512 # long-running operation should document the metadata type, if any.
1513 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001514 },
1515 }</pre>
1516</div>
1517
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001518</body></html>