Motivo de este documento:

Cuando registra la imagen de perfil de usuario en el G-SDK. La versión regular (1.4) no contiene esa función.

 

 

 

Cómo usar y explicación detallada:

 

Descargue la puerta del dispositivo y la carpeta imageuser, cree una ubicación de carpeta como se muestra a continuación.


 

Program.cs

private const string USER_PROFILE_IMAGE = "c:/profile.jpg";
C

TestImageUser.cs

 public void EnrollFaceUser(uint deviceID, ref ByteString warpedImageData, string profileImageFileName)    {      Console.WriteLine("Enroll user");
      byte[] profileBytes;      getImageData(profileImageFileName, out profileBytes);      ByteString profileImage = ByteString.CopyFrom(profileBytes);
      string userID10 = "10";      UserInfo userInfo10 = new UserInfo{Hdr = new UserHdr{ID = userID10}};      userInfo10.Name = "testProfileUser";      userInfo10.Setting = new UserSetting{StartTime = 978307200, EndTime = 1924991999};      userInfo10.Photo = profileImage;
      const uint Bs2FaceFlagF2Warped = 0x1;      FaceData faceData = new FaceData();      faceData.Flag = (uint)Face.FaceFlag.Bs2FaceFlagF2 | Bs2FaceFlagF2Warped;      faceData.ImageData = warpedImageData;      userInfo10.Faces.Add(faceData);
      string userID11 = "11";      UserInfo userInfo11 = new UserInfo{Hdr = new UserHdr{ID = userID11}};      userInfo11.Name = "testNonProfileUser";      userInfo11.Setting = new UserSetting{StartTime = 978307200, EndTime = 1924991999};      // userInfo11.Photo = profileImage;
      FaceData faceData11 = new FaceData();      faceData11.Flag = (uint)Face.FaceFlag.Bs2FaceFlagF2 | Bs2FaceFlagF2Warped;      faceData11.ImageData = warpedImageData;      userInfo11.Faces.Add(faceData11);
      userSvc.Enroll(deviceID, new UserInfo[]{userInfo10, userInfo11});
      Console.WriteLine("Enroll user finished");    }
C