isFace90Degrees static method
Implementation
static bool isFace90Degrees(Face face) {
bool isFace90Degrees = false;
// Log the angle to debug
print("headEulerAngleY: ${face.headEulerAngleY}");
// Side profile detection threshold
const sideProfileThreshold = 50.0; // Can tune based on testing
if (face.headEulerAngleY != null) {
final angleY = face.headEulerAngleY!;
if (angleY.abs() > sideProfileThreshold) {
isFace90Degrees = true;
}
}
return isFace90Degrees;
}