visageSDK
VisageFaceAnalyser.cs
1 using System;
2 using System.Collections.Generic;
3 using System.Linq;
4 using System.Text;
5 
6 namespace VisageCSWrapper
7 {
12  public enum class VFAFlags
13  {
14  AGE = 1,
15  GENDER = 2,
16  EMOTION = 4
17  };
18 
22  public enum class VFAReturnCode
23  {
24  NO_ERROR = 0,
29  };
30 
34  public enum class VFAEmotionIndices
35  {
36  Anger = 0,
37  Disgust = 1,
38  Fear = 2,
39  Happiness = 3,
40  Sadness = 4,
41  Surprise = 5,
42  Neutral = 6
43  };
44 
45 
52  public ref struct AnalysisData
53  {
57  float age = -1.0;
58 
62  bool ageValid = false;
63 
68  int gender = -1;
69 
73  bool genderValid = false;
74 
75 
80 
84  bool emotionsValid = false;
85  };
86 
106 
113  public ref class VisageFaceAnalyser
114  {
118  public VisageFaceAnalyser();
119 
124  public VisageFaceAnalyser(String dataPath);
125 
126 
130  public ~VisageFaceAnalyser();
131 
160  public int Init(String dataPath);
161 
218  public VFAReturnCode analyseImage(VSImage image, FaceData facedata, int options, ref AnalysisData results);
219 
243 
246 
247 
256 
261 
299  public VFAReturnCode analyseStream(VSImage image, FaceData facedata, int options, ref AnalysisData results, int faceIndex);
300 
311  public void resetStreamAnalysis(int faceIndex);
312  }
313 }
bool ageValid
Boolean flag returning whether age estimation has been successful or not
bool emotionsValid
Boolean flag returning whether emotion estimation has been successful or not
int gender
Result of gender estimation as follows: 1 for MALE gender 0 for FEMALE gender ...
Enumeration describing potential outcomes of the VisageFaceAnalyser::analyseImage() and VisageFaceAna...
bool genderValid
Boolean flag returning whether gender estimation has been successful or not
VFAFlags
VFAFlags are used to describe whether age, gender and/or emotion data have been loaded succesfully or...
VFAReturnCode analyseImage(VSImage image, FaceData facedata, int options, ref AnalysisData results)
Performs face analysis on a given frame.
Visage Face Analyser contains face analysis algorithms for estimating gender and emotion from frontal...
Image storage class.
Definition: VSImage.cs:11
VFAReturnCode
Enumeration describing potential outcomes of the analyseImage() and analyseStream() methods...
VFAReturnCode analyseStream(VSImage image, FaceData facedata, int options, ref AnalysisData results, int faceIndex)
Performs face analysis on a given image stream (video).
float[] emotionProbabilities
Result of emotion estimation, see: VFAEmotionIndices
Face data structure, used as container for all face tracking and detection results.
Definition: FaceData.cs:205
float age
Result of age estimation
int Init(String dataPath)
Initialises VisageFaceAnalyser.
void resetStreamAnalysis(int faceIndex)
Resets collected face analysis data.
VFAEmotionIndices
VFAEmotionIndices enumeration facilitates easier access to a specific emotion, particularly when iter...