|
visageSDK
|
Provides high-level functions for using visage|SDK face tracking capabilities in Unity game engine. More...
#include "VisageTrackerUnityShared.h"Go to the source code of this file.
Functions | |
| void | _initializeLicense (char *license) |
| Initializes the license. | |
| void | _grabFrame () |
| Grabs current frame from the camera. More... | |
| void | _initTracker (char *configuration, int numFaces) |
| Initialises the tracker with configuration file and a desired number of tracked faces. More... | |
| void | _releaseTracker () |
| Releases memory allocated by the tracker in the _initTracker function. | |
| void | _track () |
| Performs face tracking on current frame. More... | |
| void | _bindTexture (int texID) |
| Binds a texture with the given native hardware texture id through OpenGL. | |
| void | _getTrackerStatus (int *tStatus) |
| Returns tracker status. | |
| float | _getTrackingQuality (int faceIndex) |
| Estimated tracking quality for the current frame for the given faceIndex. | |
| float | _getFrameRate () |
| Returns the frame rate of the tracker, in frames per second, measured over last 10 frames. | |
| long | _getTimeStamp () |
| Returns timestamp of the current video frame, in milliseconds, measured from the moment when tracking started. | |
| int | _getFP_START_GROUP_INDEX () |
| Returns index of the first FP group. | |
| int | _getFP_END_GROUP_INDEX () |
| Returns index of the last FP group. | |
| void | _getGroupSizes (int *groupSize, int length) |
| Returns size of each FP group. | |
| int | _getFaceScale (int faceIndex) |
| Returns scale in pixels of facial bounding box for the given faceIndex. | |
| void | _getFaceBoundingBox (VsRect *rectangle, int faceIndex) |
| Returns facial bounding box for the given faceIndex. | |
| void | _getHeadTranslation (float *translation, int faceIndex) |
| Returns the current head translation in meters for the given faceIndex. | |
| void | _getHeadRotation (float *rotation, int faceIndex) |
| Returns the current head rotation in radians for the given faceIndex. | |
| void | _getHeadRotationApparent (float *rotationApparent, int faceIndex) |
| Returns the current apparent head rotation in radians for the given faceIndex. | |
| int | _getFaceModelVertexCount () |
| Returns number of vertices in the 3D face model. | |
| int | _getFaceModelTriangleCount () |
| Returns number of triangles in the 3D face model. | |
| void | _getFaceModelTriangles (int *triangles, int faceIndex) |
| Returns triangles coordinates. | |
| void | _getFaceModelVertices (float *vertices, int faceIndex) |
| Returns vertex coordinates. | |
| void | _getFaceModelVerticesProjected (float *verticesProjected, int faceIndex) |
| Returns projected (image space) vertex coordinates. | |
| void | _getFaceModelTextureCoords (float *texCoord, int faceIndex) |
| Returns texture coordinates. | |
| void | _get3DData (float *tx, float *ty, float *tz, float *rx, float *ry, float *rz, int faceIndex) |
| Returns the current head translation in meters and rotation in radians for the given faceIndex. | |
| void | _getCameraInfo (float *focus, int *ImageWidth, int *ImageHeight) |
| Returns camera info. | |
| bool | _getFaceModel (int *vertexNumber, float *vertices, float *verticesProjected, int *triangleNumber, int *triangles, float *texCoord, int faceIndex) |
| Returns data needed to draw 3D face model for the given faceIndex. | |
| void | _getTexCoordsStatic (float *buffer, int *texCoordNumber) |
| Returns static texture coordinates of the mesh. | |
| int | _getActionUnitCount () |
| Returns the action unit count. | |
| const char * | _getActionUnitName (int au_index) |
| Returns the name of the action unit with the specified index. | |
| bool | _getActionUnitUsed (int au_index) |
| Returns true if the action unit is used. | |
| void | _getActionUnitValues (float *values, int faceIndex) |
| Returns all action unit values. | |
| bool | _getGazeDirection (float *direction, int faceIndex) |
| Returns the gaze direction for the given faceIndex. | |
| bool | _getGazeDirectionGlobal (float *direction, int faceIndex) |
| Returns the global gaze direction for the given faceIndex. | |
| bool | _getEyeClosure (float *closure, int faceIndex) |
| Returns eye closure value for the given faceindex. | |
| bool | _getIrisRadius (float *radius, int faceIndex) |
| Returns iris radius values for the given faceindex. | |
| void | _getFeaturePoints2D (int N, int *groups, int *indices, float *positions, int *defined, int *detected, float *quality, int faceIndex) |
| Returns the feature point positions in normalized 2D screen coordinates, indication of whether the point is defined and detected and quality for specified feature points. More... | |
| void | _getFeaturePoints3D (int N, int *groups, int *indices, float *positions, int *defined, int *detected, float *quality, int faceIndex) |
| Returns the global 3D feature point positions, indication of whether the point is defined and detected and quality for specified feature points. More... | |
| void | _getFeaturePoints3DRelative (int N, int *groups, int *indices, float *positions, int *defined, int *detected, float *quality, int faceIndex) |
| Returns the relative 3D feature point positions, indication of whether the point is defined and detected and quality for specified feature points. More... | |
| void | _getAllFeaturePoints2D (float *positions, int len, int faceIndex) |
| Returns feature point position in normalized 2D screen coordinates, indication of whether the point is defined and detected and quality for all feature points. More... | |
| void | _getAllFeaturePoints3D (float *positions, int len, int faceIndex) |
| Returns the global feature point position, indication of whether the point is defined and detected and quality for all feature points. More... | |
| void | _getAllFeaturePoints3DRelative (float *positions, int len, int faceIndex) |
| Returns the relative 3D feature point position, indication of whether the point is defined and detected and quality for all feature points. More... | |
| void | _setTrackerConfiguration (const char *trackerConfigFile, bool au_fitting_disabled=false, bool mesh_fitting_disabled=false) |
| Sets tracking configuration. | |
| void | _setIPD (float value) |
| Sets the inter pupillary distance. | |
| float | _getIPD () |
| Returns the current inter pupillary distance (IPD) setting. | |
| bool | _frameChanged () |
| Returns true if frame parameters have changed, e.g. More... | |
Provides high-level functions for using visage|SDK face tracking capabilities in Unity game engine.
It implements high-level wrapper functions around key functionalities from visage|SDK that enable usage of visage|SDK face tracking capabilities in Unity C# scripts.
Definition in file VisageTrackerUnityPlugin.h.
| bool _frameChanged | ( | ) |
Returns true if frame parameters have changed, e.g.
due to device rotation
| void _getAllFeaturePoints2D | ( | float * | positions, |
| int | len, | ||
| int | faceIndex | ||
| ) |
Returns feature point position in normalized 2D screen coordinates, indication of whether the point is defined and detected and quality for all feature points.
| void _getAllFeaturePoints3D | ( | float * | positions, |
| int | len, | ||
| int | faceIndex | ||
| ) |
Returns the global feature point position, indication of whether the point is defined and detected and quality for all feature points.
| void _getAllFeaturePoints3DRelative | ( | float * | positions, |
| int | len, | ||
| int | faceIndex | ||
| ) |
Returns the relative 3D feature point position, indication of whether the point is defined and detected and quality for all feature points.
| void _getFeaturePoints2D | ( | int | N, |
| int * | groups, | ||
| int * | indices, | ||
| float * | positions, | ||
| int * | defined, | ||
| int * | detected, | ||
| float * | quality, | ||
| int | faceIndex | ||
| ) |
Returns the feature point positions in normalized 2D screen coordinates, indication of whether the point is defined and detected and quality for specified feature points.
| void _getFeaturePoints3D | ( | int | N, |
| int * | groups, | ||
| int * | indices, | ||
| float * | positions, | ||
| int * | defined, | ||
| int * | detected, | ||
| float * | quality, | ||
| int | faceIndex | ||
| ) |
Returns the global 3D feature point positions, indication of whether the point is defined and detected and quality for specified feature points.
| void _getFeaturePoints3DRelative | ( | int | N, |
| int * | groups, | ||
| int * | indices, | ||
| float * | positions, | ||
| int * | defined, | ||
| int * | detected, | ||
| float * | quality, | ||
| int | faceIndex | ||
| ) |
Returns the relative 3D feature point positions, indication of whether the point is defined and detected and quality for specified feature points.
| void _grabFrame | ( | ) |
Grabs current frame from the camera.
Frame from the camera is obtained using VideoInput library.
| void _initTracker | ( | char * | configuration, |
| int | numFaces | ||
| ) |
Initialises the tracker with configuration file and a desired number of tracked faces.
Number of tracked faces is limited with MAX_FACES parameter to 20.
| void _track | ( | ) |
Performs face tracking on current frame.
Before each call of the _track() function, _grabFrame() function needs to be called to obtain the new frame.
1.8.13