Reprint statement: This article reprinted from: Http://www.cnblogs.com/qingfang/p/6609889.html
Note: English is not good, can be used for Baidu Translate, webpage translation.
Please refer to the original version: Luxand_FaceSDK_Documentation.pdf 6.2Http://www.luxand.com/facesdk/documentation/
Luxand, Inc. http://www.luxand.com
Luxand FaceSDK
6.2
Face Detection and Recognition Library
Developer’s Guide
Table of Contents
Overview......................................................................................................................................................... 6
Requirements................................................................................................................................................. 6
Technical Specifications................................................................................................................................ 6
Face Detection................................................................................................................................................. 7
Face Matching................................................................................................................................................. 7
Live Video Recognition with Tracker API....................................................................................................... 7
Facial Feature Detection................................................................................................................................ 8
Eye Centers Detection..................................................................................................................................... 8
Gender Recognition........................................................................................................................................ 8
Facial Expression Recognition........................................................................................................................ 8
Multi-Core Support......................................................................................................................................... 8
Library Size....................................................................................................................................................... 8
Installation...................................................................................................................................................... 8
Windows.......................................................................................................................................................... 8
Linux/Mac OS X............................................................................................................................................... 9
Directory Structure.......................................................................................................................................... 9
Sample Applications...................................................................................................................................... 9
Using FaceSDK with Programming Languages........................................................................................ 11
Using with .NET (C# and VB)........................................................................................................................ 11
Using CImage class in .NET........................................................................................................................... 12
CImage();................................................................................................................................................ 13
CImage(Int);............................................................................................................................................ 13
CImage.ReloadFromHandle();............................................................................................................... 13
Using with C/C++.......................................................................................................................................... 13
Using with Delphi.......................................................................................................................................... 14
Using with Java.............................................................................................................................................. 14
Using with Cocoa........................................................................................................................................... 14
Using with VisualBasic 6.0............................................................................................................................. 15
Using with iOS............................................................................................................................................... 15
Using with Android....................................................................................................................................... 15
Unicode support............................................................................................................................................ 15
Redistributables............................................................................................................................................15
Usage Scenarios............................................................................................................................................16
Library Activation.........................................................................................................................................17
FSDK_GetHardware_ID Function................................................................................................................... 17
FSDK_ActivateLibrary Function..................................................................................................................... 18
FSDK_GetLicenseInfo Function..................................................................................................................... 18
Initialization...................................................................................................................................................19
FSDK_Initialize Function................................................................................................................................ 19
FSDK_Finalize Function................................................................................................................................. 19
Working with Images...................................................................................................................................20
FSDK_CreateEmptyImage Function.............................................................................................................. 20
FSDK_LoadImageFromFile Function............................................................................................................. 21
FSDK_LoadImageFromFileW Function......................................................................................................... 22
FSDK_SaveImageToFile Function.................................................................................................................. 22
FSDK_SaveImageToFileW Function.............................................................................................................. 23
FSDK_LoadImageFromBuffer Function........................................................................................................ 24
FSDK_LoadImageFromJpegBuffer Function................................................................................................ 25
FSDK_LoadImageFromPngBuffer Function.................................................................................................. 25
FSDK_GetImageBufferSize Function............................................................................................................. 26
FSDK_SaveImageToBuffer Function............................................................................................................. 27
FSDK_LoadImageFromHBitmap Function.................................................................................................... 27
FSDK_SaveImageToHBitmap Function......................................................................................................... 28
FSDK.LoadImageFromCLRImage Function................................................................................................... 29
FSDK.SaveImageToCLRImage Function....................................................................................................... 29
FSDK.LoadImageFromAWTImage Function................................................................................................. 29
FSDK.SaveImageToAWTImage Function...................................................................................................... 30
FSDK_SetJpegCompressionQuality............................................................................................................... 30
FSDK_GetImageWidth Function................................................................................................................... 31
FSDK_GetImageHeight Function.................................................................................................................. 31
FSDK_CopyImage Function........................................................................................................................... 32
FSDK_ResizeImage Function......................................................................................................................... 33
FSDK_RotateImage Function........................................................................................................................ 34
FSDK_RotateImageCenter Function............................................................................................................. 34
FSDK_RotateImage90 Function.................................................................................................................... 35
FSDK_CopyRect Function.............................................................................................................................. 36
FSDK_CopyRectReplicateBorder Function................................................................................................... 37
FSDK_MirrorImage Function......................................................................................................................... 38
FSDK_FreeImage Function............................................................................................................................ 38
Face Detection...............................................................................................................................................39
Data types...................................................................................................................................................... 39
FSDK_DetectFace Function........................................................................................................................... 40
FSDK_DetectMultipleFaces Function........................................................................................................... 41
FSDK_SetFaceDetectionParameters Function............................................................................................. 42
FSDK_SetFaceDetectionThreshold Function................................................................................................ 44
Facial Feature Detection..............................................................................................................................45
FSDK_DetectFacialFeatures Function........................................................................................................... 46
FSDK_DetectFacialFeaturesInRegion Function............................................................................................ 47
FSDK_DetectEyes Function............................................................................................................................ 48
FSDK_DetectEyesInRegion Function............................................................................................................ 49
Detected Facial Features............................................................................................................................... 50
Face Matching...............................................................................................................................................53
FSDK_GetFaceTemplate Function................................................................................................................. 54
FSDK_GetFaceTemplateInRegion Function.................................................................................................. 55
FSDK_GetFaceTemplateUsingEyes Function................................................................................................ 56
FSDK_GetFaceTemplateUsingFeatures Function......................................................................................... 57
FSDK_MatchFaces Function.......................................................................................................................... 58
FSDK_GetMatchingThresholdAtFAR Function............................................................................................. 59
FSDK_GetMatchingThresholdAtFRR Function............................................................................................. 60
Gender and Facial Expression Recognition................................................................................................61
FSDK_DetectFacialAttributeUsingFeatures Function................................................................................... 61
FSDK_GetValueConfidence Function........................................................................................................... 63
Working with Cameras.................................................................................................................................64
Data Types..................................................................................................................................................... 64
FSDK_InitializeCapturing Function............................................................................................................... 65
FSDK_FinalizeCapturing Function................................................................................................................ 66
FSDK_SetCameraNaming Function.............................................................................................................. 66
FSDK_GetCameraList Function...................................................................................................................... 67
FSDK_GetCameraListEx Function.................................................................................................................. 68
FSDK_FreeCameraList Function..................................................................................................................... 69
FSDK_GetVideoFormatList Function............................................................................................................. 69
FSDK_FreeVideoFormatList Function............................................................................................................ 70
FSDK_SetVideoFormat Function................................................................................................................... 70
FSDK_OpenVideoCamera Function.............................................................................................................. 71
FSDK_OpenIPVideoCamera Function........................................................................................................... 72
FSDK_SetHTTPProxy Function...................................................................................................................... 73
FSDK_GrabFrame Function............................................................................................................................ 74
FSDK_CloseVideoCamera Function.............................................................................................................. 74
Tracker API: Face Recognition and Tracking in Video Streams..............................................................75
What is Tracker API....................................................................................................................................... 75
Understanding Identifiers............................................................................................................................. 78
A subject can have several identifiers...................................................................................................78
Merger of identifiers...............................................................................................................................78
When identifiers are not merged...........................................................................................................78
Similar identifiers....................................................................................................................................78
Tracker Memory............................................................................................................................................. 79
Memory available for each subject.......................................................................................................79
Imposing memory limits.........................................................................................................................79
How to set the memory limit..................................................................................................................80
Tracker Parameters........................................................................................................................................ 80
Face tracking parameters.......................................................................................................................80
Face recognition parameters.................................................................................................................80
Facial feature tracking parameters........................................................................................................81
Tuning for Optimal Performance................................................................................................................. 82
Using the API................................................................................................................................................. 82
Locking identifiers..................................................................................................................................82
Multiple camera support........................................................................................................................82
Usage Scenario........................................................................................................................................83
User Interaction with the System.................................................................................................................. 83
Enrollment...............................................................................................................................................84
Dealing with false acceptances..............................................................................................................84
Saving and Loading Tracker Memory.......................................................................................................... 85
Recognition Performance............................................................................................................................. 85
Performance measures...........................................................................................................................85
Understanding storage events...............................................................................................................85
How to measure your rate of storage events........................................................................................86
Understanding FAR.................................................................................................................................86
Understanding R.....................................................................................................................................86
Choosing Threshold value......................................................................................................................87
Gender and Facial Expression Recognition............................................................................................... 88
Face, Eye and Facial Feature Tracking....................................................................................................... 88
Counting the number of people.........................................................................................................89
Thread Safety.............................................................................................................................................. 89
FSDK_CreateTracker Function.................................................................................................................... 89
FSDK_FreeTracker Function....................................................................................................................... 90
FSDK_ClearTracker Function...................................................................................................................... 90
FSDK_SetTrackerParameter Function........................................................................................................ 91
FSDK_SetTrackerMultipleParameters Function........................................................................................ 91
FSDK_GetTrackerParameter Function....................................................................................................... 92
FSDK_FeedFrame Function........................................................................................................................ 93
FSDK_GetTrackerEyes Function................................................................................................................. 94
FSDK_GetTrackerFacialFeatures Function................................................................................................. 95
FSDK_GetTrackerFacePosition Function.................................................................................................... 96
FSDK_GetTrackerFacialAttribute Function................................................................................................ 97
FSDK_LockID Function................................................................................................................................ 98
FSDK_UnlockID Function............................................................................................................................ 99
FSDK_PurgeID Function.............................................................................................................................. 99
FSDK_GetName Function.......................................................................................................................... 100
FSDK_SetName Function........................................................................................................................... 101
FSDK_GetIDReassignment Function......................................................................................................... 102
FSDK_GetSimilarIDCount Function............................................................................................................. 102
FSDK_GetSimilarIDList Function................................................................................................................. 103
FSDK_GetAllNames Function...................................................................................................................... 104
FSDK_SaveTrackerMemoryToFile Function................................................................................................ 105
FSDK_LoadTrackerMemoryFromFile Function........................................................................................... 106
FSDK_GetTrackerMemoryBufferSize Function........................................................................................... 106
FSDK_SaveTrackerMemoryToBuffer Function........................................................................................... 107
FSDK_LoadTrackerMemoryFromBuffer Function....................................................................................... 108
Multi-Core Support....................................................................................................................................109
FSDK_GetNumThreads Function................................................................................................................. 109
FSDK_SetNumThreads Function................................................................................................................. 110
Thread Safety..............................................................................................................................................110
Migration.....................................................................................................................................................112
Migration from FaceSDK 6.0, 6.0.1, 6.1 to FaceSDK 6.2............................................................................. 112
Migration from FaceSDK 5.0, 5.0.1 to FaceSDK 6.0, 6.0.1, 6.1.................................................................... 112
Migration from FaceSDK 4.0 to FaceSDK 5.0, 5.0.1.................................................................................... 112
Migration from FaceSDK 3.0 to FaceSDK 4.0............................................................................................. 113
Migration from FaceSDK 2.0 to FaceSDK 3.0........................................................................................... 113
Error Codes................................................................................................................................................114
Library Information..................................................................................................................................115