16 #ifndef __VISAGERENDERING_H__
17 #define __VISAGERENDERING_H__
33 #import <OpenGLES/EAGL.h>
34 #import <OpenGLES/ES1/gl.h>
35 #import <OpenGLES/ES1/glext.h>
44 #include <OpenGL/gl.h>
45 #include <OpenGL/glu.h>
46 #include <GLUT/glut.h>
55 #define DISPLAY_FEATURE_POINTS 1
56 #define DISPLAY_SPLINES 2
57 #define DISPLAY_GAZE 4
58 #define DISPLAY_IRIS 8
59 #define DISPLAY_AXES 16
60 #define DISPLAY_FRAME 32
61 #define DISPLAY_WIRE_FRAME 64
62 #define DISPLAY_TRACKING_QUALITY 128
63 #define DISPLAY_POINT_QUALITY 256
64 #define DISPLAY_AGE 512
65 #define DISPLAY_GENDER 1024
66 #define DISPLAY_EMOTIONS 2048
67 #define DISPLAY_ACTION_UNITS 4096
68 #define DISPLAY_DEFAULT DISPLAY_FEATURE_POINTS + DISPLAY_SPLINES + DISPLAY_GAZE + DISPLAY_IRIS + DISPLAY_AXES + DISPLAY_FRAME + DISPLAY_TRACKING_QUALITY + DISPLAY_POINT_QUALITY
70 #define TRACK_STAT_OK 1
72 #if defined (IOS) || defined(ANDROID)
73 void gluLookAt(GLfloat eyex, GLfloat eyey, GLfloat eyez,
74 GLfloat centerx, GLfloat centery, GLfloat centerz,
75 GLfloat upx, GLfloat upy, GLfloat upz);
96 static void DisplayResults(
FaceData* trackingData,
int trackStat,
int width,
int height,
VsImage* frame,
int drawingOptions = DISPLAY_DEFAULT);
167 static void CalcSpline(std::vector <float>& inputPoints,
int ratio, std::vector<float>& outputPoints);
187 static void DisplayText(
const char* displayText,
float effectValue,
float scale = 1.0f);
206 #endif //__VISAGERENDERING_H__
static void DisplayResults(FaceData *trackingData, int trackStat, int width, int height, VsImage *frame, int drawingOptions=DISPLAY_DEFAULT)
Method calls other methods for drawing the frame and tracking results.
VisageRendering displays the current frame and the following tracking results using OpenGL...
static void DisplayGaze(FaceData *trackingData, int width, int height)
Method draws the gaze direction.
static void DisplayModelAxes(FaceData *trackingData, int width, int height)
Method draws model axes.
static void DisplaySplines(FaceData *trackingData, int width, int height)
Method draws splines.
static void DisplayTrackingQualityBar(FaceData *trackingData)
Method draws a bar in the lower left corner indicating tracking quality value.
static void DisplayFrame(const VsImage *image, int width, int height)
Method draws the current frame.
static void DisplayWireFrame(FaceData *trackingData, int width, int height, float alpha=1.0f)
Method draws face model.
static void DisplayText(const char *displayText, float effectValue, float scale=1.0f)
Method used to display text with animation (fade in or fade out effect)
static void SetFontTexture(const VsImage *font_tex)
Method sets font texture.
static void DisplayFeaturePoints(FaceData *trackingData, int width, int height, VsImage *frame, bool _3D=false, bool relative=false, bool drawQuality=true)
Method draws facial feature points.
static void DisplayImage(VsImage *image, float effectValue, bool imageChanged)
Method used to display image with animation (fade in or fade out effect)
static void DisplayActionUnits(FaceData *trackingData, int width, int height)
Method draws action units.
Face data structure, used as container for all face tracking and detection results.
static void DisplayIrises(FaceData *trackingData, int width, int height, VsImage *frame)
Method draws the circle around irises.
static void DisplayLogo(const VsImage *logo, int width, int height)
Method draws a logo in the upper right corner.
static void CalcSpline(std::vector< float > &inputPoints, int ratio, std::vector< float > &outputPoints)
Method returns vector of calculated spline points.