FacialExpressionDetection.h File Reference
#include "IEmoStateDLL.h"

Go to the source code of this file.

Macros

#define EDK_API
 

Typedefs

typedef void * EmoEngineEventHandle
 Handle to EmoEngine event structure allocated by IEE_EmoEngineEventCreate. More...
 
typedef enum IEE_FacialExpressionThreshold_enum IEE_FacialExpressionThreshold_t
 FacialExpression Suite threshold type enumerator. More...
 
typedef enum IEE_FacialExpressionTrainingControl_enum IEE_FacialExpressionTrainingControl_t
 FacialExpression Suite training control enumerator. More...
 
typedef enum IEE_FacialExpressionSignature_enum IEE_FacialExpressionSignature_t
 FacialExpression Suite signature type enumerator. More...
 
typedef enum IEE_FacialExpressionEvent_enum IEE_FacialExpressionEvent_t
 FacialExpression event types. More...
 

Enumerations

enum  IEE_FacialExpressionThreshold_enum { FE_SENSITIVITY }
 FacialExpression Suite threshold type enumerator. More...
 
enum  IEE_FacialExpressionTrainingControl_enum {
  FE_NONE = 0, FE_START, FE_ACCEPT, FE_REJECT,
  FE_ERASE, FE_RESET
}
 FacialExpression Suite training control enumerator. More...
 
enum  IEE_FacialExpressionSignature_enum { FE_SIG_UNIVERSAL = 0, FE_SIG_TRAINED }
 FacialExpression Suite signature type enumerator. More...
 
enum  IEE_FacialExpressionEvent_enum {
  IEE_FacialExpressionNoEvent = 0, IEE_FacialExpressionTrainingStarted, IEE_FacialExpressionTrainingSucceeded, IEE_FacialExpressionTrainingFailed,
  IEE_FacialExpressionTrainingCompleted, IEE_FacialExpressionTrainingDataErased, IEE_FacialExpressionTrainingRejected, IEE_FacialExpressionTrainingReset
}
 FacialExpression event types. More...
 

Functions

EDK_API IEE_FacialExpressionEvent_t IEE_FacialExpressionEventGetType (EmoEngineEventHandle hEvent)
 Return the FacialExpression-specific event type. More...
 
EDK_API int IEE_FacialExpressionSetThreshold (unsigned int userId, IEE_FacialExpressionAlgo_t algoName, IEE_FacialExpressionThreshold_t thresholdName, int value)
 Set threshold for FacialExpression algorithms. More...
 
EDK_API int IEE_FacialExpressionGetThreshold (unsigned int userId, IEE_FacialExpressionAlgo_t algoName, IEE_FacialExpressionThreshold_t thresholdName, int *pValueOut)
 Get threshold from FacialExpression algorithms. More...
 
EDK_API int IEE_FacialExpressionSetTrainingAction (unsigned int userId, IEE_FacialExpressionAlgo_t action)
 Set the current facial expression for FacialExpression training. More...
 
EDK_API int IEE_FacialExpressionSetTrainingControl (unsigned int userId, IEE_FacialExpressionTrainingControl_t control)
 Set the control flag for FacialExpression training. More...
 
EDK_API int IEE_FacialExpressionGetTrainingAction (unsigned int userId, IEE_FacialExpressionAlgo_t *pActionOut)
 Get the facial expression currently selected for FacialExpression training. More...
 
EDK_API int IEE_FacialExpressionGetTrainingTime (unsigned int userId, unsigned int *pTrainingTimeOut)
 Return the duration of a FacialExpression training session. More...
 
EDK_API int IEE_FacialExpressionGetTrainedSignatureActions (unsigned int userId, unsigned long *pTrainedActionsOut)
 Get a list of expressions that have been trained by the user. More...
 
EDK_API int IEE_FacialExpressionGetTrainedSignatureAvailable (unsigned int userId, int *pfAvailableOut)
 Check if the user has trained sufficient actions to activate a trained signature. More...
 
EDK_API int IEE_FacialExpressionSetSignatureType (unsigned int userId, IEE_FacialExpressionSignature_t sigType)
 Configure the FacialExpression suite to use either the built-in, universal signature or a personal, trained signature. More...
 
EDK_API int IEE_FacialExpressionGetSignatureType (unsigned int userId, IEE_FacialExpressionSignature_t *pSigTypeOut)
 Check whether the FacialExpression suite is currently using either the built-in, universal signature or a trained signature. More...
 

Detailed Description

Emotiv SDK Copyright (c) 2016 Emotiv Inc.

This file is part of the Emotiv SDK.

Header file for Facial Expression related API.

Macro Definition Documentation

#define EDK_API

Typedef Documentation

typedef void* EmoEngineEventHandle

Handle to EmoEngine event structure allocated by IEE_EmoEngineEventCreate.

See also
IEE_EmoEngineEventCreate()

FacialExpression event types.

FacialExpression Suite signature type enumerator.

FacialExpression Suite threshold type enumerator.

FacialExpression Suite training control enumerator.

Enumeration Type Documentation

FacialExpression event types.

Enumerator
IEE_FacialExpressionNoEvent 

No new event.

IEE_FacialExpressionTrainingStarted 

The training has begun after FE_START is sent.

IEE_FacialExpressionTrainingSucceeded 

The training is succeeded, waiting for FE_ACCEPT or FE_REJECT.

IEE_FacialExpressionTrainingFailed 

The training is failed due to signal issues. Please restart training.

IEE_FacialExpressionTrainingCompleted 

The training is completed after FE_ACCEPT is sent.

IEE_FacialExpressionTrainingDataErased 

The training data for a particular facial expression has been erased by FE_ERASE.

IEE_FacialExpressionTrainingRejected 

The training is rejected after FE_REJECT is sent.

IEE_FacialExpressionTrainingReset 

The training has been reset after FE_RESET is sent.

FacialExpression Suite signature type enumerator.

Enumerator
FE_SIG_UNIVERSAL 

Use built-in universal signature.

FE_SIG_TRAINED 

Use custom trained signature.

FacialExpression Suite threshold type enumerator.

Enumerator
FE_SENSITIVITY 

Sensitivity of each facial expression.

FacialExpression Suite training control enumerator.

Enumerator
FE_NONE 

No action.

FE_START 

Start a new training.

FE_ACCEPT 

Accept current training.

FE_REJECT 

Reject current training.

FE_ERASE 

Erase training data for a facial expression.

FE_RESET 

Reset current training.

Function Documentation

EDK_API IEE_FacialExpressionEvent_t IEE_FacialExpressionEventGetType ( EmoEngineEventHandle  hEvent)

Return the FacialExpression-specific event type.

Returns the FacialExpression-specific event type for an IEE_FacialExpressionEvent event already retrieved using IEE_EngineGetNextEvent().

Parameters
hEvent- a handle returned by IEE_EmoEngineEventCreate()
Returns
IEE_FacialExpressionEvent_t
EDK_API int IEE_FacialExpressionGetSignatureType ( unsigned int  userId,
IEE_FacialExpressionSignature_t pSigTypeOut 
)

Check whether the FacialExpression suite is currently using either the built-in, universal signature or a trained signature.

Blocking call

Parameters
userId- user ID
pSigTypeOut- receives the signature type currently in use
Returns
EDK_ERROR_CODE
  • EDK_OK if successful
See also
IedkErrorCode.h, IEE_FacialExpressionSignature_t
EDK_API int IEE_FacialExpressionGetThreshold ( unsigned int  userId,
IEE_FacialExpressionAlgo_t  algoName,
IEE_FacialExpressionThreshold_t  thresholdName,
int *  pValueOut 
)

Get threshold from FacialExpression algorithms.

Parameters
userId- user ID
algoName- FacialExpression algorithm type
thresholdName- FacialExpression threshold type
pValueOut- receives threshold value
Returns
EDK_ERROR_CODE
  • EDK_OK if successful
See also
IedkErrorCode.h, IEE_FacialExpressionAlgo_t, IEE_FacialExpressionThreshold_t
EDK_API int IEE_FacialExpressionGetTrainedSignatureActions ( unsigned int  userId,
unsigned long *  pTrainedActionsOut 
)

Get a list of expressions that have been trained by the user.

Blocking call

Parameters
userId- user ID
pTrainedActionsOut- receives a bit vector composed of IEE_FacialExpressionAlgo_t contants
Returns
EDK_ERROR_CODE
  • EDK_OK if successful
See also
IedkErrorCode.h, IEE_FacialExpressionAlgo_t
EDK_API int IEE_FacialExpressionGetTrainedSignatureAvailable ( unsigned int  userId,
int *  pfAvailableOut 
)

Check if the user has trained sufficient actions to activate a trained signature.

pfAvailableOut will be set to 1 if the user has trained FE_NEUTRAL and at least one other FacialExpression action. Otherwise, *pfAvailableOut == 0.

Blocking call

Parameters
userId- user ID
pfAvailableOut- receives an int that is non-zero if a trained signature can be activated
Returns
EDK_ERROR_CODE
  • EDK_OK if successful
See also
IedkErrorCode.h
EDK_API int IEE_FacialExpressionGetTrainingAction ( unsigned int  userId,
IEE_FacialExpressionAlgo_t pActionOut 
)

Get the facial expression currently selected for FacialExpression training.

Blocking call

Parameters
userId- user ID
pActionOut- receives facial expression currently selected for training
Returns
EDK_ERROR_CODE
  • EDK_OK if successful
See also
IedkErrorCode.h, IEE_FacialExpressionAlgo_t
EDK_API int IEE_FacialExpressionGetTrainingTime ( unsigned int  userId,
unsigned int *  pTrainingTimeOut 
)

Return the duration of a FacialExpression training session.

Parameters
userId- user ID
pTrainingTimeOut- receive the training time in ms
Returns
EDK_ERROR_CODE
  • EDK_OK if successful
See also
IedkErrorCode.h
EDK_API int IEE_FacialExpressionSetSignatureType ( unsigned int  userId,
IEE_FacialExpressionSignature_t  sigType 
)

Configure the FacialExpression suite to use either the built-in, universal signature or a personal, trained signature.

Note: FacialExpression defaults to use its universal signature. This function will fail if IEE_FacialExpressionGetTrainedSignatureAvailable returns false.

Blocking call

Parameters
userId- user ID
sigType- signature type to use
Returns
EDK_ERROR_CODE
  • EDK_OK if successful
See also
IedkErrorCode.h, IEE_FacialExpressionSignature_t
EDK_API int IEE_FacialExpressionSetThreshold ( unsigned int  userId,
IEE_FacialExpressionAlgo_t  algoName,
IEE_FacialExpressionThreshold_t  thresholdName,
int  value 
)

Set threshold for FacialExpression algorithms.

Parameters
userId- user ID
algoName- FacialExpression algorithm type
thresholdName- FacialExpression threshold type
value- threshold value (min: 0, max: 1000)
Returns
EDK_ERROR_CODE
  • EDK_OK if successful
See also
IedkErrorCode.h, IEE_FacialExpressionAlgo_t, IEE_FacialExpressionThreshold_t
EDK_API int IEE_FacialExpressionSetTrainingAction ( unsigned int  userId,
IEE_FacialExpressionAlgo_t  action 
)

Set the current facial expression for FacialExpression training.

Blocking call

Parameters
userId- user ID
action- which facial expression would like to be trained
Returns
EDK_ERROR_CODE
  • EDK_OK if successful
See also
IedkErrorCode.h, IEE_FacialExpressionAlgo_t
EDK_API int IEE_FacialExpressionSetTrainingControl ( unsigned int  userId,
IEE_FacialExpressionTrainingControl_t  control 
)

Set the control flag for FacialExpression training.

Blocking call

\param userId - user ID
\param control - pre-defined control command

\return EDK_ERROR_CODE
        - EDK_OK if successful

\sa IedkErrorCode.h, IEE_FacialExpressionTrainingControl_t