smilingProbability property

double? get smilingProbability

Probability that the face is smiling, 0.0 to 1.0, or null when not computed. The average of the mouthSmileLeft and mouthSmileRight blendshapes; semantics match Google ML Kit's smilingProbability.

Implementation

double? get smilingProbability {
  final FaceBlendshapes? b = _cachedBlendshapes;
  if (b == null) return null;
  final double v =
      (b[Blendshape.mouthSmileLeft] + b[Blendshape.mouthSmileRight]) / 2.0;
  return v < 0.0 ? 0.0 : (v > 1.0 ? 1.0 : v);
}