|
visageSDK
|
Feature points of a face. More...
Public Member Functions | |
| FDP () | |
| Constructor. More... | |
| FDP (FDP featurePoints) | |
| Copy constructor. More... | |
| int | readFromFile (String name) |
| Read from an FDP file. More... | |
| void | saveToFile (String fileName) |
| Write feature point definitions to the FDP file, changing the FDP file name. More... | |
| FeaturePoint | getFP (int group, int n) |
| Get a feature point by its group and index. More... | |
| const FeaturePoint | getFP (String name) |
| Get a feature point by its name. More... | |
| void | setFP (int group, int n, FeaturePoint f) |
| Set a feature specified by its group and index. More... | |
| void | setFP (String name, FeaturePoint fp) |
| Set a feature specified by its name. More... | |
| float[] | getFPPos (int group, int n) |
| Get the position of a feature point specified by its group and index. More... | |
| float[] | getFPPos (String name) |
| Get the position of a feature point specified by its name. More... | |
| void | setFPPos (int group, int n, float[] pos) |
| Set the position of a feature point specified by its group and index. More... | |
| void | setFPPos (String name, float[] pos) |
| Set the position of a feature point specified by its name. More... | |
| void | setFPPos (int group, int n, float x, float y, float z) |
| Set the position of a feature point specified by its group and index. More... | |
| void | setFPPos (String name, float x, float y, float z) |
| Set the position of a feature point specified by its name. More... | |
| float | getFPQuality (int group, int n) |
| Get the quality of a feature point specified by its group and index. More... | |
| float | getFPQuality (String name) |
| Get the quality of a feature point specified by its name. More... | |
| void | setFPQuality (int group, int n, float quality) |
| Set the quality of a feature point specified by its group and index. More... | |
| void | setFPQuality (String name, float quality) |
| Set the position of a feature point specified by its name. More... | |
| void | reset () |
| Resets all feature points. More... | |
| bool | FPIsDefined (int group, int n) |
| Returns true if the feature point is defined. More... | |
| bool | FPIsDefined (String name) |
| Returns true if the feature point is defined. More... | |
| bool | FPIsDetected (int group, int n) |
| Returns true if the feature point is detected. More... | |
| bool | FPIsDetected (String name) |
| Returns true if the feature point is detected. More... | |
Static Public Member Functions | |
| static void | parseFPName (String name, ref int group, ref int n) |
| Get feature point group and index from its name. More... | |
| static String | getFPName (int group, int n) |
| Get feature point name from group and index. More... | |
| static bool | FPIsValid (int group, int n) |
| Returns true if specified feature point identifier is valid. More... | |
| static bool | FPIsValid (String name) |
| Returns true if specified feature point identifier is valid. More... | |
| static int | GroupSize (int group) |
| Get the size of the specified feature point group. More... | |
Public Attributes | |
| FeaturePoint[] | ul |
| Vertices that are part of the upper lip region. More... | |
| FeaturePoint[] | ll |
| Vertices that are part of the lower lip region. More... | |
Static Public Attributes | |
| static int | FP_START_GROUP_INDEX = 2 |
| Index of the first feature point group. | |
| static int | FP_END_GROUP_INDEX = 17 |
| Index of the last feature point group. | |
| static int | FP_NUMBER_OF_GROUPS = 16 |
| Number of groups. | |
Feature points of a face.
This class is a container for facial feature points as defined by MPEG-4 FBA standard, as well as some additional feature points. Feature points are identified by their group (for example, feature points of the nose constitute their own group) and index. So, for example, the tip of the chin belongs to group 2 and has index 1, so it is identified as point 2.1. The identification of all feature points is illustrated in the image below:
Groups 2 - 11 contain feature points defined according to the MPEG-4 FBA standard, and groups 12, 14, 16 and 17 contain additional feature points that are not part of the MPEG-4 standard (12.1, 12.5, 12.6, 12.7, 12.8, 12.9, 12.10, 12.11, 12.12, 14.1, 14.2, 14.3, 14.4, 14.5, 14.6, 14.7, 14.8, 14.9, 14.10, 14.11, 14.12, 14.21, 14.22, 14.23, 14.24, 14.25, 16.1, 16.2, 16.3, 16.4, 16.5, 16.6, 16.7, 16.8, 16.9, 16.10, 16.11, 16.12, 16.13, 16.14, 16.15, 16.16, 16.17, 16.18, 16.19, 16.20, 16.21, 16.22, 16.23, 16.24, 16.25, 16.26, 16.27, 16.28, 17.5, 17.6, 17.7, 17.8, 17.9, 17.10, 17.11, 17.12, 17.13, 17.14, 17.15, 17.16, 17.17, 17.18, 17.19, 17.20).
Group 15 contains the physical contour points (15.1-15.17). Please note that point 15.17 is exactly identical to point 2.1 (2.1 point exists for MPEG-4 compatibility purposes).
FDP class stores feature point information. It also provides functions for reading and writing the feature point data as files, as well as certain auxiliary members that deal with normalization of feature points and their classification according to facial region.
The actual data for each feature point is stored in the structure FeaturePoint. One such structure is allocated for each feature point. To access a feature point, use one of the functions getFP() that access a feature point by its group and index expressed either as integer values, or as a string (e.g. "2.1"). Functions getFPPos() are available as a convenience, to access the feature point coordinates directly, without first accessing the FeaturePoint structure.
The feature points may relate to a particular 3D model. In such a case it is interesting to know, for each feature point, to which vertex it belongs. For this purpose, the FeaturePoint structure contains the mesh identifier and vertex index that correspond to the feature point and the FDP class provides functions to access this data.
Left-right convention
References to left and right in feature point definitions are given from the perspective of the face itself so "right eye" can be imagined as "my right eye". When referring to feature points in an image, it is assumed that image is taken by camera and not mirrored so "right eye" is on the left in the image, as shown in feature points illustration above.
| VisageCSWrapper.FDP.FDP | ( | ) |
Constructor.
Creates an empty FDP object.
| VisageCSWrapper.FDP.FDP | ( | FDP | featurePoints | ) |
| bool VisageCSWrapper.FDP.FPIsDefined | ( | int | group, |
| int | n | ||
| ) |
Returns true if the feature point is defined.
For more information see FeaturePoint.defined.
| group | Feature point group. Valid range is from FDP::FP_START_GROUP_INDEX to FDP::FP_END_GROUP_INDEX. |
| n | Feature point index. Valid range is from 1 to the size of particular group. Group sizes can be obtained using groupSize(). |
| bool VisageCSWrapper.FDP.FPIsDefined | ( | String | name | ) |
Returns true if the feature point is defined.
For more information see FeaturePoint.defined.
| name | Feature point name (e.g. "7.1"). |
| bool VisageCSWrapper.FDP.FPIsDetected | ( | int | group, |
| int | n | ||
| ) |
Returns true if the feature point is detected.
For more information see FeaturePoint.detected.
| group | Feature point group. Valid range is from FDP::FP_START_GROUP_INDEX to FDP::FP_END_GROUP_INDEX. |
| n | Feature point index. Valid range is from 1 to the size of particular group. Group sizes can be obtained using groupSize(). |
| bool VisageCSWrapper.FDP.FPIsDetected | ( | String | name | ) |
Returns true if the feature point is detected.
For more information see FeaturePoint.detected.
| name | Feature point name (e.g. "7.1"). |
|
static |
Returns true if specified feature point identifier is valid.
Identifier is valid if it consists of feature point group and feature point index within valid ranges.
| group | Feature point group. Valid range is from FDP::FP_START_GROUP_INDEX to FDP::FP_END_GROUP_INDEX. |
| n | Feature point index. Valid range is from 1 to the size of particular group. Group sizes can be obtained using groupSize(). |
|
static |
Returns true if specified feature point identifier is valid.
Identifier i.e. feature point name is valid if it consists of feature point group and feature point index within valid ranges and is of the correct format. Valid range for feature point group is from FDP::FP_START_GROUP_INDEX to FDP::FP_END_GROUP_INDEX. Valid range for feature point index is from 1 to the size of particular group.
| name | Feature point name (e.g. "7.1"). |
| FeaturePoint VisageCSWrapper.FDP.getFP | ( | int | group, |
| int | n | ||
| ) |
Get a feature point by its group and index.
| group | Feature point group. Valid range is from FDP::FP_START_GROUP_INDEX to FDP::FP_END_GROUP_INDEX. |
| n | Feature point index. Valid range is from 1 to the size of particular group. Group sizes can be obtained using groupSize(). |
| const FeaturePoint VisageCSWrapper.FDP.getFP | ( | String | name | ) |
Get a feature point by its name.
| name | Feature point name (e.g. "7.1"). |
|
static |
Get feature point name from group and index.
| group | Feature point group. Valid range is from FDP::FP_START_GROUP_INDEX to FDP::FP_END_GROUP_INDEX. |
| n | Feature point index. Valid range is from 1 to the size of particular group. Group sizes can be obtained using groupSize(). |
| float [] VisageCSWrapper.FDP.getFPPos | ( | int | group, |
| int | n | ||
| ) |
Get the position of a feature point specified by its group and index.
| group | Feature point group. Valid range is from FDP::FP_START_GROUP_INDEX to FDP::FP_END_GROUP_INDEX. |
| n | Feature point index. Valid range is from 1 to the size of particular group. Group sizes can be obtained using groupSize(). |
| float [] VisageCSWrapper.FDP.getFPPos | ( | String | name | ) |
Get the position of a feature point specified by its name.
| name | Feature point name (e.g. "7.1"). |
| float VisageCSWrapper.FDP.getFPQuality | ( | int | group, |
| int | n | ||
| ) |
Get the quality of a feature point specified by its group and index.
| group | Feature point group. Valid range is from FDP::FP_START_GROUP_INDEX to FDP::FP_END_GROUP_INDEX. |
| n | Feature point index. Valid range is from 1 to the size of particular group. Group sizes can be obtained using groupSize(). |
| float VisageCSWrapper.FDP.getFPQuality | ( | String | name | ) |
Get the quality of a feature point specified by its name.
| name | Feature point name (e.g. "7.1"). |
|
static |
Get the size of the specified feature point group.
Valid range for group is from FDP::FP_START_GROUP_INDEX to FDP::FP_END_GROUP_INDEX.
| group | Feature point group. Valid range is from FDP::FP_START_GROUP_INDEX to FDP::FP_END_GROUP_INDEX. |
|
static |
Get feature point group and index from its name.
| name | Feature point name (e.g. "7.1"). |
| group | Returned feature point group. |
| n | Returned feature point index. |
| int VisageCSWrapper.FDP.readFromFile | ( | String | name | ) |
| void VisageCSWrapper.FDP.reset | ( | ) |
Resets all feature points.
The value of all feature points is set to "undefined".
| void VisageCSWrapper.FDP.saveToFile | ( | String | fileName | ) |
| void VisageCSWrapper.FDP.setFP | ( | int | group, |
| int | n, | ||
| FeaturePoint | f | ||
| ) |
Set a feature specified by its group and index.
| group | Feature point group. Valid range is from FDP::FP_START_GROUP_INDEX to FDP::FP_END_GROUP_INDEX. |
| n | Feature point index. Valid range is from 1 to the size of particular group. Group sizes can be obtained using groupSize(). |
| f | The feature point to set. |
| void VisageCSWrapper.FDP.setFP | ( | String | name, |
| FeaturePoint | fp | ||
| ) |
Set a feature specified by its name.
| name | Feature point name (e.g. "7.1"). |
| fp | The feature point to set. |
| void VisageCSWrapper.FDP.setFPPos | ( | int | group, |
| int | n, | ||
| float[] | pos | ||
| ) |
Set the position of a feature point specified by its group and index.
| group | Feature point group. Valid range is from FDP::FP_START_GROUP_INDEX to FDP::FP_END_GROUP_INDEX. |
| n | Feature point index. Valid range is from 1 to the size of particular group. Group sizes can be obtained using groupSize(). |
| pos | Vertex position (array of 3 floating point values). |
| void VisageCSWrapper.FDP.setFPPos | ( | String | name, |
| float[] | pos | ||
| ) |
Set the position of a feature point specified by its name.
| name | Feature point name (e.g. "7.1"). |
| pos | Vertex position (array of 3 floating point numbers). |
| void VisageCSWrapper.FDP.setFPPos | ( | int | group, |
| int | n, | ||
| float | x, | ||
| float | y, | ||
| float | z | ||
| ) |
Set the position of a feature point specified by its group and index.
| group | Feature point group. Valid range is from FDP::FP_START_GROUP_INDEX to FDP::FP_END_GROUP_INDEX. |
| n | Feature point index. Valid range is from 1 to the size of particular group. Group sizes can be obtained using groupSize(). |
| x | Vertex x position. |
| y | Vertex y position. |
| z | Vertex z position. |
| void VisageCSWrapper.FDP.setFPPos | ( | String | name, |
| float | x, | ||
| float | y, | ||
| float | z | ||
| ) |
Set the position of a feature point specified by its name.
| name | Feature point name (e.g. "7.1"). |
| x | Vertex x position. |
| y | Vertex y position. |
| z | Vertex z position. |
| void VisageCSWrapper.FDP.setFPQuality | ( | int | group, |
| int | n, | ||
| float | quality | ||
| ) |
Set the quality of a feature point specified by its group and index.
| group | Feature point group. Valid range is from FDP::FP_START_GROUP_INDEX to FDP::FP_END_GROUP_INDEX. |
| n | Feature point index. Valid range is from 1 to the size of particular group. Group sizes can be obtained using groupSize(). |
| quality | Quality value. |
| void VisageCSWrapper.FDP.setFPQuality | ( | String | name, |
| float | quality | ||
| ) |
Set the position of a feature point specified by its name.
| name | Feature point name (e.g. "7.1"). |
| quality | Vertex position (array of 3 floating point numbers). |
| FeaturePoint [] VisageCSWrapper.FDP.ll |
| FeaturePoint [] VisageCSWrapper.FDP.ul |
1.8.10