Vision/src/Image.php
public function requestObject($encode = true)
    {
        return array_filter([
            'image' => $this->imageObject($encode),
            'features' => $this->features,
            'imageContext' => $this->options['imageContext']
        ]);
    }
public function requestObject($encode = true)
    {
        return array_filter([
            'image' => $this->imageObject($encode),
            'features' => $this->features,
            'imageContext' => $this->options['imageContext']
        ]);
    }
public function requestObject ( $ encode = true ) { return array_filter ( [ 'image' => $ this -> imageObject ( $ encode ) , 'features' => $ this -> features , 'imageContext' => $ this -> options [ 'imageContext' ] ] ) ; }
Return a formatted annotate image request.

This method is used internally by {@see Google\Cloud\Vision\VisionClient}
and is not generally intended for use outside of that context.

Example:
```
use Google\Cloud\Vision\Image;

$imageResource = fopen(__DIR__ . '/assets/family-photo.jpg', 'r');
$image = new Image($imageResource, [
'FACE_DETECTION'
]);

$requestObj = $image->requestObject();
```

@see https://cloud.google.com/vision/reference/rest/v1/images/annotate#annotateimagerequest AnnotateImageRequest

@param  bool $encode [optional] If set to true, image bytes will be base64-encoded
(required for json/rest requests)
@return array
Return a formatted annotate image request .