class ProjectsLocationsProductsReferenceImages extends Resource (View source)

The "referenceImages" collection of methods.

Typical usage is:

 $visionService = new Google\Service\Vision(...);
 $referenceImages = $visionService->projects_locations_products_referenceImages;

Methods

create(string $parent, ReferenceImage $postBody, array $optParams = [])

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.

delete(string $name, array $optParams = [])

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. (referenceImages.delete)

get(string $name, array $optParams = [])

Gets information associated with a ReferenceImage. Possible errors: * Returns NOT_FOUND if the specified image does not exist. (referenceImages.get)

listProjectsLocationsProductsReferenceImages(string $parent, array $optParams = [])

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.

Details

ReferenceImage create(string $parent, ReferenceImage $postBody, array $optParams = [])

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. (referenceImages.create)

Parameters

string $parent

Required. Resource name of the product in which to create the reference image. Format is projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID.

ReferenceImage $postBody
array $optParams

Optional parameters.

Return Value

ReferenceImage

Exceptions

Exception

VisionEmpty delete(string $name, array $optParams = [])

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. (referenceImages.delete)

Parameters

string $name

Required. The resource name of the reference image to delete. Format is: projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/ referenceImages/IMAGE_ID

array $optParams

Optional parameters.

Return Value

VisionEmpty

Exceptions

Exception

ReferenceImage get(string $name, array $optParams = [])

Gets information associated with a ReferenceImage. Possible errors: * Returns NOT_FOUND if the specified image does not exist. (referenceImages.get)

Parameters

string $name

Required. The resource name of the ReferenceImage to get. Format is: projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenc eImages/IMAGE_ID.

array $optParams

Optional parameters.

Return Value

ReferenceImage

Exceptions

Exception

ListReferenceImagesResponse listProjectsLocationsProductsReferenceImages(string $parent, array $optParams = [])

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.

(referenceImages.listProjectsLocationsProductsReferenceImages)

Parameters

string $parent

Required. Resource name of the product containing the reference images. Format is projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID.

array $optParams

Optional parameters.

Return Value

ListReferenceImagesResponse

Exceptions

Exception