Ejemplo n.º 1
0
    /// <summary>
    /// Deletes existing person from a person group. Persisted face images of the person will also be deleted.
    /// </summary>
    /// <param name="person">Person to be deleted.</param>
    public void DeleteUser(Person person)
    {
        if (userGroupId != initedGroupId)
        {
            GetOrGreateUserGroup();
        }
        if (userGroupId != initedGroupId)
        {
            return;
        }

        if (faceManager != null && !string.IsNullOrEmpty(userGroupId) && person != null)
        {
            faceManager.DeletePerson(userGroupId, person.personId);
            faceManager.TrainPersonGroup(userGroupId);
        }
    }
Ejemplo n.º 2
0
    /// <summary>
    /// Deletes existing person from a person group. Persisted face images of the person will also be deleted.
    /// </summary>
    /// <param name="person">Person to be deleted.</param>
    public void DeleteUser(Person person)
    {
        Debug.Log("DeleteUser_Mark1");         //pass

        if (userGroupId != initedGroupId)
        {
            Debug.Log("DeleteUser_Mark2");             //fail
            GetOrCreateUserGroup();
        }
        if (userGroupId != initedGroupId)
        {
            Debug.Log("DeleteUser_Mark3");             //fail
            return;
        }
        Debug.Log("DeleteUser_Mark4");         //pass
        if (faceManager != null && !string.IsNullOrEmpty(userGroupId) && person != null)
        {
            Debug.Log("DeleteUser_Mark5");             //pass
            faceManager.DeletePerson(userGroupId, person.personId);
            Debug.Log("DeleteUser_Mark6");             //pass
            faceManager.TrainPersonGroup(userGroupId);
        }
    }