Exemplo n.º 1
0
        /// <summary>
        /// Checks if the person has been seen before
        /// </summary>
        /// <param name="fId"></param>
        /// <returns></returns>
        public static async Task <bool> CheckIfFaceWasSeenBefore(Guid fId, FaceAPI.FaceServiceClient faceClient, List <Guid> guids)
        {
            if (guids.Count == 0)
            {
                return(false);
            }

            bool retVal = false;

            SimilarFace[] val = await faceClient.FindSimilarAsync(fId, guids.ToArray());

            foreach (SimilarFace similarFace in val)
            {
                if (similarFace.Confidence > 0.4)
                {
                    retVal = true;
                }
            }

            return(retVal);
        }