Face Login refers to using the user’s facial biometrics characteristics to access a password protected application or unlock the system’s lock screen. Because Windows* 8 Runtime does not provide a “Face Recognition” API, we cannot implement the face login feature for a Windows Store app by directly calling a Windows Runtime API. On the other hand, the latest generation Intel® Atom™ processor based platforms support multiple high definition cameras and advanced Image Signal Processing technology, and provide a foundation to use the Windows media capture APIs to implement the Face login features. Intel® Perceptual Computing SDK 2013 also provides APIs to implement the face recognition features.
UI Flow of Face Login
We use the login of a healthcare app as an example. This app manages a patient information database, which includes patient profiles, lab test results, medical images, and vital graphs, etc. Because of the sensitivity characteristics of the data, the app was first designed to require the user login to the app using a user name and a password. To extend the app to support face login, some way is needed to let the user choose to do face login instead of the text based login. Here we add a camera button for that purpose (Figure 1).
Figure 1 The "Photo Login" button was added to let user access the face login feature
If the user presses the “Photo Login” button, the front facing camera will be started to preview the user’s face images. It tries to detect the face of the user and match the face landmarks with the landmarks stored in the user profile (Figure 2).
Figure 2 Detect and match the user's face and match the landmarks with the landmarks stored in the user profile
If the facial landmarks are matched, the app will grant the user access. If the matching is not successful (timeouts), or the user decides not continuing the face login process (by pressing the camera button again), the app returns back to the conventional login screen (Figure 1).
Face Login with Intel® Perceptual Computing SDK 2013
Intel® Perceptual Computing SDK 2013 (PerC SDK, http://software.intel.com/en-us/vcsource/tools/perceptual-computing-sdk) includes the following core capabilities: close-range gesture tracking, speech recognition, face analysis, and augmented reality. PerC SDK’s Face Tracking Module provides a suite of face detection, face recognition, landmark detection and face attribute detection APIs, with which developers can use to implement the face login features for Windows 8 application and device login.
Face recognition in PerC SDK includes 3 stages: face detection, face landmark, and model creation. The face detection algorithm locates the rectangle position of a face or multiple faces in an image or video sequence in real-time capture or playback mode and marks it with a unique identifier. The landmark detection algorithm locates the 6-point or 7-point landmarks: the outer and inner corners of the eyes, the tip of the nose, and the outer corners of the mouth. The face recognizer then creates a camera model and compare the model with the database or array to see if there is a match. Figure 3 shows the flow of face recognition.
Figure 3 Face recognition with Perc SDK 2013 uses the face detection algorithm and the landmark detection algorithm to create a model
First, we enable face detection and face landmark with the UtilPipeline class methods (Code Example 1).
Code Example 1 Use UtilPipeline to implement face recognition, pp is the UtilPipeline object **
Then the PXCMFaceAnalysis namespace classes are used to perform face detection and face landmark, then to create model (Code Example 2).
PXCMFaceAnalysis.Detection ftd = face.DynamicCast<PXCMFaceAnalysis.Detection>(PXCMFaceAnalysis.Detection.CUID);
PXCMFaceAnalysis.Landmark ftl = face.DynamicCast<PXCMFaceAnalysis.Landmark>(PXCMFaceAnalysis.Landmark.CUID);
PXCMFaceAnalysis.Recognition faceRecognizer = (PXCMFaceAnalysis.Recognition)face.DynamicCast(PXCMFaceAnalysis.Recognition.CUID);
faceRecognizer.CreateModel(faceId, out cameraModel);
Code Example 2 Face detection, face landmark, and model creation **
After the camera model is created, it can be used to compare with the models stored in a database, or models stored in the cloud over RESTful web services (Code Example 3).
// DB_Model is all the pre stored faces
cameraModel.Compare(DB_Model, null, out index); |
Code Example 3 Compare the camera model with the Database **
*Other names and brands may be claimed as the property of others.
**This sample source code is released under the Intel Sample Source Code License Agreement