class FaceAnnotation extends Message

A face annotation object contains the results of face detection.

Protobuf type Google\Cloud\Vision\V1\FaceAnnotation

Methods

__construct()

No description

getBoundingPoly()

The bounding polygon around the face. The coordinates of the bounding box are in the original image's scale, as returned in ImageParams.

setBoundingPoly(BoundingPoly $var)

The bounding polygon around the face. The coordinates of the bounding box are in the original image's scale, as returned in ImageParams.

getFdBoundingPoly()

The fd_bounding_poly bounding polygon is tighter than the boundingPoly, and encloses only the skin part of the face. Typically, it is used to eliminate the face from any image analysis that detects the "amount of skin" visible in an image. It is not based on the landmarker results, only on the initial face detection, hence the fd (face detection) prefix.

setFdBoundingPoly(BoundingPoly $var)

The fd_bounding_poly bounding polygon is tighter than the boundingPoly, and encloses only the skin part of the face. Typically, it is used to eliminate the face from any image analysis that detects the "amount of skin" visible in an image. It is not based on the landmarker results, only on the initial face detection, hence the fd (face detection) prefix.

RepeatedField
getLandmarks()

Detected face landmarks.

setLandmarks(array|RepeatedField $var)

Detected face landmarks.

float
getRollAngle()

Roll angle, which indicates the amount of clockwise/anti-clockwise rotation of the face relative to the image vertical about the axis perpendicular to the face. Range [-180,180].

setRollAngle(float $var)

Roll angle, which indicates the amount of clockwise/anti-clockwise rotation of the face relative to the image vertical about the axis perpendicular to the face. Range [-180,180].

float
getPanAngle()

Yaw angle, which indicates the leftward/rightward angle that the face is pointing relative to the vertical plane perpendicular to the image. Range [-180,180].

setPanAngle(float $var)

Yaw angle, which indicates the leftward/rightward angle that the face is pointing relative to the vertical plane perpendicular to the image. Range [-180,180].

float
getTiltAngle()

Pitch angle, which indicates the upwards/downwards angle that the face is pointing relative to the image's horizontal plane. Range [-180,180].

setTiltAngle(float $var)

Pitch angle, which indicates the upwards/downwards angle that the face is pointing relative to the image's horizontal plane. Range [-180,180].

float
getDetectionConfidence()

Detection confidence. Range [0, 1].

setDetectionConfidence(float $var)

Detection confidence. Range [0, 1].

float
getLandmarkingConfidence()

Face landmarking confidence. Range [0, 1].

setLandmarkingConfidence(float $var)

Face landmarking confidence. Range [0, 1].

int
getJoyLikelihood()

Joy likelihood.

setJoyLikelihood(int $var)

Joy likelihood.

int
getSorrowLikelihood()

Sorrow likelihood.

setSorrowLikelihood(int $var)

Sorrow likelihood.

int
getAngerLikelihood()

Anger likelihood.

setAngerLikelihood(int $var)

Anger likelihood.

int
getSurpriseLikelihood()

Surprise likelihood.

setSurpriseLikelihood(int $var)

Surprise likelihood.

int
getUnderExposedLikelihood()

Under-exposed likelihood.

setUnderExposedLikelihood(int $var)

Under-exposed likelihood.

int
getBlurredLikelihood()

Blurred likelihood.

setBlurredLikelihood(int $var)

Blurred likelihood.

int
getHeadwearLikelihood()

Headwear likelihood.

setHeadwearLikelihood(int $var)

Headwear likelihood.

Details

at line 125
__construct()

at line 142
BoundingPoly getBoundingPoly()

The bounding polygon around the face. The coordinates of the bounding box are in the original image's scale, as returned in ImageParams.

The bounding box is computed to "frame" the face in accordance with human expectations. It is based on the landmarker results. Note that one or more x and/or y coordinates may not be generated in the BoundingPoly (the polygon will be unbounded) if only a partial face appears in the image to be annotated.

Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_poly = 1;

Return Value

BoundingPoly

at line 159
setBoundingPoly(BoundingPoly $var)

The bounding polygon around the face. The coordinates of the bounding box are in the original image's scale, as returned in ImageParams.

The bounding box is computed to "frame" the face in accordance with human expectations. It is based on the landmarker results. Note that one or more x and/or y coordinates may not be generated in the BoundingPoly (the polygon will be unbounded) if only a partial face appears in the image to be annotated.

Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_poly = 1;

Parameters

BoundingPoly $var

at line 176
BoundingPoly getFdBoundingPoly()

The fd_bounding_poly bounding polygon is tighter than the boundingPoly, and encloses only the skin part of the face. Typically, it is used to eliminate the face from any image analysis that detects the "amount of skin" visible in an image. It is not based on the landmarker results, only on the initial face detection, hence the fd (face detection) prefix.

Generated from protobuf field .google.cloud.vision.v1.BoundingPoly fd_bounding_poly = 2;

Return Value

BoundingPoly

at line 192
setFdBoundingPoly(BoundingPoly $var)

The fd_bounding_poly bounding polygon is tighter than the boundingPoly, and encloses only the skin part of the face. Typically, it is used to eliminate the face from any image analysis that detects the "amount of skin" visible in an image. It is not based on the landmarker results, only on the initial face detection, hence the fd (face detection) prefix.

Generated from protobuf field .google.cloud.vision.v1.BoundingPoly fd_bounding_poly = 2;

Parameters

BoundingPoly $var

at line 204
RepeatedField getLandmarks()

Detected face landmarks.

Generated from protobuf field repeated .google.cloud.vision.v1.FaceAnnotation.Landmark landmarks = 3;

Return Value

RepeatedField

at line 215
setLandmarks(array|RepeatedField $var)

Detected face landmarks.

Generated from protobuf field repeated .google.cloud.vision.v1.FaceAnnotation.Landmark landmarks = 3;

Parameters

array|RepeatedField $var

at line 229
float getRollAngle()

Roll angle, which indicates the amount of clockwise/anti-clockwise rotation of the face relative to the image vertical about the axis perpendicular to the face. Range [-180,180].

Generated from protobuf field float roll_angle = 4;

Return Value

float

at line 242
setRollAngle(float $var)

Roll angle, which indicates the amount of clockwise/anti-clockwise rotation of the face relative to the image vertical about the axis perpendicular to the face. Range [-180,180].

Generated from protobuf field float roll_angle = 4;

Parameters

float $var

at line 256
float getPanAngle()

Yaw angle, which indicates the leftward/rightward angle that the face is pointing relative to the vertical plane perpendicular to the image. Range [-180,180].

Generated from protobuf field float pan_angle = 5;

Return Value

float

at line 269
setPanAngle(float $var)

Yaw angle, which indicates the leftward/rightward angle that the face is pointing relative to the vertical plane perpendicular to the image. Range [-180,180].

Generated from protobuf field float pan_angle = 5;

Parameters

float $var

at line 282
float getTiltAngle()

Pitch angle, which indicates the upwards/downwards angle that the face is pointing relative to the image's horizontal plane. Range [-180,180].

Generated from protobuf field float tilt_angle = 6;

Return Value

float

at line 294
setTiltAngle(float $var)

Pitch angle, which indicates the upwards/downwards angle that the face is pointing relative to the image's horizontal plane. Range [-180,180].

Generated from protobuf field float tilt_angle = 6;

Parameters

float $var

at line 306
float getDetectionConfidence()

Detection confidence. Range [0, 1].

Generated from protobuf field float detection_confidence = 7;

Return Value

float

at line 317
setDetectionConfidence(float $var)

Detection confidence. Range [0, 1].

Generated from protobuf field float detection_confidence = 7;

Parameters

float $var

at line 329
float getLandmarkingConfidence()

Face landmarking confidence. Range [0, 1].

Generated from protobuf field float landmarking_confidence = 8;

Return Value

float

at line 340
setLandmarkingConfidence(float $var)

Face landmarking confidence. Range [0, 1].

Generated from protobuf field float landmarking_confidence = 8;

Parameters

float $var

at line 352
int getJoyLikelihood()

Joy likelihood.

Generated from protobuf field .google.cloud.vision.v1.Likelihood joy_likelihood = 9;

Return Value

int

at line 363
setJoyLikelihood(int $var)

Joy likelihood.

Generated from protobuf field .google.cloud.vision.v1.Likelihood joy_likelihood = 9;

Parameters

int $var

at line 375
int getSorrowLikelihood()

Sorrow likelihood.

Generated from protobuf field .google.cloud.vision.v1.Likelihood sorrow_likelihood = 10;

Return Value

int

at line 386
setSorrowLikelihood(int $var)

Sorrow likelihood.

Generated from protobuf field .google.cloud.vision.v1.Likelihood sorrow_likelihood = 10;

Parameters

int $var

at line 398
int getAngerLikelihood()

Anger likelihood.

Generated from protobuf field .google.cloud.vision.v1.Likelihood anger_likelihood = 11;

Return Value

int

at line 409
setAngerLikelihood(int $var)

Anger likelihood.

Generated from protobuf field .google.cloud.vision.v1.Likelihood anger_likelihood = 11;

Parameters

int $var

at line 421
int getSurpriseLikelihood()

Surprise likelihood.

Generated from protobuf field .google.cloud.vision.v1.Likelihood surprise_likelihood = 12;

Return Value

int

at line 432
setSurpriseLikelihood(int $var)

Surprise likelihood.

Generated from protobuf field .google.cloud.vision.v1.Likelihood surprise_likelihood = 12;

Parameters

int $var

at line 444
int getUnderExposedLikelihood()

Under-exposed likelihood.

Generated from protobuf field .google.cloud.vision.v1.Likelihood under_exposed_likelihood = 13;

Return Value

int

at line 455
setUnderExposedLikelihood(int $var)

Under-exposed likelihood.

Generated from protobuf field .google.cloud.vision.v1.Likelihood under_exposed_likelihood = 13;

Parameters

int $var

at line 467
int getBlurredLikelihood()

Blurred likelihood.

Generated from protobuf field .google.cloud.vision.v1.Likelihood blurred_likelihood = 14;

Return Value

int

at line 478
setBlurredLikelihood(int $var)

Blurred likelihood.

Generated from protobuf field .google.cloud.vision.v1.Likelihood blurred_likelihood = 14;

Parameters

int $var

at line 490
int getHeadwearLikelihood()

Headwear likelihood.

Generated from protobuf field .google.cloud.vision.v1.Likelihood headwear_likelihood = 15;

Return Value

int

at line 501
setHeadwearLikelihood(int $var)

Headwear likelihood.

Generated from protobuf field .google.cloud.vision.v1.Likelihood headwear_likelihood = 15;

Parameters

int $var