face recognition
face recognition
face recognition
face recognition face recognition face recognition face recognition face recognition
face recognition face recognition
face recognition
face recognition
face recognition
Luxand FaceSDK – Facial Feature Detection face recognition
face recognition face recognition

FaceSDK provides the FSDK_DetectFacialFeatures function to detect facial features in an image and the FSDK_DetectEyes function to detect just eye centers in an image. First, these functions detect a frontal face in an image, and then detect its facial features or only eye centers. The FSDK_DetectFacialFeaturesInRegion and FSDK_DetectEyesInRegion functions do not perform the face detection step and detect facial features or eye centers in a region returned by FSDK_DetectFace or FSDK_DetectMultipleFaces.

The FSDK_DetectEyes function works much faster than FSDK_DetectFacialFeatures and is recommended for real-time applications.

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 Detected Facial Features chapter.

Eye centers are saved to FSDK_Features[0] and FSDK_Features[1]. The FSDK_DetectEyes and FSDK_DetectEyesInRegion functions do not change other elements of the FSDK_Features array.

C++ Declaration:

typedef struct { int x,y; } TPoint;
typedef TPoint FSDK_Features [FSDK_FACIAL_FEATURE_COUNT];

 C# Declaration:

public struct TPoint {
   public int x, y;
}

Delphi Declaration:

TPoint = record
   x, y: integer;
end;
FSDK_Features = array[0..FSDK_FACIAL_FEATURE_COUNT - 1] of TPoint;
PFSDK_Features = ^FSDK_Features;

VB Declaration:

Type TPoint
   x As Long
   y As Long
End Type

Java Declaration:

The class TPoint has the following properties:

   public int x, y;

The class FSDK_Features has the following property:

   public TPoint features[];

FSDK_DetectFacialFeatures Function

Detects a frontal face in an image and detects its facial features.

C++ Syntax:

int FSDK_DetectFacialFeatures(HImage Image, FSDK_Features* FacialFeatures);

Delphi Syntax:

function FSDK_DetectFacialFeatures(Image: HImage; FacialFeatures: PFSDK_Features): integer;

C# Syntax:

int FSDK.DetectFacialFeatures(int Image, out FSDK.TPoint[] FacialFeatures);

VB Syntax:

Function FSDKVB_DetectFacialFeatures(ByVal Image As Long, ByRef FacialFeatures As TPoint) As Long

Java Syntax:

int FSDK.DetectFacialFeatures(HImage Image, FSDK_Features.ByReference FacialFeatures);

CImage Syntax:

FSDK.TPoint[] FSDK.CImage.DetectFacialFeatures();

Parameters:

Image - handle of the image facial features should be detected in.

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

Return Value:

Returns FSDKE_OK if successful.

Example

int img1;
FSDK_Features Features;

FSDK_Initialize("");
FSDK_LoadImageFromFile(&img1, "test.jpg");
FSDK_DetectFacialFeatures(img1, Features);

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

FSDK_DetectFacialFeaturesInRegion Function

Detects facial features in an image region returned by FSDK_DetectFace or FSDK_DetectMultipleFaces. This function can be useful if an approximate face size is known, or to detect facial features of a specific face returned by FSDK_DetectMultipleFaces.

C++ Syntax:

int FSDK_DetectFacialFeaturesInRegion(HImage Image, TFacePosition* FacePosition, FSDK_Features* FacialFeatures);

Delphi Syntax:

function FSDK_DetectFacialFeaturesInRegion(Image: HImage; FacePosition: PFacePosition; FacialFeatures: PFSDK_Features): integer;

C# Syntax:

int FSDK.DetectFacialFeaturesInRegion(int Image, ref FSDK.TFacePosition FacePosition, out FSDK.TPoint[] FacialFeatures);

VB Syntax:

Function FSDKVB_DetectFacialFeaturesInRegion(ByVal Image As Long, ByRef FacePosition As TFacePosition, ByRef FacialFeatures As TPoint) As Long

Java Syntax:

int FSDK.DetectFacialFeaturesInRegion(HImage Image, TFacePosition FacePosition, FSDK_Features.ByReference FacialFeatures);

CImage Syntax:

FSDK.TPoint[] FSDK.CImage.DetectFacialFeaturesInRegion(ref FSDK.TFacePosition FacePosition);

Parameters:

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

FacePosition– pointer to the face position structure.

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

Return Value:

Returns FSDKE_OK if successful.

Example

int i, DetectedCount, img1;
FSDK_Features Features;
TFacePosition FaceArray[50];

FSDK_Initialize("");
FSDK_LoadImageFromFile(&img1, "test.jpg");

FSDK_DetectMultipleFaces(img1, &DetectedCount , FaceArray, sizeof(FaceArray));

for (i = 0; i < DetectedCount; i++) {
   FSDK_DetectFacialFeaturesInRegion(img1, FaceArray[i], Features);
   printf("Left eye location: (%d, %d)\n", Features[FSDKP_LEFT_EYE].x, Features[FSDKP_LEFT_EYE].y);
   printf("Right eye location: (%d, %d)\n", Features[FSDKP_RIGHT_EYE].x, Features[FSDKP_RIGHT_EYE].y);
}

FSDK_DetectEyes Function

Detects a frontal face in an image and detects its eye centers.

C++ Syntax:

int FSDK_DetectEyes(HImage Image, FSDK_Features* FacialFeatures);

Delphi Syntax:

function FSDK_DetectEyes(Image: HImage; FacialFeatures: PFSDK_Features): integer;

C# Syntax:

int FSDK.DetectEyes(int Image, out FSDK.TPoint[] FacialFeatures);

VB Syntax:

Function FSDKVB_DetectEyes (ByVal Image As Long, ByRef FacialFeatures As TPoint) As Long

Java Syntax:

int FSDK.DetectEyes(HImage Image, FSDK_Features.ByReference FacialFeatures);

CImage Syntax:

FSDK.TPoint[] FSDK.CImage.DetectEyes();

Parameters:

Image– handle of the image eye centers should be detected in.

FacialFeatures– pointer to the FSDK_Features array for receiving the detected eye centers.

Return Value:

Returns FSDKE_OK if successful.

FSDK_DetectEyesInRegion Function

Detects eye centers in an image region returned by FSDK_DetectFace or FSDK_DetectMultipleFaces.

C++ Syntax:

int FSDK_DetectEyesInRegion(HImage Image, TFacePosition* FacePosition, FSDK_Features* FacialFeatures);

Delphi Syntax:

function FSDK_DetectEyesInRegion(Image: HImage; FacePosition: PFacePosition; FacialFeatures: PFSDK_Features): integer;

C# Syntax:

int FSDK.DetectEyesInRegion(int Image, ref FSDK.TFacePosition FacePosition, out FSDK.TPoint[] FacialFeatures);

VB Syntax:

Function FSDKVB_DetectEyesInRegion(ByVal Image As Long, ByRef FacePosition As TFacePosition, ByRef FacialFeatures As TPoint) As Long

Java Syntax:

int FSDK.DetectEyesInRegion(HImage Image, TFacePosition FacePosition, FSDK_Features.ByReference FacialFeatures);

CImage Syntax:

FSDK.TPoint[] FSDK.CImage.DetectEyesInRegion(ref FSDK.TFacePosition FacePosition);

Parameters:

Image – handle of the image eye centers should be detected in.

FacePosition – pointer to the face position structure.

FacialFeatures – pointer to the FSDK_Features array for receiving the detected eye centers.

Return Value:

Returns FSDKE_OK if successful.

 

Next chapterDetected Facial Features

Contents

face recognition
Top Downloads

Blink! Pro
Log in to your PC by simply looking at it.
BabyMaker
Don't wait nine months to see your baby! All you need is two pictures.
ProphecyMaster
What Will You Look Like in 20 Years?
Glamourizer
Turn ordinary photos into glamour portraits, hundreds at a time.

Latest News

07.12.2011 FaceSDK 4.0 Released
FaceSDK 4.0 goes real-time, making better use of multi-core systems

16.11.2011 Get Help with Your Project with Luxand Partner Network
Luxand is excited to announce the launch of its Partner Network.

20.04.2011 Luxand’s New Mirror Reality Technology Immerses Users in Augmented Reality
Luxand, Inc. introduces Mirror Reality, a facial feature detection technology that makes augmented reality possible.

face recognition

Solutions  |  Products  |  Download  |  Privacy  |  Support  |  Development  |  Press  |  About Luxand
© 2005-2012 Luxand, Inc.
face recognition
face recognition
face recognition
face recognition