18 #ifndef _FACEANALYSER_H
19 #define _FACEANALYSER_H
23 #define VISAGE_ANALYSER_DECLSPEC
26 #ifdef VISAGE_ANALYSER_EXPORTS
27 #define VISAGE_ANALYSER_DECLSPEC __declspec(dllexport)
29 #define VISAGE_ANALYSER_DECLSPEC __declspec(dllimport)
34 #define VFA_MAX_FACES 20
49 class SmoothingFilter;
50 class VFAConcatenatedInstance;
52 const int VFA_EMOTIONS_COUNT = 7;
114 bool ageValid =
false;
116 bool genderValid =
false;
117 std::array<float, VFA_EMOTIONS_COUNT> emotionProbabilities = { 0.0 };
118 bool emotionsValid =
false;
122 int VISAGE_DECLSPEC initializeLicenseManager(
const char *licenseKeyFileFolder);
214 int init(
const char* dataPath);
371 void resetStreamAnalysis(
const int faceIndex = -1);
375 std::array<int, VFA_MAX_FACES> m_analyserOptions;
377 VFAConcatenatedInstance* m_emotionRuntime;
379 VNN::INNFrontend* m_ageFrontend;
380 VNN::INNRunner* m_ageRunner;
382 VNN::INNFrontend* m_genderFrontend;
383 VNN::INNRunner* m_genderRunner;
385 std::array<ScoreFilter*, VFA_MAX_FACES> m_scoreFilter;
386 std::array<std::deque<std::array<float, VFA_EMOTIONS_COUNT>>, VFA_MAX_FACES> m_emotionFilter;
388 void estimateAgeAndGender(
const VsImage* frame,
const FaceData &facedata,
const int options,
AnalysisData& results);
391 std::array<float, VFA_EMOTIONS_COUNT> getAverageEmotions(
const int faceIndex);
393 const int EMOTION_WINDOW = 500;
397 #endif //_FACEANALYSER_H
@ NoError
the function has executed successfully
VisageFaceAnalyser contains face analysis algorithms capable of estimating age, gender and emotion fr...
@ Happiness
Emotion index 3.
@ Sadness
Emotion index 4.
Analysis data structure, used as a container for all face analysis results.
@ InvalidFrame
the image pointer or the related data may be null
@ Neutral
Emotion index 6.
VFAFlags
VFAFlags are used to describe whether age, gender and/or emotion data have been loaded succesfully or...
@ VFA_GENDER
enable gender estimation or check whether gender data files have been properly initialized
const VISAGE_DECLSPEC char * getVisageSDKVersion(void)
Returns visageSDK version and revision number.
@ Surprise
Emotion index 5.
VFAEmotionIndices
VFAEmotionIndices enumeration facilitates easier access to a specific emotion, particularly when iter...
VFAReturnCode
Enumeration describing potential outcomes of the VisageFaceAnalyser::analyseImage() and VisageFaceAna...
@ InvalidFaceData
the FaceData has not been initialized by a previous tracking or detection operation
@ InvalidLicense
the license may be missing, invalid file name passed, expired or another related error
@ VFA_AGE
enable age estimation or check whether age data files have been properly initialized
@ DataUninitialized
VisageFaceAnalyser was not properly initialized by a call to Init() method, or required data files we...
@ VFA_EMOTION
enable emotion estimation or check whether emotion data files have been properly initialized
Face data structure, used as container for all face tracking and detection results.
@ Disgust
Emotion index 1.