Method for providing avatar and electronic device supporting the same
An electronic device is provided. The electronic device includes a memory and at least one processor. The at least one processor may be configured to determine at least one image including a first face corresponding to a designated face, among one or more images stored in the memory, obtain first values of a plurality of attributes related to the first face, compare, for each attribute, the first values of the plurality of attributes related to the first face with second values of a plurality of attributes corresponding to graphic objects constituting an avatar, the graphic objects being stored in the memory, identify whether at least one first attribute exists among the plurality of attributes related to the first face, the at least one first attribute having a first value among the first values, a difference between the first value and a second value of the at least one first attribute being equal to or greater than a threshold, the second value being included the second values, and based on identifying that at least one first attribute exists among the plurality of attributes related to the first face, update the avatar, based on the first value of the at least one first attribute.
1 . An electronic device comprising:
at least one processor; and
memory storing instructions that, when executed by the at least one processor individually or collectively, cause the electronic device to:
determine at least one first image including a first face of a user,
obtain first values of a plurality of attributes related to the first face,
compare, for each attribute, the first values of the plurality of attributes related to the first face with second values of a plurality of attributes corresponding to graphic objects included in a first avatar which has been created based on an image including the first face of the user, and
create a new avatar based on comparing, for each attribute, a threshold corresponding to that attribute and a difference between the first values and the second values.
2 . The electronic device of claim 1 , wherein the instructions, when executed by the at least one processor individually or collectively, further cause the electronic device to:
identify whether at least one first attribute exists among the plurality of attributes related to the first face, the at least one first attribute having a first attribute value among the first values, a difference between the first attribute value and a second attribute value of the at least one first attribute being equal to or greater than a first threshold, the second attribute value being included in the second values, and
update the first avatar based on the difference between the first attribute value and the second attribute value.
3 . The electronic device of claim 2 , wherein the first avatar is updated based on the first attribute value of the at least one first attribute incase that the at least one first attribute exists among the plurality of attributes related to the first face.
4 . The electronic device of claim 1 , wherein the instructions, when executed by the at least one processor individually or collectively, cause the electronic device to create the new avatar, based on each of differences between the first values and the second values being equal to or greater than the threshold.
5 . The electronic device of claim 2 , wherein the instructions, when executed by the at least one processor individually or collectively, further cause the electronic device to maintain the first avatar, based on each of differences between the first values and the second values being less than the first threshold.
6 . The electronic device of claim 2 , wherein the instructions, when executed by the at least one processor individually or collectively, further cause the electronic device to:
obtain a detailed value of the at least one first attribute, based on identifying that the at least one first attribute exists among the plurality of attributes related to the first face, and
update the first avatar, based on the detailed value of the at least one first attribute.
7 . The electronic device of claim 1 , wherein the instructions, when executed by the at least one processor individually or collectively, further cause the electronic device to:
display a representative image including a face of a particular user of the electronic device through a display of the electronic device, and
designate the face of the particular user of the electronic device included in the representative image as a designated face, based on a user input to the representative image.
8 . The electronic device of claim 1 , wherein, to determine the at least one first image, the instructions, when executed by the at least one processor individually or collectively, further cause the electronic device to:
select at least one candidate image among one or more images stored in the memory, based on a number of times by which an image is displayed through a display of the electronic device while a gallery application is executed, whether a function designated for an image has been performed, whether an image has been shared with an external electronic device, whether at least some of the one or more images stored in the memory include a same looking face, and/or a number of images including the same looking face obtained within a designated period,
detect a face in the at least one candidate image, and
determine the at least one first image by comparing the first face corresponding to a designated face and the detected face in the at least one candidate image.
9 . The electronic device of claim 1 , wherein, to determine the at least one first image, the instructions, when executed by the at least one processor individually or collectively, further cause the electronic device to:
select at least one candidate image corresponding to a designated face among one or more images stored in the memory, and
determine the at least one first image among the at least one candidate image, based on a number of times by which an image is displayed through a display of the electronic device while a gallery application is executed, whether a function designated for an image has been performed, whether an image has been shared with an external electronic device, whether at least some of the one or more images stored in the memory include a same looking face, and/or a number of images including the same looking face obtained within a designated period.
10 . The electronic device of claim 1 , wherein the instructions, when executed by the at least one processor individually or collectively, further cause the electronic device to perform a function of providing the new avatar in a background, based on whether a current battery level of the electronic device is equal to or greater than a designated level, whether the electronic device is currently being charged, whether a screen of the electronic device is in an active state, a number of images obtained after a designated time, and/or the designated time.
11 . A method performed by an electronic device, the method comprising:
determining at least one first image including a first face of a user;
obtaining first values of a plurality of attributes related to the first face;
comparing, for each attribute, the first values of the plurality of attributes related to the first face with second values of a plurality of attributes corresponding to graphic objects included in a first avatar which has been created based on an image including the first face of the user; and
creating a new avatar based on comparing, for each attribute, a threshold corresponding to that attribute and a difference between the first values and the second values.
12 . The method of claim 11 , further comprising:
identifying whether at least one first attribute exists among the plurality of attributes related to the first face, the at least one first attribute having a first attribute value among the first values, a difference between the first attribute value and a second attribute value of the at least one first attribute being equal to or greater than a first threshold, the second attribute value being included in the second values; and
updating the first avatar based on the difference between the first attribute value and the second attribute value.
13 . The method of claim 12 , wherein the first avatar is updated based on the first attribute value of the at least one first attribute, in case that the at least one first attribute exists among the plurality of attributes related to the first face.
14 . The method of claim 11 , wherein creating the new avatar comprises creating the new avatar, based on each of differences between the first values and the second values being equal to or greater than a first the threshold.
15 . The method of claim 12 , further comprising:
maintaining the first avatar, based on each of differences between the first values and the second values being less than the first threshold.
16 . The method of claim 12 , further comprising:
obtaining a detailed value of the at least one first attribute, based on identifying that the at least one first attribute exists among the plurality of attributes related to the first face; and
updating the first avatar, based on the detailed value of the at least one first attribute.
17 . The method of claim 11 , further comprising:
displaying a representative image including a face of a particular user of the electronic device through a display of the electronic device; and
designating the face of the particular user of the electronic device included in the representative image as a designated face, based on a user input to the representative image.
18 . The method of claim 11 , wherein determining the at least one first image comprises:
selecting at least one candidate image among one or more images stored in memory of the electronic device, based on a number of times by which an image is displayed through a display of the electronic device while a gallery application is executed, whether a function designated for an image has been performed, whether an image has been shared with an external electronic device, whether at least some of the one or more images stored in the memory include a same looking face, and/or a number of images including the same looking face obtained within a designated period;
detecting a face in the at least one candidate image; and
determining the at least one first image by comparing the first face corresponding to a designated face and the detected face in the at least one candidate image.
19 . The method of claim 11 , wherein determining the at least one first image comprises:
selecting at least one candidate image corresponding to a designated face among one or more images stored in memory of the electronic device; and
determining the at least one first image among the at least one candidate image, based on a number of times by which an image is displayed through a display of the electronic device while a gallery application is executed, whether a function designated for an image has been performed, whether an image has been shared with an external electronic device, whether at least some of the one or more images stored in the memory include a same looking face, and/or a number of images including the same looking face obtained within a designated period.
20 . A non-transitory computer-readable medium having recorded thereon computer executable instructions, the computer executable instructions that, when executed by at least one processor of an electronic device individually or collectively, cause the electronic device to:
determine at least one first image including a first face of a user,
obtain first values of a plurality of attributes related to the first face,
compare, for each attribute, the first values of the plurality of attributes related to the first face with second values of a plurality of attributes corresponding to graphic objects included in a first avatar which has been created based on an image including the first face of the user, and
create a new avatar based on comparing, for each attribute, a threshold corresponding to that attribute and a difference between the first values and the second values.