Google\Cloud\Vision\VisionClient::images PHP Method

images() public method

This method is useful for quickly configuring every member of a set of images with the same features and options. Should you need to provide different features or options for one or more members of the set, {@see \Google\Cloud\Vision\VisionClient::image()} is a better choice. This method will not perform any service requests, and is meant to be used to configure a request prior to calling {@see \Google\Cloud\Vision\VisionClient::annotateBatch()}. For more information, including best practices and examples detailing other usage such as $imageContext, see {@see \Google\Cloud\Vision\Image::__construct()}. Example: In the example below, both images will have the same settings applied. They will both run face detection and return up to 10 results. $familyPhotoResource = fopen(__DIR__ .'/assets/family-photo.jpg', 'r'); $weddingPhotoResource = fopen(__DIR__ .'/assets/wedding-photo.jpg', 'r'); $images = $vision->images([$familyPhotoResource, $weddingPhotoResource], [ 'FACE_DETECTION' ], [ 'maxResults' => [ 'FACE_DETECTION' => 10 ] ]);
public images ( array $images, array $features, array $options = [] ) : Image[]
$images array An array of images to configure with the given settings. Each member of the set can be a resource, a string of bytes, or an instance of {@see \Google\Cloud\Storage\StorageObject}.
$features array A list of cloud vision features to apply to each image.
$options array See {@see \Google\Cloud\Vision\Image::__construct()} for configuration details.
return Image[]
    public function images(array $images, array $features, array $options = [])
    {
        $result = [];
        foreach ($images as $image) {
            $result[] = $this->image($image, $features, $options);
        }
        return $result;
    }