CN111768478B - Image synthesis method and device, storage medium and electronic equipment - Google Patents

Image synthesis method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN111768478B
CN111768478B CN202010668393.9A CN202010668393A CN111768478B CN 111768478 B CN111768478 B CN 111768478B CN 202010668393 A CN202010668393 A CN 202010668393A CN 111768478 B CN111768478 B CN 111768478B
Authority
CN
China
Prior art keywords
image
player
template
face
facial
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010668393.9A
Other languages
Chinese (zh)
Other versions
CN111768478A (en
Inventor
覃诗晴
王高垒
肖裕鑫
曾鸿苹
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202010668393.9A priority Critical patent/CN111768478B/en
Publication of CN111768478A publication Critical patent/CN111768478A/en
Application granted granted Critical
Publication of CN111768478B publication Critical patent/CN111768478B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T13/00Animation
    • G06T13/203D [Three Dimensional] animation
    • G06T13/403D [Three Dimensional] animation of characters, e.g. humans, animals or virtual beings
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/70Game security or game management aspects
    • A63F13/71Game security or game management aspects using secure communication between game devices and game servers, e.g. by encrypting game data or authenticating players
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • G06F3/0482Interaction with lists of selectable items, e.g. menus
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/04845Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range for image manipulation, e.g. dragging, rotation, expansion or change of colour
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20212Image combination
    • G06T2207/20221Image fusion; Image merging
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Software Systems (AREA)
  • Multimedia (AREA)
  • Artificial Intelligence (AREA)
  • Medical Informatics (AREA)
  • Evolutionary Computation (AREA)
  • Data Mining & Analysis (AREA)
  • Computing Systems (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Business, Economics & Management (AREA)
  • Mathematical Physics (AREA)
  • General Business, Economics & Management (AREA)
  • Computer Security & Cryptography (AREA)
  • User Interface Of Digital Computer (AREA)
  • Image Analysis (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The embodiment of the application discloses an image synthesis method, an image synthesis device, a storage medium and electronic equipment, wherein the method relates to a deep learning direction in the field of artificial intelligence and comprises the following steps: displaying a game task interface, displaying a virtual object template selection interface corresponding to a game task when triggering operation aiming at a game task triggering control is detected, wherein the virtual object template selection interface comprises a plurality of candidate object templates, determining a target object template from the plurality of candidate object templates when the template selection operation aiming at the virtual object template selection interface is detected, displaying a face image uploading interface, acquiring a player face image through the face image uploading interface, and displaying a plurality of synthesized images, wherein the synthesized images are synthesized images of virtual object images corresponding to the player face image and preset object images. The scheme can generate a plurality of synthesized images comprising different preset object images according to the player face images.

Description

Image synthesis method and device, storage medium and electronic equipment
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to an image synthesis method, an image synthesis device, a storage medium, and an electronic device.
Background
The network game is an individual multi-player online game with sustainability, which takes the Internet as a transmission medium, takes a game operator server and a player computer as processing terminals and takes game client software as an information interaction window and aims at realizing entertainment, leisure, communication and virtual achievement. In order to promote the interest of the game, game tasks can be set in the game, so that players can be guided to play the game, and certain rewards can be given to the players.
Disclosure of Invention
The embodiment of the application provides an image synthesis method, an image synthesis device, a storage medium and electronic equipment.
The embodiment of the application provides an image synthesis method, which comprises the following steps:
displaying a game task interface, wherein the game task interface comprises a game task trigger control;
when triggering operation of the game task triggering control is detected, displaying a virtual object template selection interface corresponding to the game task, wherein the virtual object template selection interface comprises a plurality of candidate object templates;
determining a target object template from the plurality of candidate object templates when a template selection operation for the virtual object template selection interface is detected;
Displaying a facial image uploading interface, and collecting facial images of players through the facial image uploading interface;
and displaying a plurality of synthesized images, wherein the synthesized images are synthesized images of virtual object images corresponding to the player face images and preset object images.
Correspondingly, the embodiment of the application also provides an image synthesis device, which comprises:
the display module is used for displaying a game task interface, wherein the game task interface comprises a game task trigger control;
the trigger module is used for displaying a virtual object template selection interface corresponding to the game task when the trigger operation of the game task trigger control is detected, wherein the virtual object template selection interface comprises a plurality of candidate object templates;
a selection module for determining a target object template from the plurality of candidate object templates when a template selection operation for the virtual object template selection interface is detected;
the uploading module is used for displaying a facial image uploading interface and collecting facial images of players through the facial image uploading interface;
the display module is used for displaying a plurality of synthesized images, wherein the synthesized images are synthesized images of virtual object images corresponding to the player face images and preset object images.
At this time, the selection module may be specifically configured to display a plurality of candidate object templates corresponding to the selected sex when a sex selection operation for the virtual object template selection interface is detected, and determine a target object template from the plurality of candidate object templates when a template selection operation for the plurality of candidate object templates is detected.
Optionally, in some embodiments, the uploading module may include a first display sub-module, an acquisition sub-module, and a generation sub-module, as follows:
the first display sub-module is used for displaying a facial image uploading interface;
the acquisition sub-module is used for acquiring an initial face image uploaded by a player when detecting the player authorization image uploading function;
and the generation sub-module is used for generating a player face image based on the initial face image.
At this time, the generating sub-module may be specifically configured to perform image compression processing on the initial face image to obtain a compressed image, perform image clipping processing on the compressed image to obtain a clipped image, and perform image effect processing on the clipped image to obtain a face image of the player.
Optionally, in some embodiments, the image synthesis apparatus may further include a fusion module and a generation module, as follows:
The fusion module is used for carrying out facial image fusion on the player facial image and the template facial image in the target object template to obtain a virtual object image;
and the generation module is used for generating a plurality of synthesized images based on the virtual object image and a plurality of preset object images.
Optionally, in some embodiments, the fusion module may include a feature point identification sub-module and a pixel point fusion sub-module, as follows:
the characteristic point recognition sub-module is used for recognizing the characteristic points of the player face image to obtain the characteristic points of the player face when the fact that the proportion of the effective face pixel points in the player face image to the face pixel points meets the preset condition is detected;
and the pixel point fusion sub-module is used for carrying out pixel point fusion on the player face image and the template face image in the target object template based on the player face feature points to obtain a virtual object image.
At this time, the feature point recognition sub-module may be specifically configured to, when detecting that the proportion of the effective facial pixel points in the player facial image to the facial pixel points satisfies a preset condition, perform feature point recognition on the player facial image to obtain an initial facial feature point, and perform feature point alignment on the player facial image based on a preset facial template and the initial facial feature point to obtain a player facial feature point.
In addition, the embodiment of the application further provides a computer storage medium, where a plurality of instructions are stored, where the instructions are adapted to be loaded by a processor to perform the steps in any of the image synthesis methods provided in the embodiment of the application.
In addition, the embodiment of the application also provides an electronic device, which comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor realizes the steps in any image synthesis method provided by the embodiment of the application when executing the program.
The method and the device can display a game task interface, when triggering operation of a game task triggering control is detected, display a virtual object template selection interface corresponding to a game task, wherein the virtual object template selection interface comprises a plurality of candidate object templates, when the template selection operation of the virtual object template selection interface is detected, a target object template is determined from the plurality of candidate object templates, a face image uploading interface is displayed, a player face image is acquired through the face image uploading interface, a plurality of synthesized images are displayed, and the synthesized images are synthesized images of virtual object images corresponding to the player face image and preset object images. The scheme can generate a plurality of synthesized images comprising different preset object images according to the player face images.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments will be briefly introduced below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic view of a scene of an image synthesis system according to an embodiment of the present application;
FIG. 2 is a first flowchart of an image composition method provided in an embodiment of the present application;
FIG. 3 is a second flowchart of an image composition method provided by an embodiment of the present application;
FIG. 4 is a game task interface provided by an embodiment of the present application;
FIG. 5 is a virtual object template selection interface provided by an embodiment of the present application;
FIG. 6 is a facial image upload interface provided by an embodiment of the present application;
FIG. 7 is an image validation interface provided by an embodiment of the present application;
FIG. 8 is an image sharing interface provided by an embodiment of the present application;
FIG. 9 is a first post-synthesis image provided by an embodiment of the present application;
FIG. 10 is a second post-synthesis image provided by an embodiment of the present application;
FIG. 11 is a third post-synthesis image provided by an embodiment of the present application;
FIG. 12 is an image sharing interface provided by an embodiment of the present application;
FIG. 13 is a schematic diagram of a facial feature point template provided by an embodiment of the present application;
FIG. 14 is a third flowchart of an image composition method provided by an embodiment of the present application;
fig. 15 is a schematic structural diagram of an image synthesizing apparatus provided in an embodiment of the present application;
fig. 16 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The following description of the technical solutions in the embodiments of the present application will be made clearly and completely with reference to the drawings in the embodiments of the present application, and it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to fall within the scope of the invention.
The embodiment of the application provides an image synthesis method, an image synthesis device, a storage medium and electronic equipment. Specifically, the image synthesis method of the embodiment of the application may be executed by an electronic device, where the electronic device may be a terminal or a server, and the terminal may be a device such as a mobile phone, a tablet computer, a notebook computer, an intelligent television, a wearable intelligent device, a personal computer (PC, personal Computer), and the like. The terminal may include a client, which may be a video client or a browser client, and the server may be a single server or a server cluster formed by a plurality of servers.
For example, referring to fig. 1, taking an example of the image synthesis method performed by an electronic device, the electronic device may display a game task interface, when a trigger operation for a game task trigger control is detected, display a virtual object template selection interface corresponding to a game task, where the virtual object template selection interface includes a plurality of candidate object templates, when a template selection operation for the virtual object template selection interface is detected, determine a target object template from the plurality of candidate object templates, display a face image uploading interface, and collect a face image of a player through the face image uploading interface, and display a plurality of synthesized images, where the synthesized images are synthesized images of a virtual object image corresponding to the face image of the player and a preset object image.
The image synthesis method provided by the embodiment of the application relates to a machine learning direction in the field of artificial intelligence. The embodiment of the application can complete the facial image synthesis of the template facial image in the player facial image and the target object template by using the facial image synthesis technology in the machine learning field, thereby improving the image synthesis effect and the image synthesis efficiency of the facial image synthesis.
Among these, artificial intelligence (Artificial Intelligence, AI) is the theory, method, technique and application system that uses a digital computer or a digital computer-controlled machine to simulate, extend and extend human intelligence, sense the environment, acquire knowledge and use knowledge to obtain optimal results. In other words, artificial intelligence is an integrated technology of computer science that attempts to understand the essence of intelligence and to produce a new intelligent machine that can react in a similar way to human intelligence. Artificial intelligence, i.e. research on design principles and implementation methods of various intelligent machines, enables the machines to have functions of sensing, reasoning and decision. The artificial intelligence technology is a comprehensive subject, and relates to the technology with wide fields, namely the technology with a hardware level and the technology with a software level. The artificial intelligence software technology mainly comprises the directions of computer vision technology, machine learning/deep learning and the like.
Among them, machine Learning (ML) is a multi-domain interdisciplinary, and involves multiple disciplines such as probability theory, statistics, approximation theory, convex analysis, algorithm complexity theory, etc. It is specially studied how a computer simulates or implements learning behavior of a human to acquire new knowledge or skills, and reorganizes existing knowledge structures to continuously improve own performance. Machine learning is the core of artificial intelligence, a fundamental approach to letting computers have intelligence, which is applied throughout various areas of artificial intelligence. Machine learning and deep learning typically include techniques such as artificial neural networks, confidence networks, reinforcement learning, transfer learning, induction learning, teaching learning, and the like.
The following will describe in detail. The following description of the embodiments is not intended to limit the preferred embodiments.
The embodiment of the application provides an image synthesis method, which can be executed by a terminal or a server or can be executed by the terminal and the server together; the embodiment of the present application is described by taking an image synthesis method performed by a server as an example, and as shown in fig. 2, a specific flow of the image synthesis method may be as follows:
201. And displaying a game task interface.
Wherein, the game task refers to means for purposefully guiding a player to play a game activity and giving a certain prize to the player, and the game task can enable the player to know the game content, participate in game behaviors, experience game functions, complete game events, obtain game fun and the like. For example, a player may be able to perform a group shot with a particular star by uploading a photograph and obtain a corresponding game prize.
The game task interface is an interface for indicating tasks included in the target game, and includes a game task trigger control, for example, as shown in fig. 4, the game task interface includes a game task trigger control of "collusion rewards", through which a player can enter a game task and experience the game task, and the game task interface can also note other game rules or task playing methods, and so on.
In practical applications, for example, a game task interface as shown in fig. 4 may be displayed, where the game task interface includes a game task trigger control of "collage bonus", where the game task trigger control may be in the form of a button, and the player may enter a corresponding game task by clicking the "collage bonus" button. The game mission interface may also include instructions related to scoring a mission to enjoy a prize opportunity: the login page can obtain 1 sharing lottery opportunity, the collection can obtain 2 sharing lottery opportunities, and the friend sharing collection can obtain 2 sharing lottery opportunities, so that a player can obtain corresponding rewards by clicking a subsequent get button. The game task interface may further include a share prize display, that is, when the number of times the prize is obtained reaches the specified amount, the player may obtain the corresponding prize by clicking a "get" button in the share prize display area of the game task interface.
202. When the triggering operation of the game task triggering control is detected, displaying a virtual object template selection interface corresponding to the game task.
The virtual object template selection interface is an interface for indicating a player to select a virtual object template needed by the player, the virtual object template selection interface comprises a plurality of candidate object templates, and the electronic device can generate a result needed by the player based on the file uploaded by the player and the selected virtual object template. For example, the game task of the application may be a photo task of a player and a star, that is, a photo of the player and the star is generated by using a facial image of the player uploaded by the player, wherein a part of the player in the photo is obtained by combining the facial image of the player into a preset virtual object template, and the virtual object template provides information such as clothes, actions, expressions and the like for the part of the player in the photo. Various virtual object templates can be included in the game piece of the application, and different virtual object templates correspond to one or more items of information such as different pieces of apparel, actions, expressions and the like. As shown in fig. 5, the virtual object template selection interface includes three candidate object templates, and the apparel, action and expression of the three candidate object templates are not identical. The player can select a target object template required by the player from the three candidate object templates through a template selection operation.
In practical applications, for example, when it is detected that the player clicks the "collusion bonus" button in the game task interface shown in fig. 4, it is indicated that the player performs a triggering operation for the game task triggering control, a virtual object template selection interface shown in fig. 5 may be displayed, where the virtual object template selection interface includes three candidate object templates, and the three candidate object templates correspond to models with different clothes, actions and expressions.
203. When a template selection operation for the virtual object template selection interface is detected, a target object template is determined from a plurality of candidate object templates.
In practical applications, for example, when it is detected that the player performs a template selection operation on the virtual object template selection interface as shown in fig. 5, a target object template selected by the player may be determined from a plurality of candidate object templates.
In one embodiment, in order to enhance the interest of the game, the player may also select the sex first, and then select the virtual object template according to the selected sex. Specifically, the step of determining a target object template from the plurality of candidate object templates when a template selection operation for the virtual object template selection interface is detected may include:
When a gender selection operation for the virtual object template selection interface is detected, displaying a plurality of candidate object templates corresponding to the selected gender;
when a template selection operation is detected for the plurality of candidate object templates, a target object template is determined from the plurality of candidate object templates.
In practical applications, for example, when the game task is a group-shooting task, the player needs to upload the facial image, and the system fuses the facial image uploaded by the player into the target object template selected by the player. Because the men and women have differences among the clothes, actions and facial features, the facial image fusion aiming at the male facial image and the facial image fusion aiming at the female facial image have differences, the gender selection can be firstly carried out on the players, so that on one hand, the image fusion result which is more in line with objective facts can be generated, and on the other hand, the personalized experience of the players in the game can be considered.
Wherein, as shown in fig. 5, the virtual object template selection interface comprises two buttons of a 'man' and a 'woman', when detecting that the player clicks the 'man' button, the sex selected by the player is shown as a male; when it is detected that the player clicks the "female" button, the sex selected by the player is indicated as female. And if the sex selected by the player is male, displaying a plurality of candidate object templates corresponding to the male in the virtual object template selection interface. As shown in fig. 5, when it is detected that the player clicks on an area corresponding to one of the candidate templates, the selected candidate template may be determined as the target object template.
In an embodiment, the user may also perform the gender selection operation through a popup window, for example, the popup window including a "man" button and a "woman" button may be popped up when the trigger operation for the game task trigger control is detected, and the user may select the gender by clicking the buttons.
204. And displaying a facial image uploading interface, and collecting facial images of the player through the facial image uploading interface.
The facial image uploading interface is an interface for indicating the player to upload an image, for example, as shown in fig. 6, the facial image uploading interface includes three buttons of "upload", "self-timer" and "ok", and when detecting that the player clicks the "upload" button, the facial image of the player can be obtained by pulling up a local file or the like; when the player is detected to click a self-timer button, a camera can acquire a face image of the player; when it is detected that the player clicks the "ok" button, it is indicated that the player has determined that an image needs to be uploaded.
In practical applications, for example, after the player selects the target object template, a facial image uploading interface as shown in fig. 6 may be displayed, and the player may upload the facial image of the player through various modes such as image uploading or real-time shooting.
In one embodiment, to ensure the security of the game task, the player may first be provided with an image upload function. Specifically, the step of displaying a facial image upload interface and capturing a facial image of a player through the facial image upload interface may include:
displaying a facial image uploading interface;
when detecting that a player authorizes an image uploading function, acquiring an initial face image uploaded by the player;
a player face image is generated based on the initial face image.
In practical applications, for example, after the player selects the target object template, a face image uploading interface as shown in fig. 6 may be displayed, and before the player uploads the image, the player may be allowed to perform setting of the image uploading function in a pop-up window or the like, in order to ensure the security of the game task. If the player authorizes the image uploading function, the step of uploading the image can be continued; if the player does not have the function of authorizing the image uploading, the player does not want the game to acquire the image, and the player can be prompted to be unable to continue to experience the game task.
If the player is detected to authorize the image uploading function, the player can upload the unprocessed initial face image in various modes such as image uploading or real-time shooting. After the success of the initial facial image uploading is detected, the player can also determine whether to use the image, if the player uploads the wrong image due to misoperation or obtains the unsatisfactory image of the player in real time through self-shooting, the player can directly select not to use the image and return to the image uploading step until the satisfactory image of the player is uploaded. If the player has uploaded satisfactory images, image optimization can be performed on the initial facial images uploaded by the player to obtain optimized player facial images. The method can improve the information security of the player, can select unauthorized information if the player does not want to acquire the images of the player, can ensure the game experience of the player, and can select images which are not used if the player is not satisfied with the uploaded images until the satisfied images are uploaded.
In one embodiment, for example, the system may further audit the initial facial image uploaded by the player, and if the system needs to upload the positive facial image by the player and detects that the player uploads the side facial image, the system may determine the side facial image as a failed image, prompt the player of failed image, and guide the player to re-perform the image uploading step. For another example, if the system needs the player to upload the image without shielding, and the current detection that the player uploads the image with the mask, the image with the mask can be determined as an unqualified image, the player is prompted to reject the image, and the player is guided to execute the image uploading again. For another example, if the system requires the player to upload a clear image, and it detects that the player has uploaded a blurred or unrecognizable image, the system may determine the image as a failed image, prompt the player for failed image, and guide the player to re-perform the image uploading step.
In one embodiment, since the image uploaded by the player may be an unprocessed image, the step of directly fusing the facial images is not suitable, and thus the initial facial image may be processed to obtain a usable facial image of the player. Specifically, the step of generating a player face image based on the initial face image may include:
Performing image compression processing on the initial face image to obtain a compressed image;
performing image interception processing on the compressed image to obtain an intercepted image;
and performing image effect processing on the intercepted image to obtain a player face image.
In practical applications, for example, after the player has determined to use the initial face image, image compression processing may be performed on the initial face image to obtain a compressed image, then size cutting processing is performed on the compressed image according to a preset size to obtain a cut image with a preset size, and then image effect processing is performed on the cut image to obtain the face image of the player, where the image effect processing may include image processing methods such as image enhancement, image restoration, image matching, image segmentation, and so on. The player face image is obtained after image processing, so that the player face image can be ensured to be a face image capable of completing normal functional experience.
205. And displaying a plurality of synthesized images, wherein the synthesized images are synthesized images of virtual object images corresponding to the player face images and preset object images.
The preset object image refers to an image obtained by taking a preset object as a reference. For example, in order to meet the needs of the player, a game task of the player and the star photo may be set, and the part of the star in the finally obtained photo is a preset object image based on the preset star, where the preset object is not required to be a real person, may be a role, a cartoon role, etc. in a movie and television play, may even be an animal, an object, a background, etc., and the preset object image may be a photo, an animation, a video, etc. of the preset object.
The virtual object image corresponding to the player face image is an object image obtained by fusing the player face image with the virtual object template as a reference. For example, in a game mission where a player is in a group with a star, a group as shown in fig. 9 is eventually obtained, and the right part in the group may be referred to as a virtual object image, which is based on a virtual object template, but the face image is related to the face image of the player.
In practical applications, for example, after the face image of the player is successfully acquired, a synthesized image as shown in fig. 9 may be directly displayed, where the synthesized image may be in the format of PNG24, and includes a virtual object image corresponding to the face image of the player, where the clothes, actions, and expressions of the virtual object image are determined according to the virtual object template, and the face image of the virtual object image is a result of fusing the face image of the player and the face image of the virtual object template. The different synthesized images include different preset object images, wherein fig. 9 includes preset object images corresponding to preset object star 1, fig. 10 includes preset object images … corresponding to preset object star 2, that is, the different synthesized images can be regarded as the combination of the player and the different stars, the different synthesized images can be matched with the template moving effects of different styles, after uploading a face image of the player, the player can directly acquire multiple combinations of the player and the different stars, and the player can select the combination of the player and the favorite stars according to own preference and store the images or share the images.
In one embodiment, for example, as shown in fig. 7, the generated synthesized image may be displayed on the interface, where the synthesized image is a combination of the player and the star 1, if the player is not satisfied with the synthesized image, the "replace star" button may be clicked, where another synthesized image is displayed on the interface, where the synthesized image is a combination of the player and the star 2, if the player is not satisfied with the synthesized image, the "replace star" button may be clicked continuously, and so on until a synthesized image satisfied by the player is displayed, where the player may click the "ok" button, indicating that the player has selected the final synthesized image.
In an embodiment, for example, the portion of the virtual object image and the preset object image in the synthesized image is not limited to a static image, that is, the portion of the virtual object image and the preset object image in the synthesized image may be a dynamic image, or an image added with a corresponding animation effect, etc.
In an embodiment, the image synthesis method may specifically further include:
carrying out facial image fusion on the player facial image and a template facial image in the target object template to obtain a virtual object image;
And generating a plurality of synthesized images based on the virtual object image and a plurality of preset object images.
In practical applications, for example, after the face image of the player is obtained, the face image fusion can be performed on the face image of the player and the face image of the template in the target object template to obtain a virtual object image, so that the clothes, the actions and the expressions of the obtained virtual object image are determined according to the virtual object template, and the face image of the virtual object image is the result of the face image of the player and the face image of the virtual object template after fusion. And then generating a synthesized image according to the virtual object image and the preset object image, wherein the image positions of the virtual object image and the preset object image in the synthesized image, the background effect of the synthesized image and the like can be adjusted according to the preference of a user.
In an embodiment, for example, when the face image fusion is required, the client may request the face image fusion interface, perform the face image fusion step by using the corresponding AI technology, and store the face image synthesis result in the database after generating the synthesized image, and then the client may obtain the face image synthesis result from the database.
In an embodiment, the face image fusion may be performed according to the facial feature points, and specifically, the step of performing face image fusion on the player face image and the template face image in the target object template to obtain a virtual object image may include:
when detecting that the proportion of the effective facial pixel points in the player facial image to the facial pixel points meets the preset condition, carrying out feature point recognition on the player facial image to obtain player facial feature points;
and carrying out pixel point fusion on the player face image and the template face image in the target object template based on the player face feature points to obtain a virtual object image.
The face pixel point may be a pixel point representing a face in the face image, for example, if the face image is an image including a face, the face image includes a portion of the face and a background portion without the face, where the pixel point of the face portion in the face image may be referred to as a face pixel point.
The effective facial pixel points are pixels in the facial image, which can be used for performing facial image fusion, for example, if the player uploads an image with a mask, the mask part in the image cannot be used for facial image fusion, but is not an effective facial pixel point, and the eye eyebrow part, which is not blocked by the mask, in the image can be used for facial image fusion, and the pixels can be called effective facial pixel points.
The feature points are feature points obtained after positioning key parts in the facial image, for example, the feature points may include a plurality of eye feature points obtained by positioning eyes, a plurality of nose feature points obtained by positioning nose, and the like, and the positions of key parts such as facial features and the like can be determined by using the feature points.
In practical applications, the system needs to detect the player's face image, and can support the implementation of the image synthesis method only when the proportion of the effective face pixels in the player's face image to the face pixels reaches a certain degree. For example, when the proportion of the effective face pixel points in the player face image to the face pixel points reaches 50% to satisfy the preset condition, the feature point recognition can be performed on the player face image to obtain a plurality of player face feature points when the proportion is detected to reach 50%. Because the template face image in the target object template corresponds to a plurality of feature points, the player face image and the template face image in the target object template can be subjected to pixel point fusion according to the feature points of the two face images, so that a virtual object image is obtained. The facial feature points can be marked and stored by tfjs-facemesh, as shown in fig. 13, so as to facilitate calling.
In an embodiment, if it is detected that the proportion of the effective facial pixels in the facial image of the player to the facial pixels does not reach 50%, it is indicated that the facial image uploaded by the player is too many to be subjected to the subsequent facial fusion operation, and at this time, the user may be prompted to reject the image and guided to re-execute the image uploading step.
In an embodiment, the face image fusion may be performed by using a triangulation method, and specifically, the step of "performing pixel point fusion on the face image of the player and the template face image in the target object template based on the face feature points of the player" may include:
based on the player facial feature points, carrying out region division on the player facial image to obtain a plurality of facial regions;
determining template face areas corresponding to the face areas in the template face image of the target object template;
and carrying out pixel point fusion on the player face image and the pixel points of the corresponding area in the template face image of the target object template to obtain a virtual object image.
In practical applications, for example, the player face image may be divided into a plurality of triangular face areas according to a plurality of player face feature points, and accordingly, the template face image of the target object template is divided into a plurality of triangular template face areas, where the template face areas of the template face image and the face areas of the player face image are in one-to-one correspondence. And then the pixels in the corresponding face areas can be fused according to a certain proportion to obtain a virtual object image.
In an embodiment, if the player face image is not a complete face, the feature points of the player face image may be supplemented, and specifically, the step of "when detecting that the proportion of the effective face pixel points in the player face image to the face pixel points satisfies the preset condition, performing feature point recognition on the player face image to obtain the player face feature points" may include:
when detecting that the proportion of the effective facial pixel points in the player facial image to the facial pixel points meets the preset condition, carrying out feature point recognition on the player facial image to obtain initial facial feature points;
and based on a preset face template and the initial face feature points, carrying out feature point filling on the player face image to obtain player face feature points.
In practical applications, for example, if a player uploads an image with a mask, then complete feature points cannot be identified in the facial image of the player, and if the proportion of effective facial pixels in the facial image of the player is detected to be 50% of the facial pixels, then feature point identification can be performed on the facial image of the player, and a plurality of initial facial feature points can be obtained. At this time, the feature points of the mouth cannot be recognized due to the shielding of the mask, that is, the initial facial feature points at this time are not complete feature points. Then the missing feature points in the player facial image can be supplemented according to the preset facial template and the obtained initial facial feature points, and the complete player facial feature points can be obtained. This facial feature point matching method can be smoothly performed even when an image such as a sunglasses or a mask is uploaded by a player.
In one embodiment, to enhance the transmissibility of the game, a communication identification code may be further set, and the game sharing may be performed using the communication identification code. For example, the system may generate a synthesized image with a communication identification code, and when a player shares the synthesized image, other players may learn the final effect of the game task and the corresponding game task according to the communication identification code on the synthesized image, thereby achieving the purpose of game sharing.
For example, the player may press the synthesized image for a long time and save it in the album, and then click the "share prize" button in the interface shown in fig. 8 to share the generated synthesized image, where the shared image may include a game task control "i am also to take a picture", and the game task control may be designed as a button, etc., and the game task control may guide other players into the first page of the game task, that is, the interface shown in fig. 4.
In one embodiment, for example, as shown in fig. 12, the player may share the game task when the synthesized image is not generated, so that the shared image may also include an identification code, and other players may directly enter the home page as shown in fig. 4 through the identification code.
In one embodiment, for example, as shown in fig. 14, if the player performs game sharing after the synthesized image has been generated, the game sharing link at this time is with the face synthesized special effects page parameter, and other players can view the image effect of the synthesized image through the link, and can directly enter the first page of the game task through the game task control "i also take a picture" to start executing the game task. If the player performs game sharing when the synthesized image is not generated, the game sharing link is free of parameters, and other players can directly enter the home page of the game task through the link and start to execute the game task. In this way, a closed loop can be formed with the overall marketing experience scheme, so that other players can quickly learn about the page effect through the sharing link and attract other players to participate in the game experience.
According to the image synthesis method, the face image of the player and the template face image in the target object template can be synthesized through machine learning, so that the synthesized image accords with the scene and atmosphere of the target object template, the product is matched for popularization and propaganda, and the face image in the synthesized image can show corresponding expression and dynamic effect according to the target object template. By using the image synthesis method, the synthesized images with different effects can be obtained only by one facial image fusion operation, and players can select favorite synthesized images to store or share according to own preference.
As can be seen from the foregoing, in the embodiment of the present application, a game task interface may be displayed, when a trigger operation for a game task trigger control is detected, a virtual object template selection interface corresponding to a game task is displayed, where the virtual object template selection interface includes a plurality of candidate object templates, when a template selection operation for the virtual object template selection interface is detected, a target object template is determined from the plurality of candidate object templates, a face image uploading interface is displayed, and a face image of a player is acquired through the face image uploading interface, and a plurality of synthesized images are displayed, where the synthesized images are synthesized images of virtual object images corresponding to the face image of the player and a preset object image. According to the scheme, the face image of the player and the face image of the template in the target object template can be fused through machine learning, so that the synthesized image accords with the scene and atmosphere of the target object template, the synthesized image is matched with a product for popularization and propaganda, and the face image in the synthesized image can show corresponding expression and dynamic effect according to the target object template. By using the image synthesis method, the synthesized images with different effects can be obtained only by one facial image fusion operation, and players can select favorite synthesized images to store or share according to own preference. The game task can be shared in an identification code equal sharing mode, so that other players can enter the game task and start a game according to the identification code.
The method according to the previous embodiment will be described in further detail below with the specific integration of the image synthesizing apparatus in an electronic device.
Referring to fig. 3, a specific flow of the image synthesis method according to the embodiment of the present application may be as follows:
301. and displaying a game task interface.
In practical applications, for example, a player may enter a game task through a game application, thereby displaying a game task interface as shown in fig. 4; the player can also enter the game task interface by scanning the "I too fit" button in the interface shown in FIG. 11 that other players share; the player can also enter the game task interface by scanning the two-dimensional code in the interface shown in fig. 12 shared by other players.
302. When it is detected that the player clicks the "collage bonus" button, a virtual object template selection interface is displayed.
303. When a player click on the "Man" button is detected, three different Male candidate templates are displayed.
304. And when the player is detected to click on the area corresponding to the first male candidate template, displaying a facial image uploading interface.
In practical applications, for example, three different male candidate templates may be a first male candidate template, a second male candidate template, and a third male candidate template, each corresponding to a respective region, and a player clicking on the region corresponding to which candidate template indicates that the player has selected the candidate template.
305. When the player authorizes the photographing function and the image uploading function, an initial facial image uploaded by the player is acquired.
In practical applications, for example, if the player agrees to authorize the photographing function and upload the image function, the corresponding image acquisition step may be performed; if the player does not agree with the authorized photographing function and the image uploading function, the game task cannot be completed.
In practical applications, for example, after the image uploaded by the player is acquired, whether the image is used or not may be further confirmed to the player, and if the player determines to use the image, the image may be determined as an initial face image; if the player does not determine to use the image, the player may be guided back to the display of the facial image upload interface to re-upload the image.
306. When it is detected that the player determines to use the initial face image, a plurality of synthesized images are generated from the initial face image.
In practical applications, for example, since the initial facial image uploaded by the player may not meet the criteria of facial image synthesis, the initial facial image may be subjected to image beautification to obtain the facial image of the player, where the step of performing image beautification on the initial facial image may be: the initial face image is subjected to compression processing, size clipping processing, and photo beautification processing.
After the player face image is obtained, the player face image and the template face image in the first male candidate object template can be intersected and fused, face pixel points of the two face images are mixed according to a certain proportion, a fused face image is obtained, and the fused face image and the first male candidate object template are combined to obtain a part of the virtual object image in the synthesized image.
In order to realize the wish of the player to make a photo with the stars, photos of a plurality of stars can be obtained in advance as preset object images, and then a synthesized image is generated based on the virtual object images and the preset object images, wherein the synthesized image is the photo of the player with a certain stars.
In an embodiment, for example, in the process of performing facial image fusion, a player may upload an image in which a face of the player is partially blocked by a mask, a sunglasses, a scarf, a hat, or the like, or the face of the player cannot be recognized, so long as the proportion of the face region which can be recognized in the collected facial image of the player in the whole face is greater than 50%, the step of facial image fusion is not affected. If the player face image includes a part which cannot be identified, the feature points of the part which cannot be identified can be supplemented according to the identified part, so that the fusion of the face image is completed.
307. And determining a final synthesized image according to the image selection operation of the player, and displaying the synthesized image.
In practical applications, for example, the system may generate a plurality of synthesized images according to the facial image of the player, that is, generate a combination of the player and different stars, and the player may select these combinations to determine the synthesized image satisfied by the player.
308. Sharing the synthesized image.
In practical application, for example, after determining a synthesized image satisfied by a player, the synthesized image can be saved by long-time pressing a page, the synthesized image can be shared, other players can check the final effect of the photo through the two-dimensional code on the synthesized image, and can enter a first page shown in fig. 4 through a "me photo" button and execute a photo task.
As can be seen from the foregoing, in the embodiment of the present application, a game task interface may be displayed through an electronic device, when a player is detected to click a "collapser bonus" button, a virtual object template selection interface is displayed, when a player is detected to click a "man" button, three different man candidate object templates are displayed, when a player is detected to click an area corresponding to a first man candidate object template, a face image uploading interface is displayed, when the player authorizes a photographing function and an uploading image function, an initial face image uploaded by the player is acquired, when the player is detected to determine that the initial face image is used, a plurality of synthesized images are generated according to the initial face image, a final synthesized image is determined according to an image selection operation of the player, and the synthesized image is displayed and shared. According to the scheme, the face image of the player and the face image of the template in the target object template can be fused through machine learning, so that the synthesized image accords with the scene and atmosphere of the target object template, the synthesized image is matched with a product for popularization and propaganda, and the face image in the synthesized image can show corresponding expression and dynamic effect according to the target object template. By using the image synthesis method, the synthesized images with different effects can be obtained only by one facial image synthesis operation, and players can select favorite synthesized images to store or share according to own preference. The game task can be shared in an identification code equal sharing mode, so that other players can enter the game task and start a game according to the identification code.
In order to better implement the above method, correspondingly, the embodiment of the present application further provides an image synthesis apparatus, which may be integrated in an electronic device, referring to fig. 15, the image synthesis apparatus includes a display module 151, a trigger module 152, a selection module 153, an upload module 154, and a display module 155, as follows:
a display module 151, configured to display a game task interface, where the game task interface includes a game task trigger control;
the triggering module 152 is configured to display a virtual object template selection interface corresponding to the game task when a triggering operation for the game task triggering control is detected, where the virtual object template selection interface includes a plurality of candidate object templates;
a selection module 153 for determining a target object template from the plurality of candidate object templates when a template selection operation for the virtual object template selection interface is detected;
an upload module 154 for displaying a facial image upload interface and capturing a facial image of a player via the facial image upload interface;
and the display module 155 is used for displaying a plurality of synthesized images, wherein the synthesized images are synthesized images of virtual object images and preset object images corresponding to the face images of the players.
In an embodiment, the selecting module 153 may be specifically configured to:
when a gender selection operation for the virtual object template selection interface is detected, displaying a plurality of candidate object templates corresponding to the selected gender;
when a template selection operation is detected for the plurality of candidate object templates, a target object template is determined from the plurality of candidate object templates.
In an embodiment, the uploading module 154 may include a first display sub-module, an acquisition sub-module, and a generation sub-module, as follows:
the first display sub-module is used for displaying a facial image uploading interface;
the acquisition sub-module is used for acquiring an initial face image uploaded by a player when detecting the player authorization image uploading function;
and the generation sub-module is used for generating a player face image based on the initial face image.
In an embodiment, the generating sub-module may be specifically configured to:
performing image compression processing on the initial face image to obtain a compressed image;
performing image interception processing on the compressed image to obtain an intercepted image;
and performing image effect processing on the intercepted image to obtain a player face image.
In an embodiment, the image synthesis apparatus may further include a fusion module and a generation module, as follows:
the fusion module is used for carrying out facial image fusion on the player facial image and the template facial image in the target object template to obtain a virtual object image;
and the generation module is used for generating a plurality of synthesized images based on the virtual object image and a plurality of preset object images.
In an embodiment, the fusion module may include a feature point identification sub-module and a pixel point fusion sub-module, as follows:
the characteristic point recognition sub-module is used for recognizing the characteristic points of the player face image to obtain the characteristic points of the player face when the fact that the proportion of the effective face pixel points in the player face image to the face pixel points meets the preset condition is detected;
and the pixel point fusion sub-module is used for carrying out pixel point fusion on the player face image and the template face image in the target object template based on the player face feature points to obtain a virtual object image.
In an embodiment, the feature point identifying sub-module may be specifically configured to:
when detecting that the proportion of the effective facial pixel points in the player facial image to the facial pixel points meets the preset condition, carrying out feature point recognition on the player facial image to obtain initial facial feature points;
And based on a preset face template and the initial face feature points, carrying out feature point filling on the player face image to obtain player face feature points.
In the implementation, each unit may be implemented as an independent entity, or may be implemented as the same entity or several entities in any combination, and the implementation of each unit may be referred to the foregoing method embodiment, which is not described herein again.
As can be seen from the foregoing, in the embodiment of the present application, the game task interface may be displayed by the display module 151, when a trigger operation for triggering a control for a game task is detected, a virtual object template selection interface corresponding to the game task is displayed by the trigger module 152, where the virtual object template selection interface includes a plurality of candidate object templates, when a template selection operation for the virtual object template selection interface is detected, a target object template is determined from the plurality of candidate object templates by the selection module 153, a facial image uploading interface is displayed by the uploading module 154, and a player facial image is acquired by the facial image uploading interface, and a plurality of synthesized images are displayed by the display module 155, where the synthesized images are synthesized images of a virtual object image corresponding to the player facial image and a preset object image. According to the scheme, the face image of the player and the face image of the template in the target object template can be fused through machine learning, so that the synthesized image accords with the scene and atmosphere of the target object template, the synthesized image is matched with a product for popularization and propaganda, and the face image in the synthesized image can show corresponding expression and dynamic effect according to the target object template. By using the image synthesis method, the synthesized images with different effects can be obtained only by one facial image fusion operation, and players can select favorite synthesized images to store or share according to own preference. The game task can be shared in an identification code equal sharing mode, so that other players can enter the game task and start a game according to the identification code.
The embodiment of the application also provides electronic equipment, which can integrate any one of the image synthesizing devices provided by the embodiment of the application.
For example, as shown in fig. 16, a schematic structural diagram of an electronic device according to an embodiment of the present application is shown, specifically:
the electronic device may include one or more processing cores 'processors 161, one or more computer-readable storage media's memory 162, power supply 163, and input unit 164, among other components. It will be appreciated by those skilled in the art that the electronic device structure shown in fig. 16 is not limiting of the electronic device and may include more or fewer components than shown, or may combine certain components, or a different arrangement of components. Wherein:
the processor 161 is a control center of the electronic device, connects various parts of the entire electronic device using various interfaces and lines, and performs various functions of the electronic device and processes data by running or executing software programs and/or modules stored in the memory 162 and calling data stored in the memory 162, thereby performing overall monitoring of the electronic device. Optionally, processor 161 may include one or more processing cores; preferably, the processor 161 may integrate an application processor that primarily handles operating systems, player interfaces, applications, etc., and a modem processor that primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 161.
The memory 162 may be used to store software programs and modules, and the processor 161 executes various functional applications and data processing by running the software programs and modules stored in the memory 162. The memory 162 may mainly include a storage program area that may store an operating system, application programs required for at least one function (such as a sound playing function, an image playing function, etc.), and a storage data area; the storage data area may store data created according to the use of the electronic device, etc. In addition, memory 162 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 162 may also include a memory controller to provide the processor 161 with access to the memory 162.
The electronic device further comprises a power supply 163 for powering the various components, preferably the power supply 163 is logically connected to the processor 161 by a power management system whereby charging, discharging, and power consumption management functions are performed by the power management system. The power supply 163 may also include one or more of any of a direct current or alternating current power supply, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and the like.
The electronic device may also include an input unit 164, which input unit 164 may be used to receive input numeric or character information and to generate keyboard, mouse, joystick, optical or trackball signal inputs related to player settings and function control.
Although not shown, the electronic device may further include a display unit or the like, which is not described herein. In particular, in this embodiment, the processor 161 in the electronic device loads executable text corresponding to the process of one or more application programs into the memory 162 according to the following instructions, and the processor 161 executes the application programs stored in the memory 162, so as to implement various functions as follows:
displaying a game task interface, displaying a virtual object template selection interface corresponding to a game task when triggering operation aiming at a game task triggering control is detected, wherein the virtual object template selection interface comprises a plurality of candidate object templates, determining a target object template from the plurality of candidate object templates when the template selection operation aiming at the virtual object template selection interface is detected, displaying a face image uploading interface, acquiring a player face image through the face image uploading interface, and displaying a plurality of synthesized images, wherein the synthesized images are synthesized images of virtual object images corresponding to the player face image and preset object images.
The specific implementation of each operation above may be referred to the previous embodiments, and will not be described herein.
As can be seen from the foregoing, in the embodiment of the present application, a game task interface may be displayed, when a trigger operation for a game task trigger control is detected, a virtual object template selection interface corresponding to a game task is displayed, where the virtual object template selection interface includes a plurality of candidate object templates, when a template selection operation for the virtual object template selection interface is detected, a target object template is determined from the plurality of candidate object templates, a face image uploading interface is displayed, and a face image of a player is acquired through the face image uploading interface, and a plurality of synthesized images are displayed, where the synthesized images are synthesized images of virtual object images corresponding to the face image of the player and a preset object image. According to the scheme, the face image of the player and the face image of the template in the target object template can be fused through machine learning, so that the synthesized image accords with the scene and atmosphere of the target object template, the synthesized image is matched with a product for popularization and propaganda, and the face image in the synthesized image can show corresponding expression and dynamic effect according to the target object template. By using the image synthesis method, the synthesized images with different effects can be obtained only by one facial image fusion operation, and players can select favorite synthesized images to store or share according to own preference. The game task can be shared in an identification code equal sharing mode, so that other players can enter the game task and start a game according to the identification code.
Those of ordinary skill in the art will appreciate that all or a portion of the steps of the various methods of the above embodiments may be performed by instructions, or by instructions controlling associated hardware, which may be stored in a computer-readable storage medium and loaded and executed by a processor.
To this end, embodiments of the present application provide an electronic device in which a plurality of instructions are stored that can be loaded by a processor to perform steps in any of the image compositing methods provided by the embodiments of the present application. For example, the instructions may perform the steps of:
displaying a game task interface, displaying a virtual object template selection interface corresponding to a game task when triggering operation aiming at a game task triggering control is detected, wherein the virtual object template selection interface comprises a plurality of candidate object templates, determining a target object template from the plurality of candidate object templates when the template selection operation aiming at the virtual object template selection interface is detected, displaying a face image uploading interface, acquiring a player face image through the face image uploading interface, and displaying a plurality of synthesized images, wherein the synthesized images are synthesized images of virtual object images corresponding to the player face image and preset object images.
According to one aspect of the present application, there is provided a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The computer instructions are read from a computer-readable storage medium by a processor of a computer device, and executed by the processor, cause the computer device to perform the methods provided in various alternative implementations of the image synthesis aspects described above.
The specific implementation of each operation above may be referred to the previous embodiments, and will not be described herein.
Wherein the storage medium may include: read Only Memory (ROM), random access Memory (RAM, random Access Memory), magnetic or optical disk, and the like.
The instructions stored in the storage medium may perform steps in any image synthesis method provided in the embodiments of the present application, so that the beneficial effects that any image synthesis method provided in the embodiments of the present application can be achieved, which are detailed in the previous embodiments and are not described herein.
The foregoing describes in detail an image synthesis method, apparatus, storage medium and electronic device provided in the embodiments of the present application, and specific examples are applied to illustrate principles and implementations of the present application, where the foregoing examples are only used to help understand the method and core idea of the present application; meanwhile, those skilled in the art will have variations in the specific embodiments and application scope in light of the ideas of the present application, and the present description should not be construed as limiting the present application in view of the above.

Claims (10)

1. An image synthesizing method, characterized by comprising:
displaying a game task interface, wherein the game task interface comprises a game task trigger control;
when triggering operation of the game task triggering control is detected, displaying a virtual object template selection interface corresponding to the game task, wherein the virtual object template selection interface comprises a plurality of candidate object templates;
determining a target object template from the plurality of candidate object templates when a template selection operation for the virtual object template selection interface is detected;
after the target object template is selected, displaying a face image uploading interface, setting an image uploading function in a popup window mode, and acquiring a face image of a player through the face image uploading interface if the image uploading function is authorized;
displaying a plurality of synthesized images, wherein the synthesized images are synthesized images of virtual object images corresponding to the player face images and preset object images, and the virtual object images are obtained by fusing the player face images with pixels of corresponding areas in template face images of a target object template;
the fusing of the player face image and the pixel points of the corresponding area in the template face image of the target object template comprises the following steps: dividing the player face image into a plurality of triangular face areas, and dividing the template face image of the target object template into a plurality of triangular template face areas, wherein the template face areas of the template face image are in one-to-one correspondence with the face areas of the player face image; and fusing the pixel points in the corresponding face area according to a certain proportion to obtain a virtual object image.
2. The image synthesizing method according to claim 1, wherein determining a target object template from the plurality of candidate object templates when a template selection operation for the virtual object template selection interface is detected, comprises:
when a gender selection operation for the virtual object template selection interface is detected, displaying a plurality of candidate object templates corresponding to the selected gender;
when a template selection operation is detected for the plurality of candidate object templates, a target object template is determined from the plurality of candidate object templates.
3. The image composition method according to claim 1, wherein displaying a face image upload interface and capturing a player face image through the face image upload interface comprises:
displaying a facial image uploading interface;
when detecting that a player authorizes an image uploading function, acquiring an initial face image uploaded by the player;
a player face image is generated based on the initial face image.
4. The image synthesis method according to claim 3, wherein generating a player face image based on the initial face image comprises:
performing image compression processing on the initial face image to obtain a compressed image;
Performing image interception processing on the compressed image to obtain an intercepted image;
and performing image effect processing on the intercepted image to obtain a player face image.
5. The image synthesizing method according to claim 1, characterized in that the method further comprises:
carrying out facial image fusion on the player facial image and a template facial image in the target object template to obtain a virtual object image;
and generating a plurality of synthesized images based on the virtual object image and a plurality of preset object images.
6. The image synthesis method according to claim 5, wherein performing facial image fusion of the player facial image and a template facial image in the target object template to obtain a virtual object image, comprises:
when detecting that the proportion of the effective facial pixel points in the player facial image to the facial pixel points meets the preset condition, carrying out feature point recognition on the player facial image to obtain player facial feature points;
and carrying out pixel point fusion on the player face image and the template face image in the target object template based on the player face feature points to obtain a virtual object image.
7. The image synthesis method according to claim 6, wherein when detecting that a ratio of effective facial pixels to facial pixels in the player facial image satisfies a preset condition, performing feature point recognition on the player facial image to obtain player facial feature points, comprising:
when detecting that the proportion of the effective facial pixel points in the player facial image to the facial pixel points meets the preset condition, carrying out feature point recognition on the player facial image to obtain initial facial feature points;
and based on a preset face template and the initial face feature points, carrying out feature point filling on the player face image to obtain player face feature points.
8. An image synthesizing method apparatus, comprising:
the display module is used for displaying a game task interface, wherein the game task interface comprises a game task trigger control;
the trigger module is used for displaying a virtual object template selection interface corresponding to the game task when the trigger operation of the game task trigger control is detected, wherein the virtual object template selection interface comprises a plurality of candidate object templates;
a selection module for determining a target object template from the plurality of candidate object templates when a template selection operation for the virtual object template selection interface is detected;
The uploading module is used for displaying a face image uploading interface after the target object template is selected, setting an image uploading function in a popup window mode, and acquiring a face image of a player through the face image uploading interface if the image uploading function is authorized;
the display module is used for displaying a plurality of synthesized images, wherein the synthesized images are synthesized images of virtual object images corresponding to the player face images and preset object images, and the virtual object images are obtained by fusing the player face images with pixel points of corresponding areas in the template face images of the target object template; the fusing of the player face image and the pixel points of the corresponding area in the template face image of the target object template comprises the following steps: dividing the player face image into a plurality of triangular face areas, and dividing the template face image of the target object template into a plurality of triangular template face areas, wherein the template face areas of the template face image are in one-to-one correspondence with the face areas of the player face image; and fusing the pixel points in the corresponding face area according to a certain proportion to obtain a virtual object image.
9. A computer storage medium having stored thereon a computer program which, when run on a computer, causes the computer to perform the image synthesis method according to any of claims 1-7.
10. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the steps of the method of any one of claims 1 to 7 when the program is executed.
CN202010668393.9A 2020-07-13 2020-07-13 Image synthesis method and device, storage medium and electronic equipment Active CN111768478B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010668393.9A CN111768478B (en) 2020-07-13 2020-07-13 Image synthesis method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010668393.9A CN111768478B (en) 2020-07-13 2020-07-13 Image synthesis method and device, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN111768478A CN111768478A (en) 2020-10-13
CN111768478B true CN111768478B (en) 2023-05-30

Family

ID=72725136

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010668393.9A Active CN111768478B (en) 2020-07-13 2020-07-13 Image synthesis method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN111768478B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112370772B (en) * 2020-11-11 2024-08-23 网易(杭州)网络有限公司 Game task processing method and device and electronic equipment
WO2022147774A1 (en) * 2021-01-08 2022-07-14 浙江大学 Object pose recognition method based on triangulation and probability weighted ransac algorithm
CN113476834B (en) * 2021-07-06 2024-06-25 网易(杭州)网络有限公司 Method and device for executing task in game, electronic equipment and storage medium
CN113694517B (en) * 2021-08-11 2024-07-19 网易(杭州)网络有限公司 Information display control method and device and electronic equipment
CN113642481A (en) * 2021-08-17 2021-11-12 百度在线网络技术(北京)有限公司 Recognition method, training method, device, electronic equipment and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014155564A (en) * 2013-02-14 2014-08-28 Namco Bandai Games Inc Game system and program
CN108771868A (en) * 2018-06-14 2018-11-09 广州市点格网络科技有限公司 Game virtual role construction method, device and computer readable storage medium

Family Cites Families (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001216531A (en) * 2000-02-02 2001-08-10 Nippon Telegr & Teleph Corp <Ntt> Method for displaying participant in three-dimensional virtual space and three-dimensional virtual space display device
JP2005196670A (en) * 2004-01-09 2005-07-21 Sony Corp Mobile terminal system and method for generating object
US7361091B2 (en) * 2005-10-07 2008-04-22 Howard Letovsky Player skill equalizer for video games
CN101098241A (en) * 2006-06-26 2008-01-02 腾讯科技(深圳)有限公司 Method and system for implementing virtual image
GB2532075A (en) * 2014-11-10 2016-05-11 Lego As System and method for toy recognition and detection based on convolutional neural networks
CN105184249B (en) * 2015-08-28 2017-07-18 百度在线网络技术(北京)有限公司 Method and apparatus for face image processing
CN105447480A (en) * 2015-12-30 2016-03-30 吉林纪元时空动漫游戏科技集团股份有限公司 Face recognition game interactive system
CN107680167A (en) * 2017-09-08 2018-02-09 郭睿 A kind of three-dimensional (3 D) manikin creation method and system based on user image
CN109675315B (en) * 2018-12-27 2021-01-26 网易(杭州)网络有限公司 Game role model generation method and device, processor and terminal
CN109865283A (en) * 2019-03-05 2019-06-11 网易(杭州)网络有限公司 Virtual role face method of adjustment, device, electronic equipment and medium in game
CN110152308A (en) * 2019-06-27 2019-08-23 北京乐动派软件有限公司 A kind of more personages' group photo methods of game virtual image
CN110610127B (en) * 2019-08-01 2023-10-27 平安科技(深圳)有限公司 Face recognition method and device, storage medium and electronic equipment
CN110917612A (en) * 2019-11-13 2020-03-27 芯海科技(深圳)股份有限公司 Game interaction method and device, electronic equipment and storage medium
CN110992493B (en) * 2019-11-21 2023-10-31 北京达佳互联信息技术有限公司 Image processing method, device, electronic equipment and storage medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014155564A (en) * 2013-02-14 2014-08-28 Namco Bandai Games Inc Game system and program
CN108771868A (en) * 2018-06-14 2018-11-09 广州市点格网络科技有限公司 Game virtual role construction method, device and computer readable storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
Augmented reality: Technology merging computer vision and image processing by experimental techniques(Article);Deshpande, V.J. 等;《International Journal of Innovative Technology and Exploring Engineering》;全文 *

Also Published As

Publication number Publication date
CN111768478A (en) 2020-10-13

Similar Documents

Publication Publication Date Title
CN111768478B (en) Image synthesis method and device, storage medium and electronic equipment
US20220410007A1 (en) Virtual character interaction method and apparatus, computer device, and storage medium
CN116601675A (en) Virtual garment fitting
CN108108012B (en) Information interaction method and device
CN113766296B (en) Live broadcast picture display method and device
CN107257338A (en) media data processing method, device and storage medium
CN112287848B (en) Live broadcast-based image processing method and device, electronic equipment and storage medium
CN111914811B (en) Image data processing method, image data processing device, computer equipment and storage medium
JP7473556B2 (en) Confirmation of consent
CN111371993A (en) Image shooting method and device, computer equipment and storage medium
KR20240112969A (en) Shared Augmented Reality Box Opening Experience
CN114245155A (en) Live broadcast method and device and electronic equipment
CN113497946B (en) Video processing method, device, electronic equipment and storage medium
CN116114258A (en) User interface for pose driven virtual effects
TW202123128A (en) Virtual character live broadcast method, system thereof and computer program product
CN111078005A (en) Virtual partner creating method and virtual partner system
CN116322914A (en) QR generation system for augmented reality continuity
WO2023082737A1 (en) Data processing method and apparatus, and device and readable storage medium
CN118696345A (en) Interactively defining object partitions
CN118613834A (en) Real-time clothing exchange
CN111461005B (en) Gesture recognition method and device, computer equipment and storage medium
CN113938597B (en) Face recognition method, device, computer equipment and storage medium
CN113408452A (en) Expression redirection training method and device, electronic equipment and readable storage medium
CN115482565A (en) User image data processing method, device and system
CN112785490A (en) Image processing method and device and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40030750

Country of ref document: HK

GR01 Patent grant
GR01 Patent grant