PHP Class Google\Cloud\Vision\Annotation\Entity

Example: use Google\Cloud\ServiceBuilder; $cloud = new ServiceBuilder(); $vision = $cloud->vision(); $imageResource = fopen(__DIR__ .'/assets/family-photo.jpg', 'r'); $image = $vision->image($imageResource, [ 'text' ]); $annotation = $vision->annotate($image); $text = $annotation->text()[0];
See also: https://cloud.google.com/vision/reference/rest/v1/images/annotate#entityannotation EntityAnnotation
Inheritance: extends AbstractFeature, use trait Google\Cloud\CallTrait
Datei anzeigen Open project: GoogleCloudPlatform/gcloud-php Class Usage Examples

Public Methods

Method Description
__construct ( array $info ) Create an entity annotation result.

Method Details

__construct() public method

This class is created internally by {@see \Google\Cloud\Vision\Annotation} and is used to represent various annotation feature results. This class should not be instantiated externally. Entities are returned by {@see \Google\Cloud\Vision\Annotation::landmarks()}, {@see \Google\Cloud\Vision\Annotation::logos()}, {@see \Google\Cloud\Vision\Annotation::labels()} and {@see \Google\Cloud\Vision\Annotation::text()}.
public __construct ( array $info )
$info array The entity annotation result