示例#1
0
            public async Task Clear()
            {
                try
                {
                    await _faceApiManager.DeleteGroup();
                }
                catch (Exception ex)
                {
                    Debug.WriteLine(ex.Message);
                }
                await _faceApiManager.CreatePersonGroup();

                _msgManager.WriteMessage("Group Created");
                var orsensId = await _faceApiManager.CreatePerson("Orsen");

                await _faceApiManager.AddPersonFace(orsensId,
                                                    _imgProcessing.ImageToStream(_imgProcessing.LoadImageFromFile("Orsen.jpg")));

                _msgManager.WriteMessage("Face added.");
            }
示例#2
0
 public async Task <AddPersistedFaceResult> AddFaceToPerson(Guid personId, Image faceImg)
 {
     return(await _faceApiManager.AddPersonFace(personId, ImageProcessing.ImageProcessingInstance.ImageToStream(faceImg)));
 }