1<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 75<h1><a href="vision_v1.html">Cloud Vision API</a> . <a href="vision_v1.projects.html">projects</a> . <a href="vision_v1.projects.locations.html">locations</a> . <a href="vision_v1.projects.locations.products.html">products</a> . <a href="vision_v1.projects.locations.products.referenceImages.html">referenceImages</a></h1> 76<h2>Instance Methods</h2> 77<p class="toc_element"> 78 <code><a href="#close">close()</a></code></p> 79<p class="firstline">Close httplib2 connections.</p> 80<p class="toc_element"> 81 <code><a href="#create">create(parent, body=None, referenceImageId=None, x__xgafv=None)</a></code></p> 82<p class="firstline">Creates and returns a new ReferenceImage resource. The `bounding_poly` field is optional. If `bounding_poly` is not specified, the system will try to detect regions of interest in the image that are compatible with the product_category on the parent product. If it is specified, detection is ALWAYS skipped. The system converts polygons into non-rotated rectangles. Note that the pipeline will resize the image if the image resolution is too large to process (above 50MP). Possible errors: * Returns INVALID_ARGUMENT if the image_uri is missing or longer than 4096 characters. * Returns INVALID_ARGUMENT if the product does not exist. * Returns INVALID_ARGUMENT if bounding_poly is not provided, and nothing compatible with the parent product's product_category is detected. * Returns INVALID_ARGUMENT if bounding_poly contains more than 10 polygons.</p> 83<p class="toc_element"> 84 <code><a href="#delete">delete(name, x__xgafv=None)</a></code></p> 85<p class="firstline">Permanently deletes a reference image. The image metadata will be deleted right away, but search queries against ProductSets containing the image may still work until all related caches are refreshed. The actual image files are not deleted from Google Cloud Storage.</p> 86<p class="toc_element"> 87 <code><a href="#get">get(name, x__xgafv=None)</a></code></p> 88<p class="firstline">Gets information associated with a ReferenceImage. Possible errors: * Returns NOT_FOUND if the specified image does not exist.</p> 89<p class="toc_element"> 90 <code><a href="#list">list(parent, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p> 91<p class="firstline">Lists reference images. Possible errors: * Returns NOT_FOUND if the parent product does not exist. * Returns INVALID_ARGUMENT if the page_size is greater than 100, or less than 1.</p> 92<p class="toc_element"> 93 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p> 94<p class="firstline">Retrieves the next page of results.</p> 95<h3>Method Details</h3> 96<div class="method"> 97 <code class="details" id="close">close()</code> 98 <pre>Close httplib2 connections.</pre> 99</div> 100 101<div class="method"> 102 <code class="details" id="create">create(parent, body=None, referenceImageId=None, x__xgafv=None)</code> 103 <pre>Creates and returns a new ReferenceImage resource. The `bounding_poly` field is optional. If `bounding_poly` is not specified, the system will try to detect regions of interest in the image that are compatible with the product_category on the parent product. If it is specified, detection is ALWAYS skipped. The system converts polygons into non-rotated rectangles. Note that the pipeline will resize the image if the image resolution is too large to process (above 50MP). Possible errors: * Returns INVALID_ARGUMENT if the image_uri is missing or longer than 4096 characters. * Returns INVALID_ARGUMENT if the product does not exist. * Returns INVALID_ARGUMENT if bounding_poly is not provided, and nothing compatible with the parent product's product_category is detected. * Returns INVALID_ARGUMENT if bounding_poly contains more than 10 polygons. 104 105Args: 106 parent: string, Required. Resource name of the product in which to create the reference image. Format is `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. (required) 107 body: object, The request body. 108 The object takes the form of: 109 110{ # A `ReferenceImage` represents a product image and its associated metadata, such as bounding boxes. 111 "boundingPolys": [ # Optional. Bounding polygons around the areas of interest in the reference image. If this field is empty, the system will try to detect regions of interest. At most 10 bounding polygons will be used. The provided shape is converted into a non-rotated rectangle. Once converted, the small edge of the rectangle must be greater than or equal to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5 is not). 112 { # A bounding polygon for the detected image annotation. 113 "normalizedVertices": [ # The bounding polygon normalized vertices. 114 { # A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1. 115 "x": 3.14, # X coordinate. 116 "y": 3.14, # Y coordinate. 117 }, 118 ], 119 "vertices": [ # The bounding polygon vertices. 120 { # A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image. 121 "x": 42, # X coordinate. 122 "y": 42, # Y coordinate. 123 }, 124 ], 125 }, 126 ], 127 "name": "A String", # The resource name of the reference image. Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`. This field is ignored when creating a reference image. 128 "uri": "A String", # Required. The Google Cloud Storage URI of the reference image. The URI must start with `gs://`. 129} 130 131 referenceImageId: string, A user-supplied resource id for the ReferenceImage to be added. If set, the server will attempt to use this value as the resource id. If it is already in use, an error is returned with code ALREADY_EXISTS. Must be at most 128 characters long. It cannot contain the character `/`. 132 x__xgafv: string, V1 error format. 133 Allowed values 134 1 - v1 error format 135 2 - v2 error format 136 137Returns: 138 An object of the form: 139 140 { # A `ReferenceImage` represents a product image and its associated metadata, such as bounding boxes. 141 "boundingPolys": [ # Optional. Bounding polygons around the areas of interest in the reference image. If this field is empty, the system will try to detect regions of interest. At most 10 bounding polygons will be used. The provided shape is converted into a non-rotated rectangle. Once converted, the small edge of the rectangle must be greater than or equal to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5 is not). 142 { # A bounding polygon for the detected image annotation. 143 "normalizedVertices": [ # The bounding polygon normalized vertices. 144 { # A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1. 145 "x": 3.14, # X coordinate. 146 "y": 3.14, # Y coordinate. 147 }, 148 ], 149 "vertices": [ # The bounding polygon vertices. 150 { # A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image. 151 "x": 42, # X coordinate. 152 "y": 42, # Y coordinate. 153 }, 154 ], 155 }, 156 ], 157 "name": "A String", # The resource name of the reference image. Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`. This field is ignored when creating a reference image. 158 "uri": "A String", # Required. The Google Cloud Storage URI of the reference image. The URI must start with `gs://`. 159}</pre> 160</div> 161 162<div class="method"> 163 <code class="details" id="delete">delete(name, x__xgafv=None)</code> 164 <pre>Permanently deletes a reference image. The image metadata will be deleted right away, but search queries against ProductSets containing the image may still work until all related caches are refreshed. The actual image files are not deleted from Google Cloud Storage. 165 166Args: 167 name: string, Required. The resource name of the reference image to delete. Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID` (required) 168 x__xgafv: string, V1 error format. 169 Allowed values 170 1 - v1 error format 171 2 - v2 error format 172 173Returns: 174 An object of the form: 175 176 { # A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`. 177}</pre> 178</div> 179 180<div class="method"> 181 <code class="details" id="get">get(name, x__xgafv=None)</code> 182 <pre>Gets information associated with a ReferenceImage. Possible errors: * Returns NOT_FOUND if the specified image does not exist. 183 184Args: 185 name: string, Required. The resource name of the ReferenceImage to get. Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`. (required) 186 x__xgafv: string, V1 error format. 187 Allowed values 188 1 - v1 error format 189 2 - v2 error format 190 191Returns: 192 An object of the form: 193 194 { # A `ReferenceImage` represents a product image and its associated metadata, such as bounding boxes. 195 "boundingPolys": [ # Optional. Bounding polygons around the areas of interest in the reference image. If this field is empty, the system will try to detect regions of interest. At most 10 bounding polygons will be used. The provided shape is converted into a non-rotated rectangle. Once converted, the small edge of the rectangle must be greater than or equal to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5 is not). 196 { # A bounding polygon for the detected image annotation. 197 "normalizedVertices": [ # The bounding polygon normalized vertices. 198 { # A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1. 199 "x": 3.14, # X coordinate. 200 "y": 3.14, # Y coordinate. 201 }, 202 ], 203 "vertices": [ # The bounding polygon vertices. 204 { # A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image. 205 "x": 42, # X coordinate. 206 "y": 42, # Y coordinate. 207 }, 208 ], 209 }, 210 ], 211 "name": "A String", # The resource name of the reference image. Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`. This field is ignored when creating a reference image. 212 "uri": "A String", # Required. The Google Cloud Storage URI of the reference image. The URI must start with `gs://`. 213}</pre> 214</div> 215 216<div class="method"> 217 <code class="details" id="list">list(parent, pageSize=None, pageToken=None, x__xgafv=None)</code> 218 <pre>Lists reference images. Possible errors: * Returns NOT_FOUND if the parent product does not exist. * Returns INVALID_ARGUMENT if the page_size is greater than 100, or less than 1. 219 220Args: 221 parent: string, Required. Resource name of the product containing the reference images. Format is `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. (required) 222 pageSize: integer, The maximum number of items to return. Default 10, maximum 100. 223 pageToken: string, A token identifying a page of results to be returned. This is the value of `nextPageToken` returned in a previous reference image list request. Defaults to the first page if not specified. 224 x__xgafv: string, V1 error format. 225 Allowed values 226 1 - v1 error format 227 2 - v2 error format 228 229Returns: 230 An object of the form: 231 232 { # Response message for the `ListReferenceImages` method. 233 "nextPageToken": "A String", # The next_page_token returned from a previous List request, if any. 234 "pageSize": 42, # The maximum number of items to return. Default 10, maximum 100. 235 "referenceImages": [ # The list of reference images. 236 { # A `ReferenceImage` represents a product image and its associated metadata, such as bounding boxes. 237 "boundingPolys": [ # Optional. Bounding polygons around the areas of interest in the reference image. If this field is empty, the system will try to detect regions of interest. At most 10 bounding polygons will be used. The provided shape is converted into a non-rotated rectangle. Once converted, the small edge of the rectangle must be greater than or equal to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5 is not). 238 { # A bounding polygon for the detected image annotation. 239 "normalizedVertices": [ # The bounding polygon normalized vertices. 240 { # A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1. 241 "x": 3.14, # X coordinate. 242 "y": 3.14, # Y coordinate. 243 }, 244 ], 245 "vertices": [ # The bounding polygon vertices. 246 { # A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image. 247 "x": 42, # X coordinate. 248 "y": 42, # Y coordinate. 249 }, 250 ], 251 }, 252 ], 253 "name": "A String", # The resource name of the reference image. Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`. This field is ignored when creating a reference image. 254 "uri": "A String", # Required. The Google Cloud Storage URI of the reference image. The URI must start with `gs://`. 255 }, 256 ], 257}</pre> 258</div> 259 260<div class="method"> 261 <code class="details" id="list_next">list_next(previous_request, previous_response)</code> 262 <pre>Retrieves the next page of results. 263 264Args: 265 previous_request: The request for the previous page. (required) 266 previous_response: The response from the request for the previous page. (required) 267 268Returns: 269 A request object that you can call 'execute()' on to request the next 270 page. Returns None if there are no more items in the collection. 271 </pre> 272</div> 273 274</body></html>