visageSDK

Public Member Functions | Static Public Attributes | List of all members
VisageSDK::VisageLivenessAction Class Referenceabstract

VisageLivenessAction is an abstract class that can be used to implement algorithm which searches for a specific pattern in live video stream in order to verify liveness. More...

`#include <VisageLivenessAction.h>`

Inheritance diagram for VisageSDK::VisageLivenessAction:

## Public Member Functions
virtual int | update (const FaceData *faceData, VsImage *frame=0)=0
| Method used to process input data in order to confirm that the action has occured. More...
virtual void | reset ()=0
| Resets action state.

## Static Public Attributes
static const int | STATE_ACTION_VERIFIED = 0
| Describes action's state where the action was performed and verified.

## Detailed Description

VisageLivenessAction is an abstract class that can be used to implement algorithm which searches for a specific pattern in live video stream in order to verify liveness.

On each call of update() method, action should process face data obtained by VisageTracker::track() and/or video frame and return action's current state. If user interaction is required, appropriate message and/or image can be displayed to user.

The action can go through different states while it is trying to be verified. VisageLivenessAction defines only final state where action is performed and verified (STATE_ACTION_VERIFIED).

Following actions are implemented :

- VisageLivenessBrowRaise - verifies that both eyebrows have been raised
- VisageLivenessSmile - verifies that the person has smiled
- VisageLivenessBlink - verifies that a blink has occurred

Definition at line 50 of file VisageLivenessAction.h.

## Member Function Documentation

## ◆ update()

virtual int VisageSDK::VisageLivenessAction::update | ( | const FaceData * | faceData,
|  | VsImage * | frame = `0`
| ) |  |
| pure virtual

Method used to process input data in order to confirm that the action has occured.

This method is supposed to be called for each frame until the action is verified. If action uses `faceData`, it should only be called when tracking status is TRACK_STAT_OK. Method should return action's current state and in case user interaction is required, appropriate message and/or image can be displayed.

Parameters

  faceData | face data of the current frame.
  frame | current frame that needs to be processed by action.

Returns
  action's current state

Implemented in VisageSDK::VisageLivenessSmile, VisageSDK::VisageLivenessBlink, and VisageSDK::VisageLivenessBrowRaise.

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

- VisageLivenessAction.h