PHP 클래스 Google\Cloud\Vision\Annotation

Example: use Google\Cloud\ServiceBuilder; $cloud = new ServiceBuilder(); $vision = $cloud->vision(); $imageResource = fopen(__DIR__ .'/assets/family-photo.jpg', 'r'); $image = $vision->image($imageResource, [ 'FACE_DETECTION' ]); $annotation = $vision->annotate($image);
파일 보기 프로젝트 열기: GoogleCloudPlatform/gcloud-php 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( array $info ) Create an annotation result.
error ( ) : array | null Get error information, if present
faces ( ) : Face[] | null Return an array of faces
imageProperties ( ) : ImageProperties | null Fetch image properties
info ( ) : array | null Return raw annotation response array
labels ( ) : Entity[] | null Return an array of labels
landmarks ( ) : Entity[] | null Return an array of landmarks
logos ( ) : Entity[] | null Return an array of logos
safeSearch ( ) : SafeSearch | null Get the result of a safe search detection
text ( ) : Entity[] | null Return an array containing all text found in the image

메소드 상세

__construct() 공개 메소드

This class represents a single image annotation response from Cloud Vision. If multiple images were tested at once, the result will be an array of Annotation instances. This class is not intended to be instantiated outside the Google Cloud Platform Client Library.
public __construct ( array $info )
$info array The annotation result

error() 공개 메소드

Example: $error = $annotation->error();
또한 보기: https://cloud.google.com/vision/reference/rest/v1/images/annotate#status Status Format
public error ( ) : array | null
리턴 array | null

faces() 공개 메소드

Example: $faces = $annotation->faces();
public faces ( ) : Face[] | null
리턴 Google\Cloud\Vision\Annotation\Face[] | null

imageProperties() 공개 메소드

Example: $properties = $annotation->imageProperties();
public imageProperties ( ) : ImageProperties | null
리턴 Google\Cloud\Vision\Annotation\ImageProperties | null

info() 공개 메소드

Example: $info = $annotation->info();
또한 보기: https://cloud.google.com/vision/reference/rest/v1/images/annotate#annotateimageresponse AnnotateImageResponse
public info ( ) : array | null
리턴 array | null

labels() 공개 메소드

Example: $labels = $annotation->labels();
public labels ( ) : Entity[] | null
리턴 Google\Cloud\Vision\Annotation\Entity[] | null

landmarks() 공개 메소드

Example: $landmarks = $annotation->landmarks();
public landmarks ( ) : Entity[] | null
리턴 Google\Cloud\Vision\Annotation\Entity[] | null

logos() 공개 메소드

Example: $logos = $annotation->logos();
public logos ( ) : Entity[] | null
리턴 Google\Cloud\Vision\Annotation\Entity[] | null

safeSearch() 공개 메소드

Example: $safeSearch = $annotation->safeSearch();
public safeSearch ( ) : SafeSearch | null
리턴 Google\Cloud\Vision\Annotation\SafeSearch | null

text() 공개 메소드

Example: $text = $annotation->text();
public text ( ) : Entity[] | null
리턴 Google\Cloud\Vision\Annotation\Entity[] | null