Role picture generation and displaying method, device, and storage medium
Embodiments of the disclosure provide a role information method, a device, a storage medium, and a program product. The method includes: collecting a video picture, performing portrait recognition on the video picture, and obtaining portrait information of a user; acquiring an effect prop corresponding to a target role selected by the user and obtaining a first role picture of the user by loading an effect onto the portrait information according to the effect prop, and transmitting the first role picture to a server; and pulling at least one second role picture transmitted by another user from the server, synthesizing the second role picture and the first role picture, and pushing a synthesized picture to a display interface for displaying. The embodiment can provide more abundant information for the user, such that pleasure of a game can be enhanced, and user experience can be improved.
1 . A method for role information interaction, comprising:
obtaining portrait information of a user by collecting a video picture and performing portrait recognition on the video picture;
acquiring an effect corresponding to a first role selected by the user and obtaining a first role picture of the user by loading the effect onto the portrait information, and transmitting the first role picture to a server;
pulling at least one second role picture from the server, synthesizing the second role picture and the first role picture, and displaying a synthesized picture on a display interface, wherein the display interface comprises a plurality of display boxes, different display boxes correspond to different roles, and the pushing the synthesized picture to the display interface for displaying comprises displaying the first role picture and the at least one second role picture in corresponding display boxes on the display interface; and
disabling, in response to a touch operation by the user on a switch control, display of a picture corresponding to a display box selected by the user from the plurality of display boxes.
2 . The method according to claim 1 , wherein the obtaining portrait information of a user by collecting a video picture and performing portrait recognition on the video picture, comprises:
obtaining the portrait information of the user by collecting the video picture in response to an end instruction of a last game session or a confirmation operation triggered by the user through a video collection confirmation interface and performing portrait recognition on the video picture.
3 . The method according to claim 1 , wherein the loading an effect onto the portrait information according to the effect comprises:
obtaining portrait information having a corrected face shape by correcting a face shape of a face in the portrait information according to a face shape feature of the first role; and
loading a headdress and/or face makeup onto a portrait head in the portrait information having a corrected face shape; and/or loading clothes onto a portrait trunk in the portrait information having a corrected face shape.
4 . The method according to claim 1 , wherein the plurality of display boxes comprises a plurality of templates, and the pushing the synthesized picture to the display interface for displaying comprises:
displaying, in response to a selection operation by the user for a style template, the first role picture and the at least one second role picture in the template of selected by the user.
5 . The method according to claim 1 , wherein after the pushing the synthesized picture to the display interface for displaying, the method further comprises:
adjusting, in response to a dragging operation by the user on a first display box of the plurality of display boxes, a position of the first display box in the display interface.
6 . The method according to claim 5 , wherein the adjusting, in response to a dragging operation by the user on a first display box of the plurality of display boxes, a position of the first display box in the display interface, comprises:
monitoring, in response to a dragging operation by the user from initial position coordinates of the first display box as a start point, distance information between current position coordinates of the first display box and position coordinates of the other display boxes, respectively; and exchanging, in response to determining that the distance information is smaller than a preset value, positions of the first target display box and a display box corresponding to the distance information smaller than the preset value.
7 . The method according to claim 5 , wherein the adjusting, in response to a dragging operation by the user for a first display box of the plurality of display boxes, a position of the first display box in the display interface, comprises:
monitoring, in response to the dragging operation by the user on the first display box of the plurality of display boxes, overlapping areas of the first display box and the other display boxes, respectively; and
exchanging, in response to release of the dragging operation by the user, positions of the first display box and the display box corresponding to a maximum value of the overlapping areas.
8 . The method according to claim 1 , wherein both the first role picture and the at least one second role picture comprise voice information, and after the pushing the synthesized picture to the display interface for displaying, the method further comprises:
monitoring voice information corresponding to each display box of the plurality of display boxes; and
emphasizing, in response to existence of a second display box including voice information with a volume greater than a preset value, the second display box.
9 . The method according to claim 8 , wherein the emphasizing the second display box comprises:
performing at least one of bolding, highlighting and color changing on the second display box; or
adding an emphasis identifier into the second display box.
10 . The method according to claim 8 , wherein the display interface comprises a floating-layer display zone, and the floating-layer display zone is located above the plurality of display boxes; and the emphasizing the second display box comprises:
displaying a picture corresponding to the second target display box in the floating-layer display zone in a scale-up manner.
11 . The method according to claim 1 , wherein the display interface comprises a functional zone and a picture display zone; the plurality of display boxes is displayed in the picture display zone; the switch control is configured in the functional zone; and after the disabling display of the picture corresponding to a third display box selected by the user from the plurality of display boxes, the method further comprises:
hiding the third display box;
computing a difference between a total area of the picture display zone and a display area of the third display box; and
re-planning each fourth display box of the plurality of display boxes except the third display box according to the difference, to display a picture corresponding to each fourth display box in a scale-up manner.
12 . The method according to claim 1 , wherein before the collecting a video picture and performing portrait recognition on the video picture, the method further comprises:
assigning, in response to a selection operation input by the user through a role selection interface, a corresponding first role to the user;
pushing, in response to a selection operation input by the user through a real-person avatar switching interface, an avatar effect loading interface to the user, and displaying a real-person avatar of the user and an effect list corresponding to the first role in the avatar effect loading interface;
obtaining a customized role avatar of the user by loading, in response to a selection operation by the user on the effect list, an effect selected by the user from the effect list onto the real-person avatar; and
obtaining an updated game interface by fusing the customized role avatar and a human body image of an animation figure corresponding to the first role in a game interface, and pushing the updated game interface to the user in a preset order.
13 . An electronic device, comprising: a visual sensor, a processor, a memory, a display, and a transceiver, wherein the visual sensor, the processor, the memory, the display and the transceiver are interconnected to each other by a circuit;
the memory stores a computer-executable instruction; the visual sensor is configured to collect a video picture; the transceiver is configured to transmit data to and receive data from a server; the display is configured to display a synthesized picture; and the computer-executable instruction stored in the memory, when executed by the processor, causes the processor to perform operations comprising:
obtaining portrait information of a user by collecting a video picture and performing portrait recognition on the video picture;
acquiring an effect corresponding to a first role selected by the user and obtain a first role picture of the user by loading the effect onto the portrait information, and transmitting the first role picture to a server;
pulling at least one second role picture transmitted by another user from the server, synthesize the second role picture and the first role picture, and displaying a synthesized picture on a display interface, wherein the display interface comprises a plurality of display boxes, different display boxes correspond to different roles, and the pushing the synthesized picture to the display interface for displaying comprises displaying the first role picture and the at least one second role picture in corresponding display boxes on the display interface; and
disabling, in response to a touch operation by the user on a switch control, display of a picture corresponding to a display box selected by the user from the plurality of display boxes.
14 . A non-transitory computer-readable storage medium, wherein the computer-readable storage medium stores a computer-executable instruction, the computer-executable instruction, when executed by a processor, causes the processor to perform operations comprising:
obtaining portrait information of a user by collecting a video picture and performing portrait recognition on the video picture;
acquiring an effect corresponding to a first role selected by the user and obtaining a first role picture of the user by loading the effect onto the portrait information, and transmitting the first role picture to a server;
pulling at least one second role picture from the server, synthesize the second role picture and the first role picture, and displaying a synthesized picture on a display interface, wherein the display interface comprises a plurality of display boxes, different display boxes correspond to different roles, and the pushing the synthesized picture to the display interface for displaying comprises displaying the first role picture and the at least one second role picture in corresponding display boxes on the display interface; and
disabling, in response to a touch operation by the user on a switch control, display of a picture corresponding to a display box selected by the user from the plurality of display boxes.
15 . The electronic device according to claim 13 , wherein when the obtaining portrait information of a user by collecting a video picture and performing portrait recognition on the video picture comprises:
obtaining the portrait information of the user by collecting the video picture in response to an end instruction of a last game session or a confirmation operation triggered by the user through a video collection confirmation interface and performing portrait recognition on the video picture.
16 . The electronic device according to claim 13 , wherein when the loading an effect onto the portrait information according to the effect comprises:
obtaining portrait information having a corrected face shape by correcting a face shape of a face in the portrait information according to a face shape feature of the first role; and
loading a headdress and/or face makeup onto a portrait head in the portrait information having a corrected face shape; and/or load clothes onto a portrait trunk in the portrait information having a corrected face shape.
17 . The electronic device according to claim 13 , wherein the plurality of display boxes comprises a plurality of templates, and the pushing the synthesized picture to the display interface for displaying comprises:
displaying, in response to a selection operation by the user for a style template, the first role picture and the at least one second role picture in the template selected by the user.
18 . The electronic device according to claim 13 , the operations further comprising:
adjusting, in response to a dragging operation by the user on a first display box among the plurality of display boxes, a position of the first display box on the display interface.
19 . The electronic device according to claim 13 , wherein both the first role picture and the at least one second role picture comprise voice information, and the operations further comprise:
monitoring voice information corresponding to each display box of the plurality of display boxes; and
emphasizing, in response to existence of a second display box including voice information with a volume greater than a preset value, the second display box.
20 . The electronic device according to claim 13 , wherein the display interface comprises a functional zone and a picture display zone; the plurality of display boxes is displayed in the picture display zone; the switch control is configured in the functional zone; and
after the disabling display of the picture, the operations further comprise:
hiding a third display box among the plurality of display boxes;
computing a difference between a total area of the picture display zone and a display area of the third display box; and
re-planning each fourth display box of the plurality of display boxes except the third display box according to the difference, to display a picture corresponding to each fourth display box in a scale-up manner.