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 – Multi-Core Support face recognition
face recognition face recognition

The following FaceSDK functions use multiple CPU cores, thus speeding up the calculations:

FSDK_DetectEyes,
FSDK_DetectEyesInRegion,
FSDK_DetectFace,
FSDK_DetectMultipleFaces,
FSDK_DetectFacialFeatures,
FSDK_DetectFacialFeaturesInRegion,
FSDK_GetFaceTemplate,
FSDK_GetFaceTemplateInRegion,
FSDK_GetFaceTemplateUsingFeatures,
FSDK_GetFaceTemplateUsingEyes.

By default, these functions use all available processor cores. To get the number of processor cores used, call the FSDK_GetNumThreads function. To limit the number of processor cores used, call the FSDK_SetNumThreads function. Calling FSDK_SetNumThreads(1) will disable multi-core support.

Note that each of these functions forks into a number of threads on each call. It is not recommended to use nested parallelism when calling these functions; if you need nested parallelism, you may limit the number of threads with the FSDK_SetNumThreads functions. For example, if your application runs in several threads, and each thread executes FSDK_DetectFace (which uses all available cores), this is acceptable; however, if each thread forks into several threads, each executing FSDK_DetectFace, this could potentially reach the limit of resources available.

It is safe to use extensions for parallel computation (like OpenMP) with the above FaceSDK functions, if they are executed from a single thread. For example, the following C++ sample code is acceptable:

#pragma omp parallel for
for (int i = 0; i < 100; i++)
FSDK_DetectFace(...);

However, if your application forks into multiple threads, it is not recommended to execute the above FaceSDK functions within OpenMP statements in such threads. If you must, consider limiting the number of cores used by FaceSDK with the FSDK_SetNumThreads function.

FSDK_GetNumThreads Function

Retrieves the number of processor cores used by FaceSDK.

C++ Syntax:

int FSDK_GetNumThreads(int * Num);

Delphi Syntax:

function FSDK_GetNumThreads(Num: PInteger): integer;

C# Syntax:

int FSDK.GetNumThreads(ref int Num);

VB Syntax:

Function FSDKVB_GetNumThreads(ByRef Num As Long) As Long

Java Syntax:

int FSDK.GetNumThreads(int Num[]);

Parameters:

Num – pointer to an integer value to receive the number of threads used by FaceSDK.

Return Value:

Returns FSDKE_OK if successful.

FSDK_SetNumThreads Function

Sets the number of processor cores to be used by FaceSDK. If you set the number of cores to 1, support for multiple cores will be disabled, and the SDK will use only a single processor core.

C++ Syntax:

int FSDK_SetNumThreads(int Num);

Delphi Syntax:

function FSDK_SetNumThreads(Num: integer): integer;

C# Syntax:

int FSDK.SetNumThreads(int Num);

VB Syntax:

Function FSDKVB_SetNumThreads(ByVal Num As Long) As Long

Java Syntax:

int FSDK.SetNumThreads(int Num);

Parameters:

Num – the number of cores to be used by FaceSDK.

Return Value:

Returns FSDKE_OK if successful.

 

Next chapterThread Safety

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

08.02.2012 Blink! Pro Learns to Hide
Blink! Pro Learns to Hide! The newest update allows you to hide Blink! Pro for greater security.

08.02.2012 Blink! Pro Learns to Learn
Blink! Pro Learns to Learn! The newest update allows you to train Blink! Pro for better facial recognition.

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

face recognition

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