Enables detection of various facial gestures for a given Face
object.
Use of the FaceGestures
module also requires the FaceTracking
module to be imported.
This module exposes no properties.
Method | Description |
---|---|
| hasEyebrowsFrowned(face: Face, config?: {backlash?: number, observationPeriod?: number, threshold?: number}): BoolSignal Returns a BoolSignal that indicates whether the specified Face has frowned eyebrows.
The JSON formatted config object can have the following fields:
|
| hasEyebrowsRaised(face: Face, config?: {backlash?: number, observationPeriod?: number, threshold?: number}): BoolSignal Returns a BoolSignal that indicates whether the specified Face has raised eyebrows.
The JSON formatted config object can have the following fields:
|
| hasLeftEyeClosed(face: Face, config?: {angle?: number, backlash?: number}): BoolSignal Returns a BoolSignal that indicates whether the specified Face has the left eye closed.The signal returns true when the left Eye object's openness value is equal to the default threshold value, and false when it is equal to threshold - backlash .
The JSON formatted config object can have the following fields:
|
| hasMouthOpen(face: Face, config?: {angle?: number, backlash?: number}): BoolSignal Returns a BoolSignal that indicates whether the specified Face has an open mouth.The signal returns true when the Mouth openness value is equal to the default threshold value, and false when it is equal to threshold - backlash .
The JSON formatted config object can have the following fields:
|
| hasRightEyeClosed(face: Face, config?: {angle?: number, backlash?: number}): BoolSignal Returns a BoolSignal that indicates whether the specified Face has the right eye closed.The signal returns true when the right Eye object's openness value is equal to the default threshold value, and false when it is equal to threshold - backlash .
The JSON formatted config object can have the following fields:
|
| isHappy(face: Face): BoolSignal Returns a BoolSignal that indicates whether the specified Face has a happy expression.
|
| isKissing(face: Face): BoolSignal Returns a BoolSignal that indicates whether the specified Face is making a kissing gesture.
|
| isLeanedBack(face: Face, config?: {angle?: number, backlash?: number}): BoolSignal Returns a BoolSignal that indicates whether the specified Face is leaning backward.The signal returns true when the face rotation is equal to the default angle value, and false when it is equal to angle - backlash .
The JSON formatted config object can have the following fields:
|
| isLeanedForward(face: Face, config?: {angle?: number, backlash?: number}): BoolSignal Returns a BoolSignal that indicates whether the specified Face is leaning forward.The signal returns true when the face rotation is equal to the default angle value, and false when it is equal to angle - backlash .
The JSON formatted config object can have the following fields:
|
| isLeanedLeft(face: Face, config?: {angle?: number, backlash?: number}): BoolSignal Returns a BoolSignal that indicates whether the specified Face is leaning to the left.The signal returns true when the face rotation is equal to the default angle value, and false when it is equal to angle - backlash .
The JSON formatted config object can have the following fields:
|
| isLeanedRight(face: Face, config?: {angle?: number, backlash?: number}): BoolSignal Returns a BoolSignal that indicates whether the specified Face is leaning to the right.The signal returns true when the face rotation is equal to the default angle value, and false when it is equal to angle - backlash .
The JSON formatted config object can have the following fields:
|
| isSmiling(face: Face, config?: {backlash?: number, lipMix?: number, threshold?: number}): BoolSignal Returns a BoolSignal that indicates whether the specified Face is smiling.The signal returns true when the curvature mix of the detected Face object's mouth is equal to the default threshold value, and false when the curvature mix is equal to threshold - backlash .The curvature mix is determined with the following calculation: (Face.mouth.upperLipCurvature(1 - lipMix)) .
The JSON formatted config object can have the following fields:
|
| isSurprised(face: Face): BoolSignal Returns a BoolSignal that indicates whether the specified Face has a surprised expression.
|
| isTurnedLeft(face: Face, config?: {angle?: number, backlash?: number}): BoolSignal Returns a BoolSignal that indicates whether the specified Face is rotated to the left.The signal returns true when the face rotation is equal to the default angle value, and false when it is equal to angle - backlash .
The JSON formatted config object can have the following fields:
|
| isTurnedRight(face: Face, config?: {angle?: number, backlash?: number}): BoolSignal Returns a BoolSignal that indicates whether the specified Face is rotated to the right.The signal returns true when the face rotation is equal to the default angle , and false when it is equal to angle - backlash .
The JSON formatted config object can have the following fields:
|
| onBlink(face: Face, config?: {backlash?: number, threshold?: number}): EventSource<void> Returns an EventSource that fires immediately after both eyes of the specified Face are closed.The event fires when the eyes' openness value is equal to the default threshold value, and ends when it is equal to threshold - backlash .
The JSON formatted config object can have the following fields:
|
| onNod(face: Face, config?: {angle?: number, period?: number, swings?: number}): EventSource<void> Returns an EventSource that fires immediately after a head nod is detected on the specified Face .A head nod is defined as a series of consecutive head swings upwards and downwards, with the first movement being downwards. By default a head swing is detected when the head rotates around the X axis within 45 degrees (approximately 0.78 radians) from one direction to the other before returning to the center.
The JSON formatted config object can have the following fields:
|
| onShake(face: Face, config?: {angle?: number, period?: number, swings?: number}): EventSource<void> Returns an EventSource that fires immediately after a head shake is detected on the specified Face .A head shake is defined as a series of consecutive head swings from left to right or right to left. By default, a head swing is detected when the head rotates around the Y axis within 45 degrees (approximately 0.78 radians) from one direction to the other before returning to the center.
The JSON formatted config object can have the following fields:
|
This module exposes no classes.