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.
5. Use FaceSDK functions:
- Detect a face (FSDK_DetectFace) or multiple faces (FSDK_DetectMultipleFaces) in an image
- Detect facial features if needed (FSDK_DetectFacialFeatures, FSDK_DetectFacialFeaturesInRegion)
- Extract a face template from the image (FSDK_GetFaceTemplate, FSDK_GetFaceTemplateInRegion, FSDK_GetFaceTemplateUsingEyes)
- Match face templates (FSDK_MatchFaces) and acquire facial similarity level
- To find out if a face belongs to the same person, calculate the matching threshold at a given FAR or FRR rate (FSDK_GetMatchingThresholdAtFAR and FSDK_GetMatchingThresholdAtFRR 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).
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.