Luxand FaceSDK – Facial Feature Detection

FaceSDK provides FSDK_LocateFacialFeatures function to locate facial features in an image. FaceSDK provides the FSDK_LocateFacialFeatures function to locate facial features in an image. First this function searches the image for a frontal face and then locates its facial features. The facial features are stored in the FSDK_Features data structure. FSDK_Features is an array data type containing FSDK_FACIAL_FEATURE_COUNT points. The list of facial features recognized by FaceSDK is available in the Recognized Facial Features chapter.

C++ Declaration:

typedef int FSDK_POINT[2];
typedef FSDK_POINT FSDK_Features[FSDK_FACIAL_FEATURE_COUNT];

Delphi Declaration:

FSDK_Features = array[0..FSDK_FACIAL_FEATURE_COUNT - 1] of array [0..1] of integer;
PFSDK_Features = ^FSDK_Features;

FSDK_LocateFacialFeatures Function

Searches an image for a frontal face and locates its facial features.

C++ Syntax:

int _FSDKIMPORT_ FSDK_LocateFacialFeatures(HImage Image, FSDK_Features FacialFeatures);

Delphi Syntax:

function FSDK_LocateFacialFeatures(Image: HImage; FacialFeatures: PFSDK_Features): integer; cdecl; external 'FaceSDK.dll';

Parameters:

Image– the handle of the image facial features should be located in.

FacialFeatures– the pointer to the FSDK_Features array for receiving the located facial features.

Return Value:

The function returns FSDK_OK if successful.

Example

int img1;
FSDK_Features Features;
FSDK_Initialize("");
FSDK_LoadImageFromFile(&img1, "test.jpg");
FSDK_LocateFacialFeatures(img1, Features);

printf("Left eye location: (%d, %d)\n", Features[FSDKP_LEFT_EYE][0], Features[FSDKP_LEFT_EYE][1]);
printf("Right eye location: (%d, %d)\n", Features[FSDKP_RIGHT_EYE][0], Features[FSDKP_RIGHT_EYE][1]);

Search

Solutions   |   Products   |   Download   |   Support   |   Development   |   Press   |   About Luxand © 2005-2008 Luxand Development