#[non_exhaustive]pub struct FaceAnnotation {Show 15 fields
pub bounding_poly: Option<BoundingPoly>,
pub fd_bounding_poly: Option<BoundingPoly>,
pub landmarks: Vec<Landmark>,
pub roll_angle: f32,
pub pan_angle: f32,
pub tilt_angle: f32,
pub detection_confidence: f32,
pub landmarking_confidence: f32,
pub joy_likelihood: Likelihood,
pub sorrow_likelihood: Likelihood,
pub anger_likelihood: Likelihood,
pub surprise_likelihood: Likelihood,
pub under_exposed_likelihood: Likelihood,
pub blurred_likelihood: Likelihood,
pub headwear_likelihood: Likelihood,
/* private fields */
}Expand description
A face annotation object contains the results of face detection.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.bounding_poly: Option<BoundingPoly>The bounding polygon around the face. The coordinates of the bounding box
are in the original image’s scale.
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.
fd_bounding_poly: Option<BoundingPoly>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 <code>fd</code> (face detection) prefix.
landmarks: Vec<Landmark>Detected face landmarks.
roll_angle: f32Roll 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].
pan_angle: f32Yaw angle, which indicates the leftward/rightward angle that the face is pointing relative to the vertical plane perpendicular to the image. Range [-180,180].
tilt_angle: f32Pitch angle, which indicates the upwards/downwards angle that the face is pointing relative to the image’s horizontal plane. Range [-180,180].
detection_confidence: f32Detection confidence. Range [0, 1].
landmarking_confidence: f32Face landmarking confidence. Range [0, 1].
joy_likelihood: LikelihoodJoy likelihood.
sorrow_likelihood: LikelihoodSorrow likelihood.
anger_likelihood: LikelihoodAnger likelihood.
surprise_likelihood: LikelihoodSurprise likelihood.
under_exposed_likelihood: LikelihoodUnder-exposed likelihood.
blurred_likelihood: LikelihoodBlurred likelihood.
headwear_likelihood: LikelihoodHeadwear likelihood.
Implementations§
Source§impl FaceAnnotation
impl FaceAnnotation
pub fn new() -> Self
Sourcepub fn set_bounding_poly<T>(self, v: T) -> Selfwhere
T: Into<BoundingPoly>,
pub fn set_bounding_poly<T>(self, v: T) -> Selfwhere
T: Into<BoundingPoly>,
Sets the value of bounding_poly.
Sourcepub fn set_or_clear_bounding_poly<T>(self, v: Option<T>) -> Selfwhere
T: Into<BoundingPoly>,
pub fn set_or_clear_bounding_poly<T>(self, v: Option<T>) -> Selfwhere
T: Into<BoundingPoly>,
Sets or clears the value of bounding_poly.
Sourcepub fn set_fd_bounding_poly<T>(self, v: T) -> Selfwhere
T: Into<BoundingPoly>,
pub fn set_fd_bounding_poly<T>(self, v: T) -> Selfwhere
T: Into<BoundingPoly>,
Sets the value of fd_bounding_poly.
Sourcepub fn set_or_clear_fd_bounding_poly<T>(self, v: Option<T>) -> Selfwhere
T: Into<BoundingPoly>,
pub fn set_or_clear_fd_bounding_poly<T>(self, v: Option<T>) -> Selfwhere
T: Into<BoundingPoly>,
Sets or clears the value of fd_bounding_poly.
Sourcepub fn set_landmarks<T, V>(self, v: T) -> Self
pub fn set_landmarks<T, V>(self, v: T) -> Self
Sets the value of landmarks.
Sourcepub fn set_roll_angle<T: Into<f32>>(self, v: T) -> Self
pub fn set_roll_angle<T: Into<f32>>(self, v: T) -> Self
Sets the value of roll_angle.
Sourcepub fn set_pan_angle<T: Into<f32>>(self, v: T) -> Self
pub fn set_pan_angle<T: Into<f32>>(self, v: T) -> Self
Sets the value of pan_angle.
Sourcepub fn set_tilt_angle<T: Into<f32>>(self, v: T) -> Self
pub fn set_tilt_angle<T: Into<f32>>(self, v: T) -> Self
Sets the value of tilt_angle.
Sourcepub fn set_detection_confidence<T: Into<f32>>(self, v: T) -> Self
pub fn set_detection_confidence<T: Into<f32>>(self, v: T) -> Self
Sets the value of detection_confidence.
Sourcepub fn set_landmarking_confidence<T: Into<f32>>(self, v: T) -> Self
pub fn set_landmarking_confidence<T: Into<f32>>(self, v: T) -> Self
Sets the value of landmarking_confidence.
Sourcepub fn set_joy_likelihood<T: Into<Likelihood>>(self, v: T) -> Self
pub fn set_joy_likelihood<T: Into<Likelihood>>(self, v: T) -> Self
Sets the value of joy_likelihood.
Sourcepub fn set_sorrow_likelihood<T: Into<Likelihood>>(self, v: T) -> Self
pub fn set_sorrow_likelihood<T: Into<Likelihood>>(self, v: T) -> Self
Sets the value of sorrow_likelihood.
Sourcepub fn set_anger_likelihood<T: Into<Likelihood>>(self, v: T) -> Self
pub fn set_anger_likelihood<T: Into<Likelihood>>(self, v: T) -> Self
Sets the value of anger_likelihood.
Sourcepub fn set_surprise_likelihood<T: Into<Likelihood>>(self, v: T) -> Self
pub fn set_surprise_likelihood<T: Into<Likelihood>>(self, v: T) -> Self
Sets the value of surprise_likelihood.
Sourcepub fn set_under_exposed_likelihood<T: Into<Likelihood>>(self, v: T) -> Self
pub fn set_under_exposed_likelihood<T: Into<Likelihood>>(self, v: T) -> Self
Sets the value of under_exposed_likelihood.
Sourcepub fn set_blurred_likelihood<T: Into<Likelihood>>(self, v: T) -> Self
pub fn set_blurred_likelihood<T: Into<Likelihood>>(self, v: T) -> Self
Sets the value of blurred_likelihood.
Sourcepub fn set_headwear_likelihood<T: Into<Likelihood>>(self, v: T) -> Self
pub fn set_headwear_likelihood<T: Into<Likelihood>>(self, v: T) -> Self
Sets the value of headwear_likelihood.
Trait Implementations§
Source§impl Clone for FaceAnnotation
impl Clone for FaceAnnotation
Source§fn clone(&self) -> FaceAnnotation
fn clone(&self) -> FaceAnnotation
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more