visageSDK
Public Member Functions | Static Public Attributes | List of all members
VisageSDK::VisageLivenessBrowRaise Class Reference

VisageLivenessBrowRaise is a class that detects whether the person on the live video stream has raised his/hers eyebrows. More...

#include <VisageLivenessBrowRaise.h>

Inheritance diagram for VisageSDK::VisageLivenessBrowRaise:
VisageSDK::VisageLivenessAction

Public Member Functions

 VisageLivenessBrowRaise ()
 Constructor.
 
 ~VisageLivenessBrowRaise ()
 Destructor.
 
int update (const FaceData *faceData, VsImage *)
 Method that should be called for each frame until the action is verified. More...
 
void reset ()
 Resets action. More...
 

Static Public Attributes

static const int STATE_WAIT_FOR_FRONTAL = 1
 Describes action's state where face in the frame is not frontal (head rotations larger than 0.3 rad, ~17 degrees). More...
 
static const int STATE_ACTION_INITIALIZING = 2
 Describes action's state while the action is initializing, i.e. More...
 
static const int STATE_WAIT_FOR_STABLE = 3
 Describes action's state when user is not keeping his head still.
 
static const int STATE_WAIT_FOR_ACTION = 4
 Describes action's state when eyebrows raise is trying to be verified.
 
- Static Public Attributes inherited from VisageSDK::VisageLivenessAction
static const int STATE_ACTION_VERIFIED = 0
 Describes action's state where the action was performed and verified.
 

Detailed Description

VisageLivenessBrowRaise is a class that detects whether the person on the live video stream has raised his/hers eyebrows.

In order for action to be detected accurately, it is required that the face is frontal and facial expression is neutral for 30 frames before performing eyebrows raise.
During eyebrows raise verification, face data from latest 30 frames ("face data sequence"), i.e. last 30 calls of update() is used to verify head stability (STATE_WAIT_FOR_STABLE). Each time the action is reset, face data sequence will be cleared and the action will need to go through initializing state (STATE_ACTION_INITIALIZING) to store initial face data sequence. Additionally, face data sequence is used as a baseline for neutral facial expression when detecting if eyebrows raise was performed. Algorithm presumes that the face will be neutral before performing eyebrows raise.

Action should be updated for each frame in order to update its internal state. The action can be in one of the following states (states are sequentially verified in each call of update()):

  1. STATE_WAIT_FOR_FRONTAL Face is not frontal. Action is reset.
  2. STATE_ACTION_INITIALIZING Action is storing first set of face data sequence. After each reset, action needs to reinitialize.
  3. STATE_WAIT_FOR_STABLE Head is not stable. In order for action to be verified successfully, the user should keep his head still.
  4. STATE_WAIT_FOR_ACTION Data is processed in order to verify eyebrows raise.
  5. STATE_ACTION_VERIFIED Action is verified.

Definition at line 56 of file VisageLivenessBrowRaise.h.

Member Function Documentation

void VisageSDK::VisageLivenessBrowRaise::reset ( )
virtual

Resets action.

Clears face data sequence.

Implements VisageSDK::VisageLivenessAction.

int VisageSDK::VisageLivenessBrowRaise::update ( const FaceData *  faceData,
VsImage *   
)
virtual

Method that should be called for each frame until the action is verified.

It should only be called when tracking status is TRACK_STAT_OK. Returns action's current state so appropriate message and/or image can be displayed if user interaction is required (e.g. warning for user or instruction on how to perform eyebrows raise).

Parameters
faceDataface data obtained from the tracker
frameoptional image to display
Returns
action's current state. State can be one of the following:
  • STATE_WAIT_FOR_FRONTAL, STATE_ACTION_INITIALIZING, STATE_WAIT_FOR_STABLE, STATE_WAIT_FOR_ACTION, STATE_ACTION_VERIFIED.

Implements VisageSDK::VisageLivenessAction.

Member Data Documentation

const int VisageSDK::VisageLivenessBrowRaise::STATE_ACTION_INITIALIZING = 2
static

Describes action's state while the action is initializing, i.e.

storing initial face data sequence. After each reset, action needs to reinitialize.

Definition at line 94 of file VisageLivenessBrowRaise.h.

const int VisageSDK::VisageLivenessBrowRaise::STATE_WAIT_FOR_FRONTAL = 1
static

Describes action's state where face in the frame is not frontal (head rotations larger than 0.3 rad, ~17 degrees).

If this state is detected, the action will be reset.

Definition at line 88 of file VisageLivenessBrowRaise.h.


The documentation for this class was generated from the following file: