PHP Класс 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];
См. также: https://cloud.google.com/vision/reference/rest/v1/images/annotate#entityannotation EntityAnnotation
Наследование: extends AbstractFeature, use trait Google\Cloud\CallTrait
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
__construct ( array $info ) Create an entity annotation result.

Описание методов

__construct() публичный Метод

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