/// <summary> /// Append detected face to UI binding collection /// </summary> /// <param name="collections">UI binding collection</param> /// <param name="imagePath">Original image path, used for rendering face region</param> /// <param name="face">Face structure returned from service</param> public static void UpdateFace(ObservableCollection <FaceViewModel> collections, string imagePath, Microsoft.ProjectOxford.Face.Contract.AddPersistedFaceResult face) { var renderingImage = LoadImageAppliedOrientation(imagePath); collections.Add(new FaceViewModel() { ImageFile = renderingImage, FaceId = face.PersistedFaceId.ToString(), }); }
/// <summary> /// Append detected face to UI binding collection /// </summary> /// <param name="collections">UI binding collection</param> /// <param name="path">Original image path, used for rendering face region</param> /// <param name="face">Face structure returned from service</param> public static void UpdateFace(ObservableCollection <Face> collections, string path, Microsoft.ProjectOxford.Face.Contract.AddPersistedFaceResult face) { collections.Add(new Face() { ImagePath = path, FaceId = face.PersistedFaceId.ToString(), }); }