Vision/src/V1/ImageAnnotatorClient.php
public function annotateImage($image, $features, $optionalArgs = [])
    {
        $image = $this->createImageObject($image);
        return $this->annotateImageHelper(
            [$this, 'batchAnnotateImages'],
            AnnotateImageRequest::class,
            $image,
            $features,
            $optionalArgs
        );
    }
public function annotateImage($image, $features, $optionalArgs = [])
    {
        $image = $this->createImageObject($image);
        return $this->annotateImageHelper(
            [$this, 'batchAnnotateImages'],
            AnnotateImageRequest::class,
            $image,
            $features,
            $optionalArgs
        );
    }
public function annotateImage ( $ image , $ features , $ optionalArgs = [ ] ) { $ image = $ this -> createImageObject ( $ image ) ; return $ this -> annotateImageHelper ( [ $ this , 'batchAnnotateImages' ] , AnnotateImageRequest :: class , $ image , $ features , $ optionalArgs ) ; }
Run image detection and annotation for an image.

Example:
```
use Google\Cloud\Vision\V1\Feature;
use Google\Cloud\Vision\V1\Feature\Type;

$imageResource = fopen('path/to/image.jpg', 'r');
$features = [Type::FACE_DETECTION];
$response = $imageAnnotatorClient->annotateImage($imageResource, $features);
```

@param resource|string|Image $image        The image to be processed.
@param Feature[]|int[]       $features     Requested features.
@param array                 $optionalArgs {
Configuration Options.

@type ImageContext        $imageContext  Additional context that may accompany the image.
@type RetrySettings|array $retrySettings
Retry settings to use for this call. Can be a
{@see Google\ApiCore\RetrySettings} object, or an associative array
of retry settings parameters. See the documentation on
{@see Google\ApiCore\RetrySettings} for example usage.
}

@return AnnotateImageResponse

@throws ApiException if the remote call fails
@experimental
Run image detection and annotation for an image .