FaceStation F2 - Getting Image Warping from the raw image file of the user's face is available to use.
For 1:1 Server Matching, the Server Application can store the image warping per user. And then, the server would send the image warping of the user to the device when server matching is enabled and request the 1:1 verification.
How to use sample code
Follow the step-by-step guide
- Step 1: set the GATEWAY_ADDR and DEVICE_ADDR
- Step 2: stored FACE_UNWARPED_IMAGE
public ByteString NormalizeImage(uint deviceID, string rawImageFileName) { Console.WriteLine("Normalize from {0}, with {1}", deviceID, rawImageFileName); byte[] imageData; getImageData(rawImageFileName, out imageData); int imageSize = Buffer.ByteLength(imageData); ByteString rawImageData = ByteString.CopyFrom(imageData); ByteString warpedImageData = faceSvc.Normalize(deviceID, rawImageData); Console.WriteLine("Normalize completed"); const bool isWriteImage = true; if (isWriteImage) { byte[] data = warpedImageData.ToByteArray(); string warpedFileName = rawImageFileName + FACE_WARPED_IMAGE; setImageData(warpedFileName, ref data); }; return warpedImageData; }
FACE_UNWARPED_IMAGE = "c:/mypic4.jpg"; unwarped imaged must be jpg.
Please download attached file and refer to this sample code.