Luxand FaceSDK – Usage Scenarios

The library usage level depends on the functionality required from Luxand FaceSDK.

If you work with video, consider using Tracker API, as the API provides high-level functions to recognize subjects and tag them with names, to track their faces and facial features, and to recognize gender and facial expressions. The usage scenario for Tracker API can be found in the Usage Scenario section of the Tracker API chapter.

Otherwise, the typical scenario is as follows:

1. Activate FaceSDK by calling up the FSDK_ActivateLibrary function with the key sent by Luxand, Inc.

2. Initialize FaceSDK by calling up the FSDK_Initialize function.

3. Load images either from file, buffer, or the HBITMAP handle (FSDK_LoadImageFromFile, FSDK_LoadImageFromBuffer, FSDK_LoadImageFromHBitmap functions).

4. Set face detection parameters if needed (FSDK_SetFaceDetectionParameters, FSDK_SetFaceDetectionThreshold).

5. Use FaceSDK functions:

6. Finalize the FaceSDK library (FSDK_Finalize function).

To work with a camera, follow these steps*:

1. Initialize camera capturing (FSDK_InitializeCapturing).

2. Get a list of web cameras available in the system (FSDK_GetCameraList).

3. Get list of video formats supported by the camera (FSDK_GetVideoFormatList).

4. Set the desired video format for the chosen camera (FSDK_SetVideoFormat).

5. Open a web camera (FSDK_OpenVideoCamera) or an IP camera (FSDK_OpenIPVideoCamera).

6. Grab frames (FSDK_GrabFrame) in a loop, displaying them and detecting/recognizing faces.

7. Close video camera (FSDK_CloseVideoCamera).

8. Delete the list of video formats (FSDK_FreeVideoFormatList).

9. Delete the list of web cameras (FSDK_FreeCameraList).

10. Finalize capturing (FSDK_FinalizeCapturing).

* If you work with an IP camera, you should not follow steps 2, 3, 4, 8 and 9.

 

Next chapterLibrary Activation

Contents