Shooting method, electronic device and readable storage medium
Through video call applications or camera applications of electronic devices, using combined shooting instructions and combined shooting posture synthesis models, real-time shooting of multiple users at different locations is realized, and high-quality group images of the same shooting background are generated, solving the consumption in the existing technology Issues that are not available in real time.
Patent Information
- Application Number
- CN202311324910.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-12
- Publication Date
- 2025-02-21
- Estimated Expiration
- 2043-10-12
AI Technical Summary
The prior art is difficult to realize that multiple users can obtain photos of the same shooting background in real time at different locations, and it requires operation through post-image processing software, which is time-consuming and cannot be obtained in real time.
Through the video call application or camera application of electronic devices, the model is synthesized using the combined shooting instructions and the combined shooting posture, and the video images of multiple users are stitched in real time to generate a group image of the same shooting background.
Real-time shooting of multiple users at different locations is realized, and high-quality group images of the same shooting background are generated, solving the problem of time-consuming and inability to obtain in real time in the prior art.
Smart Images

Figure CN118450268B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of photographing technology, and in particular to a photographing method, an electronic device and a readable storage medium. Background Art
[0002] In a shooting scene, if multiple users want to take photos based on the same shooting background, but some of them are in other places, they can only use Adobe Photoshop (an image processing software) to perform post-production synthesis operations on the images to obtain a group photo of multiple users in front of the same shooting background. Figure 1A As shown, Figure 1A contains two images, where Image 1 is an image taken by user A at location A1, including portrait A and background A1 corresponding to user A at location A1; Image 2 is an image taken by user B at location B1, including portrait B and background B1 corresponding to user B at location B1. If you want to obtain a photo of user A and user B at location A1, you need to use Adobe Photoshop to cut out portrait B in Image 2 to obtain portrait B, and then put portrait B into Image 1 (such as Figure 1B As shown), the purpose of having the portrait A, the portrait B and the background A1 all be in the same composite image is achieved.
[0003] The above method can only obtain a group photo of multiple users through a post-synthesis operation, which takes a long time and cannot obtain a group photo of multiple users based on the same shooting background in real time. Summary of the invention
[0004] The embodiment of the present application provides a shooting method, an electronic device and a readable storage medium. In the method, each user can use an application with a shooting function (such as a video call application, a video conferencing application, etc.) of the electronic device to take a real-time remote group photo.
[0005] In a first aspect, the present application provides a shooting method, the method comprising: a first electronic device communicates with a second electronic device through a first application; detecting that a first user of the first electronic device inputs a combination shooting instruction of the first application, and the first electronic device shoots a first picture through the first application, and the second electronic device shoots a second picture; the first electronic device displays a first combination shooting image, wherein the first combination shooting image includes multiple foreground elements in the first picture and the second picture.
[0006] The present application does not limit the types of the first electronic device and the second electronic device. For example, the first electronic device and the second electronic device may be tablets or mobile phones (folding screen mobile phones, straight-screen mobile phones), etc. In a possible implementation, the first application may be a video call application or any other application that enables the first electronic device and the second electronic device to communicate, and the first screen and the second screen may be displayed in the first application.
[0007] The communication between the first electronic device and the second electronic device through the first application can be understood as the video communication between the first electronic device and the second electronic device, such as video calls, video conferences, etc. Therefore, at this time, the first electronic device can capture a first screen including the first user through the first application, and similarly, the second electronic device can also capture a second screen including the second user through the first application. It can be understood that the foreground element can be either the user taking the photo or other elements that are different from the background elements.
[0008] The method can shoot multiple users in different locations and different backgrounds in real time, and obtain a first group-shot image of multiple users in the same shooting background, so that users can take group photos in real time at different locations.
[0009] In a possible implementation of the first aspect, the first composite image also includes a first background, and the first background is at least one of a background element in the first screen, a background element in the second screen, and a plurality of second backgrounds cached by the first electronic device; the method also includes: detecting that the first user selects the first background; and the first electronic device synthesizes the first composite image based on the first screen, the second screen, and the first background.
[0010] It is understood that the first combined image may include not only the multiple foreground elements in the first picture and the second picture, but also the first background. In this case, the first electronic device may synthesize the multiple foreground elements and the first background based on the first background selected by the user to obtain the first combined image.
[0011] Among them, after detecting the first user's co-shooting instruction, the first electronic device can display multiple reference backgrounds for the user to select. After the user selects the first background from the multiple reference backgrounds, the first electronic device obtains multiple foreground elements and synthesizes them with the first background to obtain a first co-shooting image. In addition, after the first electronic device obtains the co-shooting image including multiple foreground elements in the first screen and the second screen, it can display multiple reference backgrounds for the user to select. After the user selects the first background from the multiple reference backgrounds, the first electronic device synthesizes the multiple foreground elements and the first background to obtain the first co-shooting image.
[0012] In a possible implementation of the first aspect, a first electronic device displays a beat conversion control; and detecting that a first user of the first electronic device inputs a beat instruction of a first application includes: detecting that the first user of the first electronic device triggers an operation of the beat conversion control.
[0013] It can be understood that the first user's beat instruction can trigger the operation of the beat conversion control displayed on the first electronic device for the first user.
[0014] In a possible implementation of the first aspect, the method also includes: detecting that a first user of the first electronic device inputs a snap command of a first application, and the first electronic device displays a reference posture list, wherein the reference posture list includes multiple reference snap postures; detecting a selection operation of any reference snap posture, and the first electronic device displays a posture image corresponding to any reference snap posture.
[0015] It is understandable that Figure 1D As shown, the reference co-shooting posture can be "normal posture", "arm-linking posture", "shoulder-hugging posture", etc., wherein "normal posture" means that two users shoot in a normal shoulder-to-shoulder posture; "arm-linking posture" means that two users need to shoot based on the arm-linking posture; "shoulder-hugging posture" means that two users need to shoot based on the shoulder-hugging posture. After the first electronic device detects that any reference co-shooting posture is selected, the first electronic device displays a posture image corresponding to the selected reference co-shooting posture, such as the following Figure 1E shown.
[0016] In this way, the user can shoot based on the posture image corresponding to the selected reference joint shooting posture, and the user can select a relatively simple conventional posture or a reference joint shooting posture with strong interactivity, such as hugging shoulders, holding hands, etc. The joint shooting image of the user obtained by the first electronic device based on the reference joint shooting posture is more interactive, and the quality of the obtained joint shooting image is also higher.
[0017] In a possible implementation of the first aspect, the resolutions of the first picture, the second picture and the first background are the first resolution, and the first electronic device synthesizes a first combined image based on the first picture, the second picture and the first background, including: adjusting the first picture, the second picture and the first background with the first resolution to the first picture, the second picture and the first background with the second resolution, where the second resolution is smaller than the first resolution; obtaining a first foreground element with the second resolution in the first picture, a second foreground element with the second resolution in the second picture and a first background with the second resolution; inputting the first foreground element with the second resolution, the second foreground element with the second resolution and the first background with the second resolution into a combined posture synthesis model to obtain an initial synthesized image; wherein the initial synthesized image includes the first foreground element, the second foreground element and the first background, and the combined posture synthesis model is based on foreground element samples in the first sample image, background image samples and text description information of the first sample image as a sample set, and the first sample image is obtained through training as a reference data set, and the first sample image includes at least two foreground elements.
[0018] It can be understood that the model structure of the synchronized posture synthesis model adopts a pre-trained diffusion model structure. Due to the structural limitations of the conventional pre-trained diffusion model, it can only be used to process low-resolution images (for example, images with a resolution less than 512×512). Therefore, if the resolution of the first picture, the second picture and the first background is greater than 512×512, it is necessary to first reduce the resolution of the first picture, the second picture and the first background, for example, from the first resolution to the second resolution.
[0019] The first picture may be, for example, the first image corresponding to user 1 mentioned later, and the second picture may be the second image corresponding to user 2 mentioned later. In this case, the initial synthesized image of the second resolution output by the synchronized gesture synthesis model is the first synchronized image.
[0020] In a possible implementation of the first aspect, the first electronic device synthesizes a first composite image based on the first picture, the second picture and the first background, and also includes: inputting the initial synthesized image, the first foreground element of the first resolution, the second foreground element of the first resolution and the first background of the first resolution into a detail-fidelity super-resolution model to obtain a first composite image of the first resolution, wherein the detail-fidelity super-resolution network is trained and acquired based on foreground element samples in a second sample image of the second resolution, background image samples and a second sample image of the third resolution, and the second resolution is smaller than the third resolution.
[0021] It is understood that the present application can further enhance the details of the initial composite image with a lower resolution (second resolution) output by the joint pose synthesis model through a neural network model to improve the image quality. For example, a detail-preserving super-resolution model can be used to enhance the details of the initial composite image to obtain a first composite image with a first resolution.
[0022] In a second aspect, the present application provides a shooting method, which is applied to a first electronic device, the method comprising: displaying a shooting interface of a second application; detecting that a first user of the first electronic device inputs a shooting instruction of the second application, and the shooting interface displays a first image; displaying a first shooting image, the first shooting image comprising a first foreground element of the first image and a second foreground element of the second image selected by the first user.
[0023] This application does not limit the type of the first electronic device. For example, the first electronic device may be a tablet or a mobile phone (folding screen mobile phone, candy bar mobile phone), etc. It can be understood that the second application may be a camera application with a shooting function of the first electronic device, and the shooting interface is a shooting preview interface.
[0024] In this manner, a first user corresponding to the first electronic device can shoot based on the second application (for example, in the selfie mode of the camera application), and the shooting interface of the second application displays a first image containing the first user (i.e., the first foreground element), and the first user can select a second image containing the second user (i.e., the second foreground element) in the first electronic device. After the selection is completed, the first electronic device can synthesize the first foreground element and the second foreground element to obtain a first combined image.
[0025] The method can obtain a first group-shot image of multiple users in the same shooting background when the users are in a semi-online state (i.e., some users are shooting online, and other users have corresponding offline images), so that users can take group photos in real time at different locations.
[0026] In a possible implementation of the second aspect, the first electronic device displays a beat conversion control; detecting that a first user of the first electronic device inputs a beat instruction of a second application includes: detecting that the first user of the first electronic device triggers an operation of the beat conversion control.
[0027] In a possible implementation of the second aspect, the method also includes: detecting a co-shooting instruction input by the first user, and the first electronic device displaying multiple reference images; detecting an operation of the first user selecting any reference image from the multiple reference images, and using any reference image as the second image.
[0028] In a possible implementation of the second aspect, the first composite image also includes a first background, and the first background is at least one of a background element in the first image, a background element in the second image, and a plurality of second backgrounds cached by the first electronic device; the method also includes: detecting that the first user selects the first background; and the first electronic device synthesizes the first composite image based on the first image, the second image, and the first background.
[0029] In a possible implementation of the second aspect, the resolutions of the first image, the second image and the first background are the first resolution, and the first electronic device synthesizes a first combined image based on the first image, the second image and the first background, including: adjusting the first image, the second image and the first background with the first resolution to the first image, the second image and the first background with the second resolution, wherein the second resolution is smaller than the first resolution; obtaining a first foreground element with the second resolution in the first image, a second foreground element with the second resolution in the second image and a first background with the second resolution; inputting the first foreground element with the second resolution, the second foreground element with the second resolution and the first background with the second resolution into a combined posture synthesis model to obtain an initial synthesized image; wherein the initial synthesized image includes the first foreground element, the second foreground element and the first background, and the combined posture synthesis model is based on the foreground element samples in the first sample image, the background image samples and the text description information of the first sample image as a sample set, and the first sample image is obtained by training as a reference data set, and the first sample image includes at least two foreground elements.
[0030] In a possible implementation of the second aspect, the method further includes: using the initial synthesized image as a first combined image.
[0031] In a possible implementation of the second aspect, the first electronic device synthesizes a first composite image based on the first image, the second image and the first background, and also includes: inputting the initial synthesized image, the first foreground element of the first resolution, the second foreground element of the first resolution and the first background of the first resolution into a detail-fidelity super-resolution model to obtain a first composite image of the first resolution, wherein the detail-fidelity super-resolution network is trained based on foreground element samples in a second sample image of the second resolution, background image samples and a second sample image of the third resolution, and the second resolution is smaller than the third resolution.
[0032] In a third aspect, the present application provides an electronic device, characterized in that it includes: one or more processors; one or more memories; one or more memories storing one or more programs, when one or more programs are executed by one or more processors, the electronic device executes the first aspect and any possible shooting method of the first aspect, or executes the second aspect and any possible shooting method of the second aspect.
[0033] In a third aspect, the present application provides a computer-readable medium, characterized in that the readable medium stores instructions, which, when executed on a computer, cause the computer to execute the first aspect and any possible shooting method of the first aspect, or execute the second aspect and any possible shooting method of the second aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1A According to some embodiments of the present application, a schematic diagram of two images to be synthesized in the prior art is shown;
[0035] Figure 1B According to some embodiments of the present application, a schematic diagram of a synthetic image synthesized in the prior art is shown;
[0036] Figure 1C According to some embodiments of the present application, a schematic diagram of an interface for user 1 and user 2 to make a video call based on a foldable screen mobile phone is shown;
[0037] Figure 1D According to some embodiments of the present application, a schematic diagram of an interface of a folding screen mobile phone after a beat conversion control 103 is triggered is shown;
[0038] Figure 1E According to some embodiments of the present application, a schematic diagram of a reference framing posture corresponding to a “normal posture” in a folding screen mobile phone is shown;
[0039] Figure 1F According to some embodiments of the present application, a schematic diagram of an interface of a folding screen mobile phone after a shooting control 104 is triggered is shown;
[0040] Figure 2A According to some embodiments of the present application, a schematic diagram of an interface for user 1 and user 2 to make a video call based on a bar phone is shown;
[0041] Figure 2B According to some embodiments of the present application, a schematic diagram of an interface of a candy-bar phone after a beat conversion control 203 is triggered is shown;
[0042] Figure 2C According to some embodiments of the present application, a schematic diagram of a reference framing posture corresponding to a "normal posture" in a candy-bar mobile phone is shown;
[0043] Figure 3A According to some embodiments of the present application, a schematic diagram of an interface of a shooting application is shown;
[0044] Figure 3B According to some embodiments of the present application, a schematic diagram of an interface corresponding to a gallery is shown;
[0045] Figure 3C According to some embodiments of the present application, another schematic diagram of an interface of a shooting application is shown;
[0046] Figure 3D According to some embodiments of the present application, another schematic diagram of an interface corresponding to a gallery is shown;
[0047] Figure 4A According to some embodiments of the present application, a schematic flow chart of a shooting method is shown;
[0048] Figure 4B According to some embodiments of the present application, a schematic flow chart of another shooting method is shown;
[0049] Figure 4C According to some embodiments of the present application, a schematic flow chart of a method in which a first electronic device acquires a first combined image is shown;
[0050] Figure 4D According to some embodiments of the present application, a flowchart of another method for a first electronic device to acquire a first combined image is shown;
[0051] Figure 5A According to some embodiments of the present application, a schematic diagram of a training process of a synchronized gesture synthesis model is shown;
[0052] Figures 5B-5F According to some embodiments of the present application, a schematic diagram of relevant images involved in the training process of the synchronized gesture synthesis model is shown;
[0053] Figure 6 According to some embodiments of the present application, a schematic diagram of the training process of another synchronized gesture synthesis model is shown;
[0054] Fig. 7A According to some embodiments of the present application, a schematic diagram of a training process of a detail-preserving image super-resolution model is shown;
[0055] Figures 7B-7F According to some embodiments of the present application, a schematic diagram of related images involved in the training process of a detail-preserving image super-resolution model is shown;
[0056] Figure 8 According to some embodiments of the present application, another schematic diagram of the training process of a detail-preserving image super-resolution model is shown;
[0057] Fig. 9 According to some embodiments of the present application, a schematic structural diagram of an electronic device is shown. DETAILED DESCRIPTION
[0058] The illustrative embodiments of the present application include but are not limited to a photographing method, an electronic device, and a readable storage medium.
[0059] As mentioned above, if multiple users want to take photos based on the same shooting background, but some users are in other places, it is impossible to obtain a group photo of multiple users based on the above shooting background in real time. Therefore, in order to solve the above problem, an embodiment of the present application provides a shooting method. In this method, each user can use an application with a shooting function of an electronic device (such as a video call application, a video conferencing application, etc.) to realize real-time remote group photos. For example, when multiple users in different locations use a video call application to make an online call, if they want to obtain a group photo under the same shooting background, they can respond to the user's group shooting instruction (such as a click operation on the group shooting control on the video call application interface or a voice instruction operation indicating group shooting), obtain the image of the call video screen displayed by each user's video call application at the current moment, and then splice the foreground elements (such as users) in each acquired image to obtain a group shot image including each user.
[0060] In some embodiments, the electronic device may perform a stitching operation on some foreground elements in each image. For example, in a portrait mode, the electronic device may remove non-portrait foreground elements from the foreground elements and only perform a stitching operation on the portrait foreground elements.
[0061] It is understood that in some embodiments, the foreground elements (such as users) in each image can be simply spliced together, for example, the users can be simply spliced together side by side. In addition, in some other embodiments, the video call application interface can also display reference joint shooting postures, such as hand-in-hand postures, shoulder-hugging postures and other more complex postures. After each user poses according to the reference joint shooting posture, in response to the user's joint shooting instruction, the electronic device can perform posture splicing for each user based on the reference joint shooting posture.
[0062] It is understood that in some other embodiments, the combined image of each user may further include a first background, wherein the first background may be a default background (such as a blank background) provided by the electronic device. For example, after stitching together the users in the images, based on the default background, a combined image including the users and the default background is obtained.
[0063] In addition, the first background may also be a background selected by the user. For example, in response to a user's co-shooting instruction, a plurality of backgrounds are displayed in the video call application interface of the electronic device. After the user selects one of the backgrounds, the electronic device obtains the image of the call video screen displayed by the video call application of each user at the current moment, and further obtains a co-shooting image including each user and the background (first background) selected by the user.
[0064] For another example, after the electronic device obtains a group image including various users, it displays multiple backgrounds. After the user selects one of the backgrounds, the electronic device will synthesize the group image including various users and the background (first background) selected by the user to obtain a group image including various users and the first background.
[0065] It can be understood that the above-mentioned stitching and synthesis process can be implemented based on a neural network model. In some embodiments, taking the synchronized image acquired by the electronic device including each user and the first background as an example, the electronic device can perform a synthesis operation to obtain the synchronized image by first segmenting each image to obtain images of multiple users, and then obtaining an initial synthesized image based on the images of multiple users and the first background through a pre-trained synchronized posture synthesis model; wherein the synchronized posture synthesis model uses the images of multiple users and the background image corresponding to the synchronized training image as the input sample set, and the synchronized training image as the output comparison data set for training and acquisition. It can be understood that since the synchronized posture synthesis model is synthesized based on a large amount of data training, in addition to being able to obtain the initial synthesized image based on the images of multiple users and the first background in real time, the fusion of the user's image and the first background will also be more realistic and have a higher degree of fusion.
[0066] In addition, in some embodiments, the input sample set may also include a text description corresponding to the co-shot image (for example, a person A and a person B standing side by side with their arms around each other). It can be understood that by adding text descriptions when training the co-shot posture synthesis model, the co-shot posture synthesis model can learn the postures of the users in the co-shot training image, so that the co-shot posture synthesis model can synthesize images of various postures with high authenticity and fusion.
[0067] Thus, taking the image synthesis of two users as an example, when performing image synthesis, the first image corresponding to user 1 and the second image corresponding to user 2 are obtained, as well as the first background image to be used as the background in the synthesized image. It can be understood that the first background image can be a background image segmented from the first image and the second image, or can be another image different from the first image and the second image. Then, the first image, the second image, and the first background image can be adjusted to images that meet the image resolution requirements of the joint pose synthesis model, and then the first portrait in the first image, the second portrait in the second image, and the first background image are obtained and input into the joint pose synthesis model for image synthesis to obtain an initial synthesized image.
[0068] It can be understood that the first portrait in the first image, the second portrait in the second image, or the background image in the first image and the second image can be obtained by using an image segmentation model, etc., which is not limited here.
[0069] In addition, it can be understood that the model structure of the synchronized posture synthesis model adopts a pre-trained diffusion model structure, and due to the structural limitations of the conventional pre-trained diffusion model, it can only be used to process low-resolution images (for example, images with a resolution less than 512×512). Therefore, the initial synthesized image output by the synchronized posture synthesis model is an image with a lower resolution. Therefore, the present application can further enhance the details of the initial synthesized image with a lower resolution output by the synchronized posture synthesis model through a neural network model to improve the quality of the image.
[0070] Exemplarily, the neural network model may be a detail-fidelity super-resolution model, wherein the detail-fidelity super-resolution model may be trained by using the user's image and background image in high-resolution coincident training images and the user's image and background image in low-resolution coincident training images obtained by reducing the resolution of the high-resolution images as sample sets, and using the high-resolution coincident training images as output comparison data sets.
[0071] In this way, after the initial composite image is obtained based on the above-mentioned combined posture synthesis model, the initial composite image, the first portrait in the first image, the second portrait in the second image, and the first background image can be input into the detail-fidelity super-resolution model, and the portrait and background in the synthesized initial composite image are respectively subjected to detail fidelity to obtain the target image (i.e., the combined image mentioned above).
[0072] The above method uses the combined pose synthesis model and the detail-preserving super-resolution model to synthesize images, and can shoot multiple users in different locations and different backgrounds in real time to obtain a target image of multiple users in the same shooting background. In addition, in this method, an initial synthesized image having the portrait features in the first image, the portrait features in the second image, and the background features in the first background image is obtained based on the first image, the second image, and the first background image after reducing the resolution, and the initial synthesized image is refined based on the first image, the second image, and the first background image without reducing the resolution, thereby improving the details of the main features and the background in the initial synthesized image, thereby improving the quality of the obtained target image.
[0073] The following first describes in detail the application scenarios of the shooting method provided in the embodiments of the present application.
[0074] It can be understood that the shooting method provided in the embodiment of the present application can be applied to the online scene described above, that is, shooting multiple users online, as well as semi-online scene and offline scene. Based on this, the above three scenes are described in detail below.
[0075] 1. Online Scenario
[0076] Taking the real-time shooting of two users, user 1 (i.e., the first user) and user 2 in an online scene as an example, in the embodiment of the present application, the online scene is a scene in which user 1 and user 2 communicate online based on an electronic device, and user 1 and user 2 can shoot remotely in the online scene, and the captured image has both the portrait corresponding to user 1 and the portrait corresponding to user 2. The embodiment of the present application does not limit the online scene in which user 1 and user 2 are located. For example, the online scene can be a scene in which user 1 and user 2 make a video call based on a video call application (i.e., the first application) of an electronic device.
[0077] It is understood that in this case, the electronic device can be any electronic device with a video call function, including but not limited to mobile phones, tablet computers, and computers. Taking the electronic device as a mobile phone as an example, the mobile phone can be further divided into folding screen mobile phones (left and right folding screen mobile phones, up and down folding screen mobile phones) and candy-bar mobile phones (i.e. single-screen mobile phones) according to their shapes.
[0078] Take a foldable screen mobile phone that can be folded left and right as an example. Figure 1C FIG. 1 shows a schematic diagram of an interface for user 1 and user 2 to make a video call based on a foldable screen mobile phone. Figure 1C As shown, the foldable screen mobile phone is in a fully unfolded state, and the first area 101 in the foldable screen mobile phone displays a first picture, and the first picture includes a portrait corresponding to user 1 (i.e., a foreground element), and the second area 102 displays a second picture, and the second picture includes a portrait corresponding to user 2 (i.e., a foreground element). In addition, a beat conversion control 103 is also displayed in the first area. In addition, for the convenience of description, the following description is taken as an example of a foreground element being a portrait.
[0079] In response to the triggering operation of the timing conversion control 103, Figure 1D As shown, a reference posture list appears below the photo conversion control 103, and the reference posture list displays the names of the photo postures. Figure 1D The "normal posture" in the reference posture list means that two users take photos in a normal shoulder-to-shoulder posture; the "arm-holding posture" means that two users need to take photos based on the arm-holding posture; the "shoulder-hugging posture" means that two users need to take photos based on the shoulder-hugging posture. It can be understood that the embodiment of the present application does not limit the content of the photo postures in the reference posture list, as long as it can meet the user's shooting needs.
[0080] Take the control corresponding to "regular posture" being triggered as an example, see Figure 1E , Figure 1E A schematic diagram of a reference synchronization posture corresponding to a "conventional posture" is shown. Figure 1EAs shown, the third area 104 of the foldable screen mobile phone displays the reference shooting posture corresponding to user 1, and the fourth area 105 displays the reference shooting posture corresponding to user 2, and the third area 104 is located on one display screen of the foldable screen mobile phone, and the fourth area 105 is located on another display screen of the foldable screen mobile phone.
[0081] It can be understood that when the third area 104 and the fourth area 105 of the folding screen mobile phone (i.e., the first electronic device) used by user 1 respectively display the reference shooting posture corresponding to the "normal posture", the two screens of the folding screen mobile phone (i.e., the second electronic device) used by user 2 will also simultaneously display the reference shooting posture corresponding to the "normal posture".
[0082] After user 1 and user 2 pose for the corresponding reference poses, the foldable screen mobile phone can take pictures of the current poses of user 1 and user 2 in response to the shooting operation. The embodiment of the present application does not limit the triggering method of the shooting operation. For example, the user can click Figure 1E The shooting can be triggered by the synchronization control 106 in the image, or by voice commands, gesture commands, etc.
[0083] In some embodiments, users can also negotiate the photo-taking posture by themselves, that is, in response to the triggering operation of the photo-taking conversion control 103, the folding screen mobile phone can directly take pictures of the current postures of user 1 and user 2.
[0084] It can be understood that the embodiment of the present application does not limit the executing user of the triggering operation of the co-shooting conversion control 103, the selection operation of the photo pose, and the triggering operation of the co-shooting control 106 involved in the above content, and it can be user 1 or user 2. In addition, the embodiment of the present application does not limit the user who triggers the shooting operation, and the shooting operation can be triggered by user 1 or user 2.
[0085] Taking the shooting operation as an example, the user clicks the co-shooting control 106. After the user clicks the co-shooting control 106, the folding screen mobile phone displays the following Figure 1F In the interface shown, relevant options are displayed in the interface for the user to select the target background image (i.e., the first background). For example, the "Background corresponding to user 1" control can be selected to use the background corresponding to user 1 as the target background, the "Background corresponding to user 2" control can be selected to use the background corresponding to user 1 as the target background, and the "Select background from gallery" control can be selected. At this time, the interface of the electronic device will jump from the current interface to the gallery interface, allowing the user to select an image from the gallery as the target background image.
[0086] In addition, in addition to selecting a target background image after the user clicks the co-timer control 106, the user can also select a target background image after clicking the co-timer conversion control 103, which is not limited in the present application.
[0087] Take a candy-bar phone as an example. Figure 2A FIG. 1 shows a schematic diagram of an interface for user 1 and user 2 to make a video call based on a straight-screen mobile phone. Figure 2A As shown, the first area 201 of the straight-screen mobile phone displays a portrait corresponding to user 1, and the second area 202 displays a portrait corresponding to user 2. In addition, a beat conversion control 203 is also displayed in the first area.
[0088] In response to the triggering operation of the timing conversion control 203, as Figure 2B As shown, a list of photo poses appears below the photo conversion control 203, wherein the content of the pose list has been described above and will not be repeated here. Figure 2C , Figure 2C A schematic diagram of a reference synchronization posture corresponding to a "conventional posture" is shown. Figure 2C As shown, the third area 204 of the bar phone displays the reference snap pose corresponding to user 1, and the fourth area 205 displays the reference snap pose corresponding to user 2, that is, at this time, the bar phone is in a split-screen state.
[0089] It can be understood that the shooting method of a straight-screen mobile phone and the method of selecting the target background image are similar in principle to those of a folding-screen mobile phone, and will not be repeated here.
[0090] 2. Semi-online scenario:
[0091] In the embodiment of the present application, the semi-online scene is a scene in which one of user 1 and user 2 is offline and the other user is online. For example, after user 2 takes the second image, the second image is sent to user 1. The second image includes a portrait corresponding to user 2 and a second background.
[0092] Figure 3A FIG. 1 shows a schematic diagram of an interface of a shooting application. Figure 3A As shown, a shooting interface of the shooting application (i.e., the second application) displays a beat conversion control 301. In response to the triggering operation of the beat conversion control 301, the interface of the electronic device jumps from the interface of the current shooting application to the interface of the second shooting application. Figure 3B The interface shown, Figure 3B The interface shown includes multiple images, and there is a prompt message "Please select a reference image" in the interface, so that the user 1 can select a reference image from the multiple images and shoot based on the selected reference image.
[0093] Exemplarily, after user 1 selects the second image as the reference image, the interface of the electronic device is changed to Figure 3B The interface shown jumps to Figure 3C The interface shown. Figure 3C In , the dotted line part is the reference image, and the solid line part is the portrait corresponding to user 1. Figure 3C The electronic device shoots user 1 by triggering the co-shooting control 302 in the image processing apparatus. The composite image obtained after the shooting includes the portrait corresponding to user 1, the portrait corresponding to user 2 and the second background.
[0094] 3. Offline scenario:
[0095] In the embodiment of the present application, the offline scene is a scene in which neither user 1 nor user 2 is in online shooting, that is, the electronic device has stored the first image corresponding to user 1, the second image corresponding to user 2, and the first background image. For example, taking the gallery (album) application included in the electronic device as an example, Figure 3D FIG. 1 shows a schematic diagram of an interface of a gallery application. Figure 3D As shown in (1), the interface of the album application includes an image synthesis control 303. In response to the triggering operation of the image synthesis control 303, the interface of the album application jumps to the interface shown in (2), and the interface has a prompt message "Please select the image to be synthesized". Based on this, the user can select the image to be synthesized, and then perform the image synthesis operation in the offline state.
[0096] The above scenario takes the image synthesis operation for images corresponding to two users as an example to explain the application scenario of the embodiment of the present application. It can be understood that the scenario of the embodiment of the present application also includes the case where the image synthesis operation is performed on images corresponding to multiple users.
[0097] Before introducing the shooting method provided in the embodiment of the present application in detail, the electronic device to which the method can be applied is first introduced. It can be understood that the shooting method provided in the embodiment of the present application can be applied to any electronic device including but not limited to mobile phones, tablet computers, wearable devices, augmented reality (AR) devices, etc., and the embodiment of the present application does not limit the type and form of the electronic device.
[0098] In order to make the purpose and technical solution of the present application clearer, the technical solution in the embodiments of the present application will be clearly and comprehensively described below with reference to the accompanying drawings. Figure 4A According to an embodiment of the present application, a flowchart of a shooting method is shown.
[0099] like Figure 4A As shown, the process includes but is not limited to the following steps:
[0100] S1: A first electronic device communicates with a second electronic device through a first application.
[0101] This application does not limit the types of the first electronic device and the second electronic device. For example, the first electronic device and the second electronic device can both be tablets, or mobile phones (folding screen mobile phones, straight-screen mobile phones), etc. In addition, the first application can be a video call application. In this case, the first electronic device communicating with the second electronic device through the first application can be understood as the first electronic device communicating with the second electronic device via video, such as video calls, video conferences, etc.
[0102] In addition, the first application can also be any other application that enables the first electronic device and the second electronic device to communicate, such as an application specifically used for remote co-photographing. Exemplarily, in this case, taking the first electronic device as a mobile phone, the second electronic device as a camera, and the first electronic device and the second electronic device communicating as an example, the first electronic device can display an image of the second user acquired by the second electronic device, and in response to the first user's co-photographing instruction, the first electronic device can acquire an image of the first user and an image of the second user, and then perform a synthesis operation. It can be understood that this method does not require the first user and the second user to communicate via video, and real-time remote co-photographing can also be performed.
[0103] S2: It is detected that a first user of the first electronic device inputs a shooting instruction of the first application, and the first electronic device captures a first picture through the first application, and the second electronic device captures a second picture.
[0104] Taking video communication between a first electronic device and a second electronic device as an example, at this time, the first electronic device can capture a first screen including a first user through a first application. Similarly, the second electronic device can also capture a second screen including a second user through the first application, and the first screen and the second screen can be displayed in the first application.
[0105] S3: The first electronic device displays a first combined image, wherein the first combined image includes a plurality of foreground elements in the first picture and the second picture.
[0106] It is understood that after the first electronic device detects the co-shooting instruction input by the first user, it can synthesize multiple foreground elements in the first screen and the second screen to obtain a first co-shooting image and display the first co-shooting image. It is understood that the foreground element can be the user who is taking the co-shooting or other elements that are different from the background elements.
[0107] The method can shoot multiple users in different locations and different backgrounds in real time, and obtain a first group-shot image of multiple users in the same shooting background, so that users can take group photos in real time at different locations.
[0108] Figure 4B According to an embodiment of the present application, a schematic flow chart of another shooting method is shown, and the method is applied to a first electronic device. Figure 4B As shown, the process includes but is not limited to the following steps:
[0109] S4: Displaying a shooting interface of the second application.
[0110] This application does not limit the type of the first electronic device. For example, the first electronic device may be a tablet or a mobile phone (folding screen mobile phone, candy bar mobile phone), etc. It can be understood that the second application may be a camera application with a shooting function of the first electronic device, and the shooting interface is a shooting preview interface.
[0111] S5: Detecting that a first user of the first electronic device inputs a shooting instruction of the second application, and a shooting interface displays a first image.
[0112] It can be understood that the first user corresponding to the first electronic device can take pictures based on the second application (for example, in the selfie mode of the camera application), and the shooting interface of the second application displays the first image containing the first user.
[0113] S6: Displaying a first combined image, where the first combined image includes a first foreground element of the first image and a second foreground element of the second image selected by the first user.
[0114] It can be understood that after the first electronic device detects the combination shooting instruction input by the first user and the first user selects the second image containing the second user in the first electronic device, the first electronic device can synthesize the first foreground element (for example, the first user) and the second foreground element (for example, the second user) to obtain a first combination shooting image.
[0115] The method can obtain a first group-shot image of multiple users in the same shooting background when the users are in a semi-online state (i.e., some users are shooting online, and other users have corresponding offline images), so that users can take group photos in real time at different locations.
[0116] It can be understood that no matter whether the combined shooting is performed based on the first application to obtain the combined image, or the combined shooting is performed based on the second application to obtain the combined image, the processing process for the combined image in the present application is the same. Specifically, Figure 4C As shown, the method in which the first electronic device in the embodiment of the present application acquires the first combined image includes but is not limited to the following steps:
[0117] 401: Obtain a first image corresponding to user 1, a second image corresponding to user 2, and a first background image.
[0118] It can be understood that no matter the application scenario of the shooting method provided in the embodiment of the present application is an online scene, a semi-online scene or an offline scene, the electronic device can obtain the first image corresponding to user 1, the second image corresponding to user 2 and the first background image.
[0119] The first image includes a portrait corresponding to user 1 and a first background corresponding to user 1. Similarly, the second image includes a portrait corresponding to user 2 and a second background corresponding to user 2. The first background, the second background, and the first background image may be the same or different, and this is not limited in the embodiment of the present application. In addition, the embodiment of the present application does not limit the acquisition method of the first image, the second image, and the first background image, and the acquisition method may vary according to different actual scenes.
[0120] For example, taking the online scenario mentioned above as an example, after user 1 and user 2 have finished shooting according to the reference pose based on the video call scenario, the electronic device can obtain the first image corresponding to user 1 and the second image corresponding to user 2. In addition, in this scenario, in response to the background image selection operation, the electronic device can obtain the selected first background image. It can be understood that the user can select the first background image from the images stored locally inside the electronic device, or can select the first background in the first image or the second background in the second image as the first background image, and the embodiment of the present application does not limit this.
[0121] For example, taking the semi-online scene mentioned above as an example, after user 2 completes shooting according to the reference pose, after sending the obtained second image to the electronic device corresponding to user 1, the electronic device corresponding to user 1 can obtain the second image. Among them, the second image includes the portrait of user 2 and the second background corresponding to user 2. In response to user 1 shooting based on the second image, the electronic device can obtain the first image corresponding to user 1. It can be understood that at this time, the first image can include the portrait corresponding to user 1, the portrait corresponding to user 2, and the second background corresponding to user 2.
[0122] In addition, in this scenario, in response to the background image selection operation, the electronic device can obtain the selected first background image. It can be understood that the user can select the first background image from the images stored locally inside the electronic device, or can select the second background corresponding to user 2 as the first background image, etc., and the embodiment of the present application is not limited to this.
[0123] Exemplarily, taking the offline scenario mentioned above as an example, the first image, the second image and the first background image are stored offline inside the electronic device. In response to the selection operation of the first image, the second image and the first background image, the electronic device can obtain the first image, the second image and the first background image, and then perform subsequent operations.
[0124] 402: Perform a first preprocessing operation on the first image and the second image to obtain a third image corresponding to user 1 and a fourth image corresponding to user 2, and perform a second preprocessing operation on the first background image to obtain a second background image.
[0125] In the embodiment of the present application, the first preprocessing operation performed on the first image and the second image includes, but is not limited to, reducing the resolution of the first image and the second image to the target resolution, so that the synchronized gesture synthesis model involved in the subsequent steps can process the image of the target resolution. It can be understood that, under normal circumstances, the synchronized gesture synthesis model can process images with a resolution less than or equal to 512×512, but if the resolution of the image is greater than 512×512, the synchronized gesture synthesis model cannot process the image.
[0126] For example, the pose synthesis model can process an image with a resolution of 512×512 (i.e., the target resolution is 512×512). If the resolution of the cropped first background image is greater than 512×512, the resolution of the first background image needs to be adjusted to 512×512. The embodiment of the present application does not limit the method of reducing the image resolution. For example, the resolution of the image can be reduced by using a downsampling method.
[0127] After reducing the resolution of the first image, the third image corresponding to user 1 can be obtained; after reducing the resolution of the second image, the fourth image corresponding to user 2 can be obtained.
[0128] In an embodiment of the present application, the second preprocessing operation performed on the first background image includes but is not limited to partially cropping the first background image to obtain a cropped first background image, and then reducing the resolution of the cropped first background image to a target resolution.
[0129] The embodiment of the present application does not limit the size of the cropped first background image. Exemplarily, the size of the cropped first background image can be determined based on the sizes of the portraits corresponding to user 1 and user 2 in the first image and the second image. For example, the size of the cropped first background image can be slightly larger than the portraits corresponding to user 1 and user 2.
[0130] The method of reducing the resolution of the cropped first background image is consistent with the principle of reducing the resolution of the first image and the second image in the previous text, and will not be described in detail here.
[0131] 403: Input the portrait of user 1 in the third image, the portrait of user 2 in the fourth image, and the second background image into a combined posture synthesis model to obtain a first initial image.
[0132] It can be understood that the combined pose synthesis model is used to fuse the received third image, the fourth image and the second background image to obtain a first initial image, and the first initial image includes a portrait corresponding to user 1, a portrait corresponding to user 2 and the second background image. The training method of the combined pose synthesis model will be described in detail later and will not be repeated here.
[0133] 404: Input the first initial image, the portrait of user 1 in the first image, the portrait of user 2 in the second image, and the cropped first background image into a detail-preserving portrait super-resolution model to obtain a second initial image.
[0134] In the embodiment of the present application, the detail-preserving portrait super-resolution model (i.e., the detail-preserving super-resolution model) is used to perform detail-preserving on the portrait in the first initial image based on the portrait details in the first image and the second image, and to perform detail-preserving on the background in the first initial image based on the background details in the cropped first background image, thereby obtaining the second initial image. That is, compared with the first initial image, the second initial image has more detail content and higher quality.
[0135] It can be understood that the resolution of the second initial image is consistent with the resolution of the first image, the second image and the cropped first background image. For example, if the resolutions of the first image, the second image and the cropped first background image are all 512×512, then the resolution of the second initial image is also 512×512.
[0136] 405: Perform image fusion processing on the second initial image and the first background image to obtain a target image.
[0137] Since the second initial image is obtained based on the cropped first background image, it is necessary to fuse the second initial image with the original, uncropped first background image to obtain a target image (i.e., the first combined image). It can be understood that the target image includes the portrait of user 1, the portrait of user 2, and the first background image, and the resolution of the target image is the same as that of the first background image.
[0138] Figure 4D FIG. 2 shows another flow chart of a method for a first electronic device to obtain a first combined image. Figure 4DAs shown, after user 1 and user 2 finish shooting according to the reference shooting pose shown in 410, the electronic device obtains a first image 420 corresponding to user 1 and a second image 430 corresponding to user 2. The first image 420 includes a portrait corresponding to user 1 and a first background, and the second image 430 includes a portrait corresponding to user 2 and a second background. In addition, the selected first background image may be shown in 440. The electronic device performs a cropping operation on the first background image 440 to obtain a partial background image 450.
[0139] If the resolution of the local background image 450, the first image 420 and the second image 430 is greater than the target resolution that can be processed by the joint pose synthesis model 460, the local background image 450, the first image 420 and the second image 430 need to be downsampled to reduce the resolution of the image, and then the local background image 450, the first image 420 and the second image 430 after the resolution reduction are input to the joint pose synthesis model 460 for image synthesis to obtain a first initial image. Then, the first initial image (including the local background image 450, the first image 420 and the second image 430 after the resolution reduction), the local background image 450, the first image 420 and the second image 430 are input to the detail preservation image super-resolution model 470 for detail reconstruction to obtain a second initial image 480.
[0140] Because the second initial image 480 is obtained based on the cropped first background image 440 , it is necessary to perform image fusion ( 490 ) on the second initial image 480 and the first background image 440 to obtain the target image 4100 .
[0141] The following describes the training process of the synchronized pose synthesis model.
[0142] Figure 5A FIG. 2 shows a schematic diagram of the training process of a synchronized gesture synthesis model. Figure 5A As shown, the training process includes the following steps:
[0143] 501: Obtain a training set including a plurality of first sample images and a text description corresponding to each first sample image.
[0144] In the embodiment of the present application, the first sample image includes at least two portraits. The embodiment of the present application does not limit the posture of the portraits included in the first sample image and the proportion of the portraits in the sample image. For example, the sample image includes two portraits. The postures of the two portraits can be standing or sitting, and the sample image can be a half-length photo of the two portraits or a full-length photo of the two portraits.
[0145] 502: Perform text encoding on a text description corresponding to each first sample image among the plurality of first sample images, and perform portrait encoding and background encoding on each first sample image to obtain text features, portrait features and background features corresponding to each first sample image.
[0146] In the embodiment of the present application, taking any first sample image 1 among the plurality of first sample images as an example, the method of text encoding the text description corresponding to the first sample image 1 includes but is not limited to inputting the text description into a text encoder, and the text encoder outputs the text features corresponding to the first sample image 1. In which, taking the first sample image 1 including two portraits as an example, see Figure 5B , the first sample image 1 may include a portrait A and a portrait B.
[0147] Take the first sample image 1 as the above Figure 5B For example, the method of portrait encoding for the first sample image 1 includes but is not limited to extracting portrait A and portrait B in the first sample image 1, and inputting portrait A and portrait B into the portrait encoder respectively, and the portrait encoder will output the portrait A feature corresponding to portrait A, and output the portrait B feature corresponding to portrait B.
[0148] The image after extracting the portrait A from the first sample image 1 can be seen in Figure 5C , the image after extracting the portrait B in the first sample image 1 can be seen in Figure 5D .
[0149] The method of background encoding the first sample image 1 includes, but is not limited to, extracting the background image in the first sample image 1 (i.e., the part of the first sample image 1 other than the portrait A and the portrait B), and inputting the background image into the background encoder, and the background encoder outputs the background features corresponding to the background image. The image after extracting the background image in the first sample image 1 can be seen in Figure 5E .
[0150] 503: Perform portrait segmentation on each first sample image to obtain an initial image after portrait segmentation.
[0151] It can be understood that portrait segmentation is to segment the pixels belonging to the portrait in the image containing the portrait, so as to distinguish the pixels of the portrait and the pixels of the non-portrait in the image. In some embodiments, a binary image can be used to represent the output result of the portrait segmentation. Among them, the pixel value of each pixel in the binary image is 1 or 0 (or 255 or 0). In other words, white (1) indicates that the corresponding pixel belongs to the portrait, and black (0) indicates that the corresponding pixel belongs to the background other than the portrait; or, white (255) indicates that the corresponding pixel belongs to the portrait, and black (0) indicates that the corresponding pixel belongs to the background other than the portrait. Exemplarily, Fig. 5F So Figure 5B The first sample image 1 in is a binary image obtained by portrait segmentation, and Fig. 5F The image includes an initial image after portrait A is segmented and an initial image after portrait B is segmented.
[0152] It can be understood that the steps corresponding to text encoding, portrait encoding, background encoding and portrait segmentation in the embodiment of the present application are only for distinction and do not represent the order of precedence. In order to simplify the description, the above content only describes the relevant processing process of the first sample image 1. It can be understood that the processing process of each first sample image is the same as the processing principle of the first sample image 1, and it will not be repeated here.
[0153] 504: Input text features, portrait features, background features and the initial image after portrait segmentation corresponding to each first sample image into the pre-trained diffusion model to obtain a first predicted coincident image corresponding to each first sample image.
[0154] The embodiment of the present application does not limit the type of pre-trained diffusion model, as long as the sample image can be synthesized. Exemplarily, the pre-trained diffusion model can be a stable diffusion model (Stable Diffusion), or a control model (Control Net, a pre-trained diffusion model), etc.
[0155] 505: Based on the difference between each first predicted coincidence image and the corresponding first sample image, the initial coincidence posture synthesis model is updated to obtain a target coincidence posture synthesis model.
[0156] Exemplarily, based on the difference between the first predicted coincident image and the corresponding first sample image, a result loss is obtained; the model parameters in the initial coincident posture synthesis model are updated using the result loss to obtain the target coincident posture synthesis model. The embodiment of the present application does not limit the manner of obtaining the result loss. Exemplarily, the cross entropy loss or mean square error loss between the first predicted coincident image and the corresponding first sample image can be used as the result loss.
[0157] It can be understood that the result loss is used to update the model parameters in the initial synchronization posture synthesis model to obtain the target synchronization posture synthesis model, including: updating the encoder parameters of the portrait encoder, the encoder parameters of the background encoder and the model parameters of the pre-trained diffusion model in the initial synchronization posture synthesis model to obtain the target synchronization posture synthesis model.
[0158] After the model parameters in the initial beat-to-beat posture synthesis model are updated by using the result loss, a trained initial beat-to-beat posture synthesis model is obtained, and it is determined whether the trained initial beat-to-beat posture synthesis model meets the training termination condition. If the trained initial beat-to-beat posture synthesis model meets the training termination condition, the trained initial beat-to-beat posture synthesis model is used as the target beat-to-beat posture synthesis model. If the trained initial beat-to-beat posture synthesis model does not meet the training termination condition, the initial beat-to-beat posture synthesis model obtained after training is continuously updated in the manner of reference steps 501 to 505, and so on, until an initial beat-to-beat posture synthesis model that meets the training termination condition is obtained, and the initial beat-to-beat posture synthesis model that meets the training termination condition is used as the target initial beat-to-beat posture synthesis model.
[0159] It can be understood that the target synchronization posture synthesis model is the synchronization posture synthesis model involved in FIG. 4 above.
[0160] It is understandable that the training termination condition is set according to experience or flexibly adjusted according to the application scenario, and the embodiments of the present application do not limit this. Exemplarily, the training termination condition satisfied by the initial synchronization posture synthesis model obtained after training includes, but is not limited to, any one of the following: the number of model parameter updates executed when obtaining the initial synchronization posture synthesis model obtained after training reaches a number threshold, the result loss is less than a loss threshold, or the result loss converges.
[0161] The above content only describes the training process of the combined posture synthesis model by taking the first combined image including two portraits as an example. It can be understood that when the first combined image includes multiple portraits, the training process of the combined posture synthesis model is consistent with the principle of the above process and will not be repeated here.
[0162] Figure 6 FIG. 2 shows a schematic diagram of the training process of another sample pose synthesis model. Figure 6 As shown, still taking any first sample image 1 (image 600) including portrait A and portrait B among the multiple first sample images as an example, the text description corresponding to image 600 is input into text encoder (Text Encoder) 601 for text encoding. Exemplarily, the form of the text feature corresponding to image 600 after text encoding can be "a person A, and a person B, standing together, with background C". In addition, image 600 can also be subjected to portrait segmentation (610) to obtain a portrait binary image 602, wherein the portrait binary image 602 includes a binary image corresponding to portrait A and a binary image corresponding to portrait B.
[0163] Extract the portrait A and portrait B and background C in image 600 respectively, and get Figure 6603, 604 and 605 in FIG. Image 603 is input to a person encoder (Person Encoder) 606 to encode person A and obtain a person feature corresponding to person A. Then, the person feature corresponding to person A is matched with a text feature corresponding to person A to obtain a target feature corresponding to person A.
[0164] Similarly, the image 604 is input to the person encoder 606 to encode the person B and obtain the person features corresponding to the person B. Then, the person features corresponding to the person B are matched with the text features corresponding to the person B to obtain the target features corresponding to the person B.
[0165] The image 605 is input to a background encoder (Person Encoder) 607 to encode the background C and obtain the background features corresponding to the background C. Then, the background features corresponding to the background C are matched with the text features corresponding to the background C to obtain the target features corresponding to the background C.
[0166] The target features corresponding to the portrait A, the target features corresponding to the portrait B, the target features corresponding to the background C, and the portrait binary image 602 are input into the pre-trained diffusion model 608 to obtain a first predicted coincident image 609 corresponding to the image 600. The parameters of the portrait encoder, the background encoder, and the pre-trained diffusion model are updated based on the loss between the image 600 and the first predicted coincident image 609 to obtain an updated coincident pose synthesis model.
[0167] It can be understood that the above Figures 5 and Figure 6 The training process of the synchronized posture synthesis model shown is an offline training process, that is, the synchronized posture synthesis model used in the image processing process corresponding to FIG. 4 is a trained synchronized posture synthesis model.
[0168] The following describes the training process of the detail-preserving image super-resolution model.
[0169] Fig. 7A FIG. 2 shows a schematic diagram of the training process of a detail-preserving image super-resolution model. Fig. 7A As shown, the training process includes the following steps:
[0170] 701: Obtain a training set including a plurality of second sample images.
[0171] In the embodiment of the present application, the second sample image includes at least two portraits. The embodiment of the present application does not limit the posture of the portraits included in the second sample image and the proportion of the portraits in the sample image. For example, the second sample image includes two portraits. The postures of the two portraits can be standing or sitting, and the second sample image can be a half-length photo of the two portraits or a full-length photo of the two portraits.
[0172] It can be understood that the first sample image and the second sample image may be the same or different, and this embodiment of the present application does not limit this.
[0173] 702: Perform a third preprocessing operation on each of the plurality of second sample images to obtain a plurality of third sample images.
[0174] In the embodiment of the present application, the third preprocessing operation performed on each of the plurality of second sample images includes, but is not limited to, reducing the resolution of each second sample image to a target resolution to obtain a plurality of second sample images after the resolution is reduced; and then reconstructing the details of the plurality of second sample images after the resolution is reduced to obtain a plurality of third sample images. It can be understood that one second sample image corresponds to one second sample image after the resolution is reduced, and one second sample image after the resolution is reduced corresponds to one third sample image.
[0175] For example, taking any second sample image 1 among the plurality of second sample images as an example, it can be seen that Figure 7B , the second sample image 1 also includes the portrait A and the portrait B (ie, the second sample image 1 is the same as the first sample image 1).
[0176] Take the second sample image 1 as the above Figure 7B For example, the resolution of the second sample image 1 can be reduced to the target resolution, and the size of the target resolution can be determined based on the processing capability of the detail-preserving image super-resolution model. Taking the target resolution of 512×512 and the resolution of the second sample image 1 of 2048×1080 (2k) as an example, the resolution of the sample image 1 needs to be reduced from 2048×1080 to 512×512. The embodiment of the present application does not limit the method of reducing the resolution of the second sample image 1. For example, the resolution of the second sample image 1 can be reduced by a downsampling method.
[0177] It can be understood that after the resolution of the second sample image 1 is reduced, the details contained in the image are reduced, thereby reducing the quality of the second sample image 1. Therefore, in the embodiment of the present application, the second sample image 1 after the resolution is reduced can also be preliminarily reconstructed, that is, the image content is preliminarily refined to obtain multiple third sample images.
[0178] For example, the third sample image 1 corresponding to the second sample image 1 can be found in Figure 7C .
[0179] Exemplarily, VQVAE (a discretized feature learning model) may be used to reconstruct the second sample image 1 after reducing the resolution to obtain a third sample image corresponding to the second sample image 1 .
[0180] In order to simplify the description, the above content only describes the relevant processing process of the second sample image 1. It can be understood that the processing process of each second sample image is the same as the processing process of the second sample image 1, and will not be repeated here.
[0181] 703: Refine the image content of each third sample image based on the second sample image corresponding to each third sample image to obtain a plurality of second predicted coincident images.
[0182] In the embodiment of the present application, the image content of each third sample image is refined based on the second sample image corresponding to each third sample image, including respectively refining the portrait and the background in the third sample image. Figure 7C Taking the third sample image 1 as an example, it is necessary to refine the portrait A, the portrait B and the background C in the third sample image.
[0183] For example, the portrait A in the second sample image 1 can be extracted, and the portrait A in the second sample image 1 can be segmented. Then, the portrait A in the second sample image 1, the second sample image 1 after the portrait A is segmented, and the third sample image 1 are input into the portrait super-resolution model to refine the portrait A in the third sample image 1. The image after the portrait A in the second sample image 1 is extracted can be seen in Fig.7D In (1), the second sample image 1 after the portrait A is segmented can be seen in Fig.7D in (2).
[0184] Similarly, the portrait B in the second sample image 1 can be extracted, and the portrait B in the second sample image 1 can be segmented. Then, the portrait B in the second sample image 1, the second sample image 1 after the portrait B is segmented, and the third sample image 1 are input into the portrait super-resolution model to refine the portrait B in the third sample image 1. The image after the portrait B in the second sample image 1 is extracted can be seen in Fig. 7E In (1), the second sample image 1 after the portrait B is segmented can be seen in Fig. 7E in (2).
[0185] Similarly, the background C in the second sample image 1 can be extracted, and the portrait A and the portrait B in the second sample image 1 can be segmented. Then, the background C in the sample image 1, the second sample image 1 after the portrait segmentation, and the third sample image 1 are input into the background super-resolution model to refine the background C in the third sample image 1. The image after extracting the background C in the second sample image 1 can be seen in Figure 7F In (1), the second sample image 1 after portrait segmentation of both portrait A and portrait B can be seen in Figure 7F in (2).
[0186] Then, based on the fusion model (or fusion module), the image output by the portrait super-resolution model and the image output by the background super-resolution model can be fused to obtain a second predicted combined image corresponding to the second sample image 1, and the portraits A and B in the second predicted combined image have completed portrait refinement, and the background C has completed background refinement.
[0187] It can be understood that the above content only describes any second sample image 1 among multiple second sample images as an example. The training method of the detail-preserving portrait super-resolution model based on each sample image among the multiple sample images is the same as the above principle and will not be repeated here.
[0188] 704: Based on the difference between each second predicted coincident image and the corresponding second sample image, the initial detail-preserving image super-resolution model is updated to obtain a target detail-preserving image super-resolution model.
[0189] Exemplarily, based on the difference between the second predicted coincident image and the corresponding second sample image, a result loss is obtained; the model parameters in the initial detail-preserving image super-resolution model are updated using the result loss to obtain a target detail-preserving image super-resolution model. The embodiment of the present application does not limit the manner of obtaining the result loss. Exemplarily, the cross entropy loss or mean square error loss between the second predicted coincident image and the corresponding second sample image can be used as the result loss.
[0190] It can be understood that the result loss is used to update the model parameters in the initial detail-preserving image super-resolution model to obtain the target detail-preserving image super-resolution model, including: updating the model parameters of the portrait super-resolution model, the model parameters of the background super-resolution model and the model parameters of the fusion model in the initial detail-preserving image super-resolution model to obtain the target detail-preserving image super-resolution model.
[0191] After using the result loss to update the model parameters in the initial detail-preserving image super-resolution model, a trained initial detail-preserving image super-resolution model is obtained, and it is determined whether the trained initial detail-preserving image super-resolution model meets the training termination condition.
[0192] If the trained initial detail-preserving image super-resolution model meets the training termination condition, the trained initial detail-preserving image super-resolution model is used as the target detail-preserving image super-resolution model. If the trained initial detail-preserving image super-resolution model does not meet the training termination condition, the trained initial detail-preserving image super-resolution model is continuously updated by referring to steps 701 to 704, and so on, until an initial detail-preserving image super-resolution model that meets the training termination condition is obtained, and the initial detail-preserving image super-resolution model that meets the training termination condition is used as the target detail-preserving image super-resolution model.
[0193] It can be understood that the target detail-preserving image super-resolution model is the detail-preserving image super-resolution model involved in FIG. 4 above.
[0194] It is understandable that the training termination condition is set according to experience or flexibly adjusted according to the application scenario, and the embodiments of the present application do not limit this. Exemplarily, the training termination condition satisfied by the initial detail preservation image super-resolution model obtained after training includes, but is not limited to, any one of the following: the number of model parameter updates executed when obtaining the initial detail preservation image super-resolution model obtained after training reaches a number threshold, the result loss is less than a loss threshold, or the result loss converges.
[0195] The above content only describes the training process of the detail-preserving portrait super-resolution model by taking the example of two portraits in the composite image. It can be understood that when the composite image includes multiple portraits, the training process of the detail-preserving portrait super-resolution model is consistent with the principle of the above process and will not be repeated here.
[0196] Figure 8 FIG. 2 shows a schematic diagram of the training process of another detail-preserving image super-resolution model. Figure 8 As shown, still taking any second sample image 1 (image 800) including portrait A and portrait B in the plurality of second sample images as an example, the resolution of image 800 is reduced to obtain image 801 (Low Resolution Ratio, LR) after the resolution is reduced. Then, image 801 is input into VQVAE (802), and the content of image 801 is reconstructed to obtain a third sample image 803 (i.e., reconstructed LR) corresponding to image 800.
[0197] In addition, it is necessary to extract the portrait A in the image 800 and perform portrait segmentation on the portrait A in the image 800; extract the portrait B in the image 800 and perform portrait segmentation on the portrait B in the image 800, and obtain Figure 8 The four images included in 804 in the figure can also be extracted. The background C in the image 800 can also be extracted, and the portrait A and the portrait B in the image 800 can be segmented to obtain the two images included in 805.
[0198] The four images included in the third sample images 803 and 804 are input to the portrait super-resolution model 806, and the portraits A and B in the third sample image 803 are subjected to detail fidelity; the two images included in the third sample images 803 and 805 are input to the background super-resolution model 807, and the background C in the third sample image 803 is subjected to detail fidelity. The images output by the portrait super-resolution model and the background super-resolution model are then input to the fusion module 808 for fusion, and the second predicted combined image (i.e., image 809) corresponding to the image 800 is obtained.
[0199] Based on the loss between the image 800 and the second predicted composite image 809 , the portrait super-resolution model, the background super-resolution model and the relevant parameters of the fusion module are updated to obtain an updated detail-preserving portrait super-resolution model.
[0200] It can be understood that the above Figures 7 and Figure 8 The training process of the detail-preserving image super-resolution model shown is an offline training process, that is, the detail-preserving image super-resolution used in the image processing process corresponding to FIG. 4 is a model that has been trained offline.
[0201] In this method, each user can use an application with a shooting function of an electronic device (such as a video call application, a video conferencing application, etc.) to realize a real-time remote group photo (i.e., an online group photo), or use a camera application, etc. to realize a semi-online group photo of the user, or use an album application, etc. to realize an offline group photo of the user, i.e., synthesize different photos of different users. This method is relatively flexible in obtaining group photos of users, and the two neural network models used can improve the quality of the group photos.
[0202] Fig. 91 shows a schematic diagram of the structure of the electronic device 100. The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, and the like.
[0203] It is to be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or separate some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0204] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
[0205] The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of instruction fetching and execution.
[0206] The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.
[0207] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.
[0208] The mobile communication module 150 can provide wireless communication solutions including 2G / 3G / 4G / 5G etc. applied on the electronic device 100 .
[0209] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) model), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the electronic device 100. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the frequency of the electromagnetic wave signal and performs filtering, and sends the processed signal to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency of it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.
[0210] In some embodiments, the antenna 1 of the electronic device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device 100 can communicate with the model and other devices through wireless communication technology. The electronic device 100 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs, which execute program instructions to generate or change display information.
[0211] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function, such as storing music, video and other files in the external memory card.
[0212] The internal memory 121 can be used to store computer executable program codes, which include instructions. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the electronic device 100 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc. The processor 110 executes various functional applications and data processing of the electronic device 100 by running instructions stored in the internal memory 121, and / or instructions stored in a memory provided in the processor.
[0213] The SIM card interface 195 is used to connect a SIM card.
[0214] It will be understood that, as used herein, the term "module" may refer to or include an application specific integrated circuit (ASIC), an electronic circuit, a processor (shared, dedicated, or group) and / or memory that executes one or more software or firmware programs, a combinational logic circuit, and / or other appropriate hardware components that provide the described functionality, or may be part of these hardware components.
[0215] It is understood that in each embodiment of the present application, the processor may be a microprocessor, a digital signal processor, a microcontroller, etc., and / or any combination thereof. According to another aspect, the processor may be a single-core processor, a multi-core processor, etc., and / or any combination thereof.
[0216] The various embodiments disclosed in the present application may be implemented in hardware, software, firmware, or a combination of these implementation methods. The embodiments of the present application may be implemented as a computer program or program code executed on a programmable system, the programmable system including at least one processor, a storage system (including volatile and non-volatile memory and / or storage elements), at least one input device, and at least one output device.
[0217] Program code can be applied to input instructions to perform the functions described in this application and generate output information. The output information can be applied to one or more output devices in a known manner. For the purposes of this application, a processing system includes any system having a processor such as, for example, a digital signal processor (DSP), a microcontroller, an application specific integrated circuit (ASIC), or a microprocessor.
[0218] Program code can be implemented with high-level programming language or object-oriented programming language to communicate with the processing system. When necessary, program code can also be implemented with assembly language or machine language. In fact, the mechanism described in this application is not limited to the scope of any specific programming language. In either case, the language can be a compiled language or an interpreted language.
[0219] In some cases, the disclosed embodiments may be implemented in hardware, firmware, software, or any combination thereof. The disclosed embodiments may also be implemented as instructions carried or stored on one or more temporary or non-temporary machine-readable (e.g., computer-readable) storage media, which may be read and executed by one or more processors. For example, instructions may be distributed by model or by other computer-readable media. Therefore, machine-readable media may include any mechanism for storing or transmitting information in a machine (e.g., computer) readable form, including but not limited to, floppy disks, optical disks, optical disks, read-only memories (CD-ROMs), magneto-optical disks, read-only memories (ROMs), random access memories (RAMs), erasable programmable read-only memories (EPROMs), electrically erasable programmable read-only memories (EEPROMs), magnetic or optical cards, flash memory, or a tangible machine-readable memory for transmitting information (e.g., carrier waves, infrared signals, digital signals, etc.) using the Internet in electrical, optical, acoustic, or other forms of propagation signals. Therefore, machine-readable media include any type of machine-readable media suitable for storing or transmitting electronic instructions or information in a machine (e.g., computer) readable form.
[0220] In the accompanying drawings, some structural or method features may be shown in a specific arrangement and / or order. However, it should be understood that such a specific arrangement and / or order may not be required. Instead, in some embodiments, these features may be arranged in a manner and / or order different from that shown in the illustrative drawings. In addition, the inclusion of structural or method features in a particular figure does not mean that such features are required in all embodiments, and in some embodiments, these features may not be included or may be combined with other features.
[0221] It should be noted that the units / modules mentioned in the various device embodiments of the present application are all logical units / modules. Physically, a logical unit / module can be a physical unit / module, or a part of a physical unit / module, or can be implemented as a combination of multiple physical units / modules. The physical implementation method of these logical units / modules themselves is not the most important. The combination of functions implemented by these logical units / modules is the key to solving the technical problems proposed by the present application. In addition, in order to highlight the innovative part of the present application, the above-mentioned device embodiments of the present application do not introduce units / modules that are not closely related to solving the technical problems proposed by the present application, which does not mean that there are no other units / modules in the above-mentioned device embodiments.
[0222] It should be noted that in the examples and description of this patent, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "including one" do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0223] Although the present application has been illustrated and described with reference to certain preferred embodiments thereof, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the scope of the present application.
Claims
1. A shooting method, characterized in that: The method comprises: During the process of video communication between the first electronic device and the second electronic device through the first application; It is detected that a first user of the first electronic device inputs a shooting instruction of the first application, and at the current moment, the first electronic device captures a first picture through the first application, and the second electronic device captures a second picture; The first electronic device displays a first composite image, wherein the first composite image includes a plurality of foreground elements in the first picture and the second picture; The first combined image further includes a first background, the first background is at least one of a background element in the first picture, a background element in the second picture, and a plurality of second backgrounds cached by the first electronic device, and the resolutions of the first picture, the second picture, and the first background are a first resolution; The method further comprises: detecting that a first user selects the first background; The first electronic device synthesizes the first combined image based on the first picture, the second picture and the first background, wherein the first electronic device synthesizes the first combined image based on the first picture, the second picture and the first background, including: Adjusting the first picture, the second picture, and the first background of the first resolution to the first picture, the second picture, and the first background of the second resolution, wherein the second resolution is smaller than the first resolution; Acquire a first foreground element of the second resolution in the first picture, a second foreground element of the second resolution in the second picture, and the first background of the second resolution; Inputting the first foreground element at the second resolution, the second foreground element at the second resolution, and the first background at the second resolution into a combined gesture synthesis model to obtain an initial synthesized image; Among them, the initial synthetic image includes the first foreground element, the second foreground element and the first background, the synchronized posture synthesis model is based on the foreground element samples, background image samples and text description information of the first sample image in the first sample image as a sample set, and the first sample image is obtained by training as a reference data set, and the first sample image includes at least two foreground elements.
2. The method according to claim 1, characterized in that The first electronic device displays a first beat conversion control; The detecting that a first user of the first electronic device inputs a snap command of the first application includes: It is detected that the first user of the first electronic device triggers the operation of the first synchronization conversion control.
3. The method according to claim 1, characterized in that The method further comprises: It is detected that the first user of the first electronic device inputs a snap command of the first application, and the first electronic device displays a reference gesture list, wherein the reference gesture list includes a plurality of reference snap gestures; When a selection operation of any reference snapping gesture is detected, the first electronic device displays a gesture image corresponding to the any reference snapping gesture.
4. The method according to any one of claims 1 to 3, characterized in that: The method comprises: The first application displays the first screen and the second screen.
5. The method according to any one of claims 1 to 3, characterized in that: The first application is a video calling application.
6. The method according to claim 5, characterized in that The method further comprises: The initial synthesized image is used as the first combined image.
7. The method according to claim 5, characterized in that The first electronic device synthesizes the first combined image based on the first picture, the second picture and the first background, further comprising: The initial synthetic image, the first foreground element of the first resolution, the second foreground element of the first resolution, and the first background of the first resolution are input into a detail-fidelity super-resolution model to obtain the first combined image of the first resolution, wherein the detail-fidelity super-resolution model is trained and acquired based on foreground element samples, background image samples in a second sample image of the second resolution, and the second sample image of a third resolution, and the second resolution is smaller than the third resolution.
8. The method according to claim 1, characterized in that The method further comprises: The first electronic device displays a shooting interface of a second application; The first electronic device detects that a first user of the first electronic device inputs a shooting instruction of the second application, and the shooting interface displays a first image; The first electronic device displays a second combined image, where the second combined image includes a first foreground element of the first image and a second foreground element of the second image selected by the first user.
9. The method according to claim 8, characterized in that The second application is a camera application, and the shooting interface is a shooting preview interface.
10. The method according to claim 9, characterized in that The first electronic device displays a second beat conversion control; The detecting that a first user of the first electronic device inputs a snap command of the second application includes: It is detected that the first user of the first electronic device triggers the operation of the second synchronization conversion control.
11. The method according to claim 10, characterized in that The method further comprises: Upon detecting the co-shooting instruction input by the first user, the first electronic device displays a plurality of reference images; An operation of selecting any reference image from the multiple reference images by the first user is detected, and the any reference image is used as the second image.
12. The method according to claim 8, characterized in that The second combined image further includes a first background, wherein the first background is at least one of a background element in the first image, a background element in the second image, and a plurality of second backgrounds buffered by the first electronic device; The method further comprises: detecting that the first user selects the first background; The first electronic device synthesizes the second combined image based on the first image, the second image and the first background.
13. The method according to claim 12, characterized in that The resolutions of the first image, the second image, and the first background are a first resolution, and the first electronic device synthesizes the second combined image based on the first image, the second image, and the first background, including: Adjusting the first image, the second image, and the first background of the first resolution to the first image, the second image, and the first background of a second resolution, wherein the second resolution is smaller than the first resolution; Acquire a first foreground element of the second resolution in the first image, a second foreground element of the second resolution in the second image, and the first background of the second resolution; Inputting the first foreground element at the second resolution, the second foreground element at the second resolution, and the first background at the second resolution into a combined gesture synthesis model to obtain an initial synthesized image; Among them, the initial synthetic image includes the first foreground element, the second foreground element and the first background, the synchronized posture synthesis model is based on the foreground element samples, background image samples and text description information of the first sample image in the first sample image as a sample set, and the first sample image is obtained by training as a reference data set, and the first sample image includes at least two foreground elements.
14. The method according to claim 13, characterized in that The method further comprises: The initial synthesized image is used as the second combined image.
15. The method according to claim 13, characterized in that The first electronic device synthesizes the second combined image based on the first image, the second image and the first background, and further includes: The initial synthesized image, the first foreground element of the first resolution, the second foreground element of the first resolution, and the first background of the first resolution are input into a detail-fidelity super-resolution model to obtain the second composite image of the first resolution, wherein the detail-fidelity super-resolution model is trained and acquired based on foreground element samples, background image samples in a second sample image of the second resolution, and the second sample image of a third resolution, and the second resolution is smaller than the third resolution.
16. An electronic device, characterized in that: include: one or more processors; One or more memories; the one or more memories store one or more programs, and when the one or more programs are executed by the one or more processors, the electronic device executes the shooting method according to any one of claims 1 to 15.
17. A computer readable medium, characterized in that The readable medium stores instructions, which, when executed on a computer, enable the computer to execute the photographing method according to any one of claims 1 to 15.
Citation Information
Patent Citations
Co-shooting method and electronic equipment
CN114943662A
Shooting method and related device
CN115529413A