Image processing method and device, electronic equipment and storage medium
By fusing multiple images to generate a target image, the problem of monotonous image processing effects and prop gameplay is solved, thus improving the user experience and fun.
Patent Information
- Application Number
- CN202110379814.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-04-08
- Publication Date
- 2026-01-13
- Estimated Expiration
- 2041-07-04
AI Technical Summary
The special effects and/or props in existing technologies are relatively simple, resulting in a reduced user experience.
By acquiring multiple images to be processed and one or more preset images, a fusion process is performed to generate a fused target image, which includes the objects corresponding to the images to be processed, and these target images are displayed.
It enriches the image processing modes, enhancing the user experience and making it more enjoyable.
Smart Images

Figure CN115205169B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of information technology, and in particular to an image processing method, apparatus, electronic device, and storage medium. Background Technology
[0002] With the development of image processing technology, terminals or servers can process existing images to obtain processed images.
[0003] However, the gameplay involving image processing effects and / or props in existing technologies is relatively simple, which reduces the user experience. Summary of the Invention
[0004] To address or at least partially address the aforementioned technical problems, this disclosure provides an image processing method, apparatus, electronic device, and storage medium that enables fusion processing of images to be processed, enriches image processing modes, and helps improve the user experience.
[0005] This disclosure provides an image processing method, including:
[0006] Acquire multiple images to be processed;
[0007] In response to a fusion command, the plurality of images to be processed and one or more first preset images are fused to obtain one or more fused target images, wherein the target images include the objects to be processed corresponding to the plurality of images to be processed;
[0008] Display the one or more fused target images.
[0009] This disclosure also provides an image processing apparatus, including:
[0010] The acquisition module is used to acquire multiple images to be processed;
[0011] The fusion module is used to respond to a fusion command to fuse the plurality of images to be processed and one or more first preset images to obtain one or more fused target images, wherein the target images include the objects to be processed corresponding to the plurality of images to be processed respectively;
[0012] The display module is used to display the one or more fused target images.
[0013] This disclosure also provides an electronic device, the electronic device comprising:
[0014] One or more processors;
[0015] Storage device for storing one or more programs;
[0016] When the one or more programs are executed by the one or more processors, the one or more processors implement the image processing method as described above.
[0017] This disclosure also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the image processing method described above.
[0018] This disclosure also provides a computer program product, which includes a computer program or instructions that, when executed by a processor, implement the image processing method described above.
[0019] The technical solution provided in this disclosure has at least the following advantages compared with the prior art:
[0020] The image processing method provided in this disclosure integrates multiple images to be processed and one or more first preset images to obtain one or more fused target images. The target images include the objects to be processed corresponding to the multiple images to be processed, thereby realizing the processing of the images to be processed, enriching the image processing modes, and improving the user experience and the fun of the user process. Attached Figure Description
[0021] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and the originals and elements are not necessarily drawn to scale.
[0022] Figure 1 This is a flowchart of an image processing method according to an embodiment of the present disclosure;
[0023] Figure 2 This is a schematic diagram of a display interface in one embodiment of the present disclosure;
[0024] Figure 3 This is a schematic diagram of a first user interface in an embodiment of this disclosure;
[0025] Figure 4 This is a schematic diagram of a second user interface in an embodiment of this disclosure;
[0026] Figure 5 This is a schematic diagram of a third user interface in an embodiment of this disclosure;
[0027] Figure 6 This is a schematic diagram of a user interface in an embodiment of this disclosure;
[0028] Figure 7This is a schematic diagram of an image acquisition method according to an embodiment of this disclosure;
[0029] Figure 8 This is a schematic diagram of another image acquisition method in an embodiment of this disclosure;
[0030] Figure 9 This is a schematic diagram of the fourth user interface in the embodiments of this disclosure;
[0031] Figure 10 This is a flowchart of another image processing method in an embodiment of this disclosure;
[0032] Figure 11 This is a schematic diagram of the structure of an image processing apparatus according to an embodiment of the present disclosure;
[0033] Figure 12 This is a schematic diagram of the structure of an electronic device according to an embodiment of this disclosure. Detailed Implementation
[0034] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.
[0035] It should be understood that the steps described in the method embodiments of this disclosure may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of this disclosure is not limited in this respect.
[0036] The term "comprising" and its variations as used herein are open-ended inclusion, meaning "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Definitions of other terms will be given in the description below.
[0037] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are used only to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependencies.
[0038] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".
[0039] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
[0040] Figure 1 This is a flowchart of an image processing method according to an embodiment of the present disclosure. This embodiment is applicable to situations where image processing is performed on a client. The method can be executed by an image processing device, which can be implemented in software and / or hardware. The device can be configured in an electronic device, such as a terminal, including but not limited to smartphones, PDAs, tablets, wearable devices with displays, desktop computers, laptops, all-in-one computers, smart home devices, etc.
[0041] like Figure 1 As shown, the method may specifically include:
[0042] Step 110: Obtain multiple images to be processed.
[0043] The term "multiple" typically means at least two. In one implementation, acquiring multiple images to be processed includes:
[0044] When a trigger operation targeting a preset identifier is detected, a user interface is displayed. The user interface includes a first area and a second area. The first area is used to display a first image to be processed, and the second area is used to display a second image to be processed. The second image to be processed includes an image captured by the imaging device. The first image to be processed and the second image to be processed are then acquired.
[0045] Among them, references are as follows Figure 2 The diagram shows a display interface, including preset identifiers 210. When a user triggers a specific preset identifier 210, the following is displayed: Figure 3The diagram illustrates the first type of user interface. The user interface includes a first area 310 and a second area 320. The first area 310 displays a first image to be processed, and the second area 320 displays a second image to be processed. The second area 320 can be understood as the main screen of the user interface, with a larger display area. The first area 310 is a portion of the second area 320, with a smaller display area. Different preset identifiers 210 can represent different image processing modes, meaning that different image objects participate in the fusion, resulting in different effects on the target image obtained after image processing. For example, triggering a spring-related preset identifier 210 might result in a spring scene background for the target image, while triggering a winter-related preset identifier 210 might result in a winter scene background, such as snow. Different preset identifiers 210 can also represent different props. By providing multiple selectable props with different effects (i.e., preset identifiers 210), the gameplay with props is increased, thereby enhancing the user experience.
[0046] In one implementation, reference is made to, for example... Figure 4 The schematic diagram of the second type of user interface shown further includes one or more second preset images 410; before acquiring the first image to be processed and the second image to be processed, the image processing method of this embodiment further includes: displaying the first image to be processed from one or more second preset images in the first area 310. Figure 4 As shown, the first image to be processed 410 is displayed in the first area 310. The first image to be processed 410 can be an image selected by the user from a plurality of second preset images. When the user's selection command is detected, the first image to be processed selected by the user is displayed in the first area 310, and at the same time, the panel 420 disappears from the user interface, that is, the user interface no longer displays other second preset images 410 and preset labels 210, such as... Figure 5 The diagram shows a third type of user interface, in which only the first area 310 and the second area 320 are displayed.
[0047] In one optional implementation, taking a face image as an example, the second preset image can be a single-person photo or a group photo. If the second preset image is a single-person photo, it is directly displayed in the first area, or the face in the second preset image is cropped, resized, and then displayed in the first area. If the second preset image is a group photo, the face with the largest and / or clearest and / or most upright position in the photo can be identified as the first image to be processed and displayed in the first area. Alternatively, each face region in the second preset image can be identified, allowing the user to choose which face region to display as the first image to be processed in the first area. The positions of the first and second areas in the user interface can also be referenced as follows: Figure 6As shown, it includes a first region 601 and a second region 602.
[0048] In one implementation, the first area 310 displays a third preset image. When a user selects a first image to be processed from multiple second preset images, the third preset image is replaced with the first image to be processed selected by the user. In other words, the first image to be processed is displayed in the first area 310. Or, in other words, the third preset image in the first area 310 is replaced with the first image to be processed from one or more second preset images. The third preset image can be a system default template image or background image. If the user does not select a first image to be processed from multiple second preset images, the second image to be processed displayed in the second area can be merged with the third preset image to obtain a merged target image. For example, if both the second image to be processed and the third preset image are images of people containing faces, when merging the second image to be processed with the third preset image, the face image in the second image to be processed can be merged with the third preset image to obtain a merged image. Combined with the background image in the third preset image, the image processing modes can be enriched, enhancing the user experience and adding interest. If an instruction is detected that the user selects a first image to be processed from multiple second preset images, the first image to be processed selected by the user is displayed in the first area. At this time, the second image to be processed displayed in the second area is merged with the first image to be processed displayed in the first area to obtain the merged target image.
[0049] In one embodiment, both the first image to be processed and the second image to be processed are photos taken in real time by a shooting device (such as a front-facing camera or a rear-facing camera of a terminal). Before acquiring the first image to be processed and the second image to be processed, the image processing method further includes:
[0050] The system acquires images captured by the imaging device, including a first object to be processed and a second object to be processed; it acquires a first image to be processed corresponding to the first object to be processed and a second image to be processed corresponding to the second object to be processed from the acquired images; it displays the first image to be processed in a first area and the second image to be processed in a second area.
[0051] The first object to be processed in the first image to be processed includes the remaining objects that meet preset conditions among the multiple objects to be processed acquired by the imaging device, excluding the second object to be processed. The second object to be processed includes the objects to be processed in the second image to be processed. That is, the first object to be processed and the second object to be processed are two different objects. Taking a face image as an example, the first object to be processed and the second object to be processed correspond to different face images; for example, the first object to be processed is the face region of user A, and the second object to be processed is the face region of user B.
[0052] In one implementation, if the acquired image includes two face images, obtaining a first image to be processed corresponding to a first object to be processed and a second image to be processed corresponding to a second object to be processed from the acquired image includes: recognizing each face in the acquired image and marking the recognized faces with rectangular boxes. Figure 7 The diagram illustrates an image acquisition method where the image area occupied by the larger rectangular frame 610 is designated as the second image to be processed, with face 611 being the second object to be processed; and the image area occupied by the smaller rectangular frame 620 is designated as the first image to be processed, with face 621 being the first object to be processed. Figure 7 In the captured image shown, because the face 611 occupies a large area of the rectangle 610, displaying the second image to be processed in the second area gives the impression that the face fills the entire screen, resulting in a poor display effect. Therefore, the rectangle 610 can be enlarged slightly, such as... Figure 8 The diagram shows another type of image capture, where rectangle 710 is slightly enlarged compared to rectangle 620, for example, to include some background. Alternatively, the clearest face region in the captured image can be used as the second image to be processed, and another face region as the first image to be processed. Or, the face image that first enters the frame can be used as the second image to be processed, and the face images that enter the frame later can be used as the first image to be processed. Alternatively, each face image can be identified, allowing the user to define which face image will be used as the first or second image to be processed. For example, the user can drag a specific face image to the first or second region; the face image dragged to the first region becomes the first image to be processed, and the face image dragged to the second region becomes the second image to be processed. Furthermore, the dragged face image can automatically adjust its size according to the size of the region it belongs to.
[0053] In another implementation, if the captured image includes three or more face images, obtaining the first image to be processed corresponding to the first object to be processed and the second image to be processed corresponding to the second object to be processed from the captured image includes: using the face image acquired based on the first user entering the camera as the second image to be processed, and using the face image acquired based on the second user entering the camera as the first image to be processed. Alternatively, using the face image with the highest clarity as the second image to be processed, and using the remaining face images with the highest clarity as the first image to be processed. Alternatively, according to the size of the face region, using the larger face region as the second image to be processed, and the second largest face region as the first image to be processed. Alternatively, each face region is identified, and the user can choose which face image to use as the first image to be processed and which face image to use as the second image to be processed.
[0054] Among them, the objects to be processed that meet the preset conditions include at least one of the following: the object to be processed that first enters the acquisition range of the shooting device; the object to be processed that is the largest in size in the image acquired by the shooting device; the object to be processed that has the highest clarity in the image acquired by the shooting device; and the object to be processed that has the smallest difference between its angle and the preset angle (that is, taking a face image as an example, try to select a face image that is close to the front of the face).
[0055] When displaying the user interface, if the first area displays a third preset image, displaying the first image to be processed in the first area includes: replacing the third preset image in the first area with the first image to be processed. Correspondingly, see, for example... Figure 9The diagram illustrates a fourth type of user interface, which includes a first area 310 and a second area 320. The user interface resembles a chat interface during video calls. The first area 310 displays a first image to be processed (e.g., a face image), and the second area 320 displays a second image to be processed (e.g., a face image). Both the first and second images are captured in real-time by a camera. The label 810 indicates a shutter button; triggering the shutter button 810 exits the shooting interface. If the first image to be processed (e.g., a face area) moves outside the capture range of the camera, i.e., the first image to be processed leaves the lens, the third preset image is displayed again in the first area 310; that is, the system's default template image or background image is displayed in the first area 310. If the second image to be processed (e.g., a face area) moves outside the capture range of the camera, the first image to be processed is displayed in the second area, and the third preset image is displayed again in the first area. In other words, if the second image to be processed leaves the lens, the first image to be processed is moved to the second area for display, and the system's default template image or background image is displayed again in the first area. During the process of capturing images through the shooting device, the user can be prompted to face the camera directly via voice or text to capture a frontal image of the user. If a frontal image is not captured, a certain image processing algorithm can be used to adjust the slightly tilted face image into a frontal image.
[0056] In one implementation, the second image to be processed is a real-time captured image. When acquiring the second image, multiple users are in the frame, meaning multiple users are within the camera's field of view. If multiple objects to be processed enter the capture range of the capturing device (e.g., the camera's field of view), then the multiple objects to be processed in the second image include objects that meet preset conditions. These objects include at least one of the following: the object that first enters the capture range of the capturing device; the largest object in the captured image; the object with the highest clarity in the captured image; and the object with the smallest difference between its angle and a preset angle (i.e., selecting an image that is as close to a frontal view as possible). In other words, the user image that first enters the frame, or the largest user image, or the clearest user image, or the user image with the most frontal face, is displayed in the second area.
[0057] In one implementation, if the first image to be processed displayed in the first area includes a preset image, and in a scenario where multiple users are in the frame, if multiple objects to be processed enter the capture range of the shooting device, then the multiple objects to be processed in the second image to be processed include objects to be processed that meet preset conditions. Objects to be processed that meet the preset conditions include at least one of the following: the object to be processed that first enters the capture range of the shooting device; the object to be processed that is the largest in the captured image of the shooting device; the object to be processed that has the highest clarity in the captured image of the shooting device; and the object to be processed that has the smallest difference between its angle and a preset angle (i.e., selecting an image that is as close to a frontal view as possible). In other words, the user image that first enters the lens, or the largest user image, or the clearest user image, or the user image with the most frontal face, is displayed in the second area.
[0058] Step 120: In response to the fusion command, the plurality of images to be processed and one or more first preset images are fused to obtain one or more fused target images, wherein the target images include the objects to be processed corresponding to the plurality of images to be processed.
[0059] The fusion command can be a linked command triggered when the user activates a preset fusion icon, or it can be triggered when touching a blank area of the display screen. Specifically, if the image to be processed is an image containing a person, the first preset image can also be an image containing a person. Fusion processing of the image to be processed and the first preset image can include replacing the face in the image to be processed with the face in the first preset image to obtain the target image, where the face in the image to be processed and the face in the target image are the same; alternatively, it can involve replacing the face in the image to be processed with the face in the first preset image to obtain the target image, and then modifying and beautifying the face according to the effects of the first preset image, where the face in the target image is the beautified face of the face in the image to be processed; or it can include fusion processing of the face in the image to be processed and the face in the first preset image, where the face in the image to be processed and the face in the target image are different faces. The special effects provided by the above image processing enrich the image processing modes and enhance the user experience and fun. If there are two images to be processed, namely the first image and the second image, both of which include one person, and the first preset image is an image including two people, then the fusion process of the images to be processed and the first preset image is as follows: the face in the first image to be processed is replaced with the face of one person in the first preset image, and the face in the second image to be processed is replaced with the face of another person in the first preset image. This results in a target image composed of the faces in the first image to be processed, the faces in the second image to be processed, the bodies of the two people in the first preset image, and the background. This allows the use of the clothing, appearance, and poses of the people in the first preset image, expanding the poses and clothing options for users, thus enhancing the user experience. Similarly, if there are multiple first preset images, the faces in the images to be processed can be sequentially replaced with the faces in each of the first preset images to obtain multiple target images, thereby enhancing the user experience.
[0060] Step 130: Display the one or more fused target images.
[0061] Optionally, after obtaining the target image, a short video with animation effects can be generated based on the target image. For example, one or more shots of the fused target image can be played sequentially from near to far (similar to the automatic playback effect of a slideshow), and animation effects such as twinkling stars can be displayed, which enhances the image fusion processing effect and improves the user experience.
[0062] The image processing method provided in this embodiment fuses multiple images to be processed and one or more first preset images to obtain one or more fused target images. The target images include the objects to be processed corresponding to the multiple images to be processed, thereby realizing the processing of the images to be processed, enriching the image processing mode, and helping to improve the user experience and the fun of the user process.
[0063] Figure 10 This is a flowchart of another image processing method according to an embodiment of this disclosure. Based on the above embodiments, this embodiment further provides an optional implementation for step 120, "In response to a fusion command, the plurality of images to be processed and one or more first preset images are fused to obtain one or more fused target images, wherein the target images include the objects to be processed corresponding to the plurality of images to be processed respectively." Content that is the same as or similar to that in the above embodiments will not be explained further in this embodiment; relevant content can be referred to in the above embodiments.
[0064] like Figure 10 As shown, the image processing method includes the following steps:
[0065] Step 1010: When a trigger operation targeting a preset identifier is detected, a user interface is displayed. The user interface includes a first area and a second area. The first area is used to display a first image to be processed, and the second area is used to display a second image to be processed. The second image to be processed includes an image captured by the imaging device.
[0066] Step 1020: Obtain the first image to be processed and the second image to be processed.
[0067] Step 1030: Obtain a first object to be processed from the first image to be processed, and obtain a second object to be processed from the second image to be processed.
[0068] In one embodiment, obtaining a first object to be processed from a first image to be processed includes: when the first image to be processed includes multiple objects to be processed, obtaining a first object to be processed from the first image to be processed that meets preset conditions. For example, if the first image to be processed is a photo of multiple people, the face with the largest and / or clearest and / or most upright facial image area can be identified as the first object to be processed.
[0069] In another implementation, obtaining a first object to be processed from a first image to be processed includes: if the first image to be processed includes multiple objects to be processed, identifying each of the multiple objects to be processed in the first image to be processed; displaying the identification information of each of the multiple objects to be processed; and obtaining the first object to be processed from the first image to be processed in response to a selection instruction for the identification information of the first object to be processed among the multiple objects to be processed. For example, if the first image to be processed is a photo of multiple people, the facial image regions of each person can be circled, and the user can choose which facial image region to use as the first object to be processed.
[0070] In one implementation, the first and second objects to be processed can be obtained directly, without first obtaining the first and second images to be processed, then obtaining the first object to be processed from the first image to be processed, and the second object to be processed from the second image to be processed. For example, as... Figure 7 As shown, an image is captured by the imaging device, which includes a first object to be processed and a second object to be processed. At this time, the first object to be processed and the second object to be processed can be directly identified based on the large image, without having to first identify the rectangular image including the first object to be processed as the first image to be processed, the rectangular image including the second object to be processed as the second image to be processed, and then identify the first object to be processed based on the first image to be processed and the second object to be processed based on the second image to be processed.
[0071] Step 1040: In response to the fusion command, the first object to be processed and the second object to be processed are fused into one or more first preset images to obtain one or more fused target images, wherein the target images include the fused first object to be processed and the fused second object to be processed.
[0072] Specifically, the fusion command can be triggered by a preset fusion icon, button, or control, or by directly touching a blank area of the screen. In one embodiment, fusion of a first object to be processed and a second object to be processed into one or more first preset images to obtain one or more fused target images includes: selecting a target preset image from a plurality of first preset images, the target preset image including a third object to be processed and a fourth object to be processed; replacing any one of the third object to be processed and the fourth object to be processed with the first object to be processed; and replacing the other of the third object to be processed and the fourth object to be processed with the second object to be processed, thereby obtaining the fused target image. For example, the target preset image is an image featuring two people, including M (M can be considered the third object to be processed) and N (N can be considered the fourth object to be processed). The first object to be processed is the face image of user A, and the second object to be processed is the face image of user B. The image fusion process can specifically involve fusing the face of N in the target preset image with the face of user A, and then fusing the face of M with the face of user B to obtain the target image. Alternatively, it can involve fusing the face of N with the face of user B, and then fusing the face of M with the face of user A to obtain the target image. This allows for the use of the clothing, appearance, and poses of the people in the target preset image, expanding the poses users can strike when taking photos and the clothing and appearance they can wear, thus enhancing the user experience, improving image processing effects, and increasing the fun of using the image processing function. Taking the fusion of N's face and user A's face as an example, the specific process of fusion processing is illustrated as follows: In one implementation, N's face is directly replaced with user A's face to obtain the target image. In this case, the fourth object to be processed (i.e., N's face) is the same as the first object to be processed (i.e., user A's face). In another implementation, N's face can be replaced with user A's face, and user A's face can be modified and beautified based on N's special effects to obtain the target image, such as adding sparkling effects like small stars. In yet another implementation, N's face and user A's face can be fused to obtain the target image. In this case, the fourth object to be processed (i.e., N's face) is different from the first object to be processed (i.e., user A's face). Through the special effects provided by the above image processing, the image processing modes are enriched, and the user's gameplay experience is enhanced.
[0073] To enrich the styles of the target images obtained after image processing and further enhance the user experience, the multiple first preset images include various styles, such as images of different genres. During image fusion, the terminal selects a target preset image from the multiple first preset images and performs fusion processing based on that target preset image. When the terminal performs fusion processing again, the selected target preset image is different from the one selected in the previous fusion process, allowing users to experience various image styles. For example, the terminal selects the first preset image for the first fusion process, the second preset image for the second fusion process, and so on, ensuring that the selected preset image is different each time, resulting in a different target image after each fusion and thus improving the user experience.
[0074] In one implementation, fusing a first object to be processed and a second object to be processed into one or more first preset images to obtain one or more fused target images includes: displaying multiple first preset images; responding to a selection instruction for a target preset image among the multiple first preset images, replacing any one of a third object to be processed and a fourth object to be processed in the target preset image with the first object to be processed, and replacing the other of the third object to be processed and the fourth object to be processed with the second object to be processed, thereby obtaining the fused target image. Specifically, the terminal displays multiple first preset images, allowing the user to independently select which first preset image to use for image fusion, and performing image fusion based on the user-selected target preset image. By supporting user-selected target preset images, personalized image fusion processing can be achieved, which is beneficial to improving the user experience.
[0075] In one implementation, a first object to be processed and a second object to be processed are merged into one or more first preset images to obtain one or more merged target images. This includes: for each of the multiple first preset images, replacing any one of a third object to be processed and a fourth object to be processed in the first preset image with the first object to be processed; and replacing the other of the third and fourth objects to be processed (excluding the first object to be processed) with the second object to be processed, thereby obtaining multiple merged target images, and displaying the multiple merged target images. For example, multiple merged target images can be displayed in the same user interface. The user can select one target image, and after the user selects a specific target image, the selected target image is magnified, while other target images disappear. Furthermore, the user can swipe the screen to view the next magnified target image, and swipe again to view the next magnified target image after that. Alternatively, the terminal can automatically cycle through multiple merged target images, that is, multiple target images are automatically displayed one by one on the terminal screen to improve the user-friendliness of the interactive interface and enhance the user experience.
[0076] In one implementation, after displaying one or more fused target images, the image processing method further includes: in response to a swap instruction, swapping a first object to be processed and a second object to be processed in the fused target images. For example, since the first and second objects to be processed are randomly replaced with a third or fourth object to be processed during the image fusion process, the resulting target image may not be a satisfactory image for the user. For instance, the target image may be an image containing two people, where the face of person M corresponds to the face of user B, and the face of person N corresponds to the face of user A. If user A or B is not satisfied with the current target image and wants to try other fusion effects, the user can trigger a swap instruction. When the terminal receives the swap instruction, it merges the face of person M with the face of user B, and merges the face of person N with the face of user B, to enhance the fun of the process and provide the user with a satisfactory effect.
[0077] It is understandable that if the first image to be processed displayed in the first area can also be the system's default template image, then the second image to be processed displayed in the second area can be merged with the template image; if the first image to be processed displayed in the first area is the user's own image, and the second image to be processed displayed in the second area is the user's own image captured by the shooting device, then it can be the user's own image fused with its own image.
[0078] Step 1050: Display one or more fused target images.
[0079] Understandably, after displaying the target image, it can also respond to a sharing command to share the target image with friends, forums, Weibo, or other platforms such as WeChat Moments.
[0080] The image triggering method provided in this disclosure provides an optional implementation method for fusion processing. The essence of fusion processing is face swapping, which involves fusing the face in the first preset image with the face in the image to be processed. This allows the use of the clothing, appearance, and pose of the person in the first preset image, expanding the poses that users can pose for taking photos and expanding the clothing and appearance of users when taking photos. This enhances the user's experience, improves the image processing effect, and increases the fun of using the image processing function, thereby enhancing the user's enjoyment of using special effects.
[0081] Figure 11 This is a schematic diagram of the structure of an image processing apparatus according to an embodiment of this disclosure. The apparatus provided in this embodiment can be configured in a client or in a server. Figure 11 As shown, the image processing device specifically includes: an acquisition module 1110, a fusion module 1120, and a display module 1130. The acquisition module 1110 is used to acquire multiple images to be processed; the fusion module 1120 is used to, in response to a fusion command, fuse the multiple images to be processed and one or more first preset images to obtain one or more fused target images, wherein the target images include the objects to be processed corresponding to the multiple images to be processed; and the display module 1130 is used to display the one or more fused target images.
[0082] Optionally, the acquisition module 1110 includes: a display unit, configured to display a user interface when a trigger operation targeting a preset identifier is detected, the user interface including a first area and a second area, the first area being used to display a first image to be processed, the second area being used to display a second image to be processed, the second image to be processed including an image captured by the imaging device; and a first acquisition unit, configured to acquire the first image to be processed and the second image to be processed.
[0083] Optionally, the user interface further includes one or more second preset images; the display unit is further configured to display the first image to be processed from the one or more second preset images in the first area before acquiring the first image to be processed and the second image to be processed.
[0084] Optionally, when displaying the user interface, the first area displays a third preset image; correspondingly, the display unit is further configured to: replace the third preset image displayed in the first area with a first image to be processed from one or more second preset images.
[0085] Optionally, the acquisition module 1110 further includes: a first acquisition unit, configured to acquire an image captured by the shooting device, the acquired image including a first object to be processed and a second object to be processed; and to acquire a first image to be processed corresponding to the first object to be processed and a second image to be processed corresponding to the second object to be processed from the acquired image. The corresponding display unit is further configured to display the first image to be processed in the first area and display the second image to be processed in the second area.
[0086] Optionally, if multiple objects to be processed enter the acquisition range of the shooting device, the second objects to be processed in the second image to be processed include the objects to be processed that meet the preset conditions among the multiple objects to be processed.
[0087] Optionally, if the second object to be processed in the second image to be processed moves outside the acquisition range of the shooting device, the first acquisition unit is used to select the object to be processed that meets the preset conditions from the remaining objects to be processed among the multiple objects to be processed acquired by the shooting device, excluding the second object to be processed, as the second object to be processed.
[0088] Optionally, the first object to be processed in the first image to be processed includes the object to be processed that meets the preset conditions among the remaining objects to be processed other than the second object to be processed among the multiple objects to be processed acquired by the shooting device, and the second object to be processed includes the object to be processed in the second image to be processed.
[0089] Optionally, if the first object to be processed moves outside the acquisition range of the shooting device, the display unit is further configured to: restore the display of the third preset image in the first area.
[0090] Optionally, if the second object to be processed moves outside the acquisition range of the shooting device, the display unit is further configured to: display the first image to be processed in the second area, and restore the display of the third preset image in the first area.
[0091] Optionally, the objects to be processed that meet the preset conditions include at least one of the following:
[0092] The object to be processed that first enters the acquisition range of the shooting device;
[0093] The largest object to be processed in the image captured by the imaging device;
[0094] The object to be processed with the highest clarity in the image captured by the imaging device;
[0095] The object to be processed with the smallest difference between its angle and the preset angle.
[0096] Optionally, the fusion module 1120 includes: a second acquisition unit, configured to acquire a first object to be processed from the first image to be processed, and to acquire a second object to be processed from the second image to be processed; and a fusion unit, configured to fuse the first object to be processed and the second object to be processed into one or more first preset images to obtain one or more fused target images, wherein the target images include the fused first object to be processed and the fused second object to be processed.
[0097] Optionally, the fusion unit includes: a selection subunit, configured to select a target preset image from a plurality of first preset images, the target preset image including a third object to be processed and a fourth object to be processed; and a replacement subunit, configured to replace any one of the third object to be processed and the fourth object to be processed with the first object to be processed, and to replace the other one of the third object to be processed and the fourth object to be processed with the second object to be processed, thereby obtaining the fused target image.
[0098] Optionally, the fusion unit includes: a display subunit for displaying a plurality of first preset images; the replacement subunit is further configured to: in response to a selection instruction for a target preset image among the plurality of first preset images, replace any one of a third object to be processed and a fourth object to be processed in the target preset image with the first object to be processed, and replace the other one of the third object to be processed and the fourth object to be processed (excluding the first object to be processed) with the second object to be processed, thereby obtaining the fused target image.
[0099] Optionally, the replacement subunit is further configured to: for each of the plurality of first preset images, replace any one of the third object to be processed and the fourth object to be processed in the first preset image with the first object to be processed, and replace the other one of the third object to be processed and the fourth object to be processed with the second object to be processed, thereby obtaining a plurality of fused target images.
[0100] Optionally, the fusion module 1120 further includes: a swapping unit, configured to swap the first object to be processed and the second object to be processed in the fused target images in response to a swapping instruction after displaying the one or more fused target images.
[0101] The apparatus provided in this disclosure embodiment can execute the steps performed by the client in the method provided in this disclosure method embodiment, and has the execution steps and beneficial effects, which will not be repeated here.
[0102] Figure 12 This is a schematic diagram of the structure of an electronic device according to an embodiment of this disclosure. See below for details. Figure 12 The diagram illustrates a structural schematic suitable for implementing the electronic device 500 in the embodiments of this disclosure. The electronic device 500 in the embodiments of this disclosure may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), wearable electronic devices, etc., as well as fixed terminals such as digital TVs, desktop computers, smart home devices, etc. Figure 12 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.
[0103] like Figure 12 As shown, the electronic device 500 may include a processing device (e.g., a central processing unit, a graphics processor, etc.) 501, which can perform various appropriate actions and processes to implement the methods as described in the embodiments of this disclosure, based on a program stored in a read-only memory (ROM) 502 or a program loaded from a storage device 508 into a random access memory (RAM) 503. The RAM 503 also stores various programs and data required for the operation of the electronic device 500. The processing device 501, ROM 502, and RAM 503 are interconnected via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.
[0104] Typically, the following devices can be connected to I / O interface 505: input devices 506 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 507 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 508 including, for example, magnetic tapes, hard disks, etc.; and communication devices 509. Communication device 509 allows electronic device 500 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 12 An electronic device 500 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.
[0105] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts, thereby implementing the methods as described above. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 509, or installed from a storage device 508, or installed from a ROM 502. When the computer program is executed by the processing device 501, it performs the functions defined in the methods of embodiments of this disclosure.
[0106] It should be noted that the computer-readable medium described in this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in connection with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.
[0107] In some implementations, clients and servers may communicate using any currently known or future-developed network protocol such as HTTP (Hypertext Transfer Protocol) and may interconnect with digital data communication (e.g., communication networks) of any form or medium. Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), the Internet (e.g., the Internet of Things), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future-developed networks.
[0108] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.
[0109] The aforementioned computer-readable medium carries one or more programs that, when executed by the electronic device, cause the electronic device to: acquire multiple images to be processed;
[0110] In response to a fusion command, the plurality of images to be processed and one or more first preset images are fused to obtain one or more fused target images, wherein the target images include the objects to be processed corresponding to the plurality of images to be processed;
[0111] Display the one or more fused target images.
[0112] Optionally, when one or more of the above-described procedures are executed by the electronic device, the electronic device may also perform other steps described in the above embodiments.
[0113] Computer program code for performing the operations of this disclosure can be written in one or more programming languages or a combination thereof, including but not limited to object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0114] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0115] The units described in the embodiments of this disclosure can be implemented in software or hardware. The names of the units are not, in some cases, intended to limit the specific unit.
[0116] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.
[0117] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0118] According to one or more embodiments of this disclosure, this disclosure provides an image processing method, including: acquiring a plurality of images to be processed; in response to a fusion instruction, performing fusion processing on the plurality of images to be processed and one or more first preset images to obtain one or more fused target images, the target images including objects to be processed corresponding to the plurality of images to be processed respectively; and displaying the one or more fused target images.
[0119] According to one or more embodiments of this disclosure, in the image processing method provided in this disclosure, acquiring multiple images to be processed includes: when a trigger operation for a preset identifier is detected, displaying a user interface, the user interface including a first area and a second area, the first area being used to display a first image to be processed, the second area being used to display a second image to be processed, the second image to be processed including an image captured by an imaging device; and acquiring the first image to be processed and the second image to be processed.
[0120] According to one or more embodiments of this disclosure, in the image processing method provided by this disclosure, the user interface further includes one or more second preset images; before acquiring the first image to be processed and the second image to be processed, the method further includes: displaying the first image to be processed from the one or more second preset images in the first area.
[0121] According to one or more embodiments of this disclosure, in the image processing method provided in this disclosure, when displaying the user interface, the first area displays a third preset image; displaying a first image to be processed from one or more second preset images in the first area includes: replacing the third preset image displayed in the first area with the first image to be processed from one or more second preset images.
[0122] According to one or more embodiments of the present disclosure, in the image processing method provided in the present disclosure, before acquiring the first image to be processed and the second image to be processed, the method further includes: acquiring an image captured by an imaging device, the captured image including a first object to be processed and a second object to be processed; acquiring a first image to be processed corresponding to the first object to be processed and a second image to be processed corresponding to the second object to be processed from the captured image; displaying the first image to be processed in the first area and displaying the second image to be processed in the second area.
[0123] According to one or more embodiments of this disclosure, in the image processing method provided in this disclosure, when displaying the user interface, the first area displays a third preset image; displaying the first image to be processed in the first area includes: replacing the third preset image displayed in the first area with the first image to be processed.
[0124] According to one or more embodiments of this disclosure, in the image processing method provided in this disclosure, if multiple objects to be processed enter the acquisition range of the shooting device, the second objects to be processed in the second image to be processed include the objects to be processed that meet the preset conditions among the multiple objects to be processed.
[0125] According to one or more embodiments of this disclosure, the image processing method provided in this disclosure further includes: if the second object to be processed in the second image to be processed moves outside the acquisition range of the shooting device, then the object to be processed that meets the preset conditions among the remaining objects to be processed among the plurality of objects to be processed acquired by the shooting device other than the second object to be processed is taken as the second object to be processed.
[0126] According to one or more embodiments of the present disclosure, in the image processing method provided in the present disclosure, the first object to be processed in the first image to be processed includes the object to be processed that meets the preset conditions among the remaining objects to be processed among the plurality of objects to be processed acquired by the shooting device, excluding the second object to be processed, and the second object to be processed includes the object to be processed in the second image to be processed.
[0127] According to one or more embodiments of this disclosure, the image processing method provided in this disclosure further includes: if the first object to be processed moves outside the acquisition range of the shooting device, then the third preset image is restored and displayed in the first area.
[0128] According to one or more embodiments of this disclosure, the image processing method provided in this disclosure further includes: if the second object to be processed moves outside the acquisition range of the shooting device, then the first image to be processed is displayed in the second area, and the third preset image is restored to be displayed in the first area.
[0129] According to one or more embodiments of this disclosure, in the image processing method provided in this disclosure, the object to be processed that meets the preset conditions includes at least one of the following: the object to be processed that first enters the acquisition range of the shooting device; the object to be processed that has the largest size in the image acquired by the shooting device; the object to be processed that has the highest clarity in the image acquired by the shooting device; and the object to be processed that has the smallest difference between its angle and the preset angle.
[0130] According to one or more embodiments of this disclosure, in the image processing method provided in this disclosure, the plurality of images to be processed and one or more first preset images are fused to obtain one or more fused target images, including: obtaining a first object to be processed from the first image to be processed, and obtaining a second object to be processed from the second image to be processed; fusing the first object to be processed and the second object to be processed into one or more first preset images to obtain one or more fused target images, wherein the target images include the fused first object to be processed and the fused second object to be processed.
[0131] According to one or more embodiments of this disclosure, in the image processing method provided in this disclosure, fusing the first object to be processed and the second object to be processed into one or more first preset images to obtain one or more fused target images includes: selecting a target preset image from a plurality of first preset images, the target preset image including a third object to be processed and a fourth object to be processed; replacing any one of the third object to be processed and the fourth object to be processed with the first object to be processed, and replacing the other of the third object to be processed and the fourth object to be processed with the second object to be processed, thereby obtaining the fused target image.
[0132] According to one or more embodiments of this disclosure, in the image processing method provided by this disclosure, the first object to be processed and the second object to be processed are fused into one or more first preset images to obtain one or more fused target images, including: displaying a plurality of first preset images; in response to a selection instruction for a target preset image among the plurality of first preset images, replacing any one of a third object to be processed and a fourth object to be processed in the target preset image with the first object to be processed, and replacing the other one of the third object to be processed and the fourth object to be processed with the second object to be processed, to obtain the fused target image.
[0133] According to one or more embodiments of this disclosure, in the image processing method provided in this disclosure, the first object to be processed and the second object to be processed are fused into one or more first preset images to obtain one or more fused target images, including: for each of the plurality of first preset images, replacing any one of the third object to be processed and the fourth object to be processed in the first preset image with the first object to be processed, and replacing the other one of the third object to be processed and the fourth object to be processed with the second object to be processed, thereby obtaining a plurality of fused target images.
[0134] According to one or more embodiments of the present disclosure, in the image processing method provided in the present disclosure, after displaying the one or more fused target images, the method further includes: in response to a swap instruction, swapping the first object to be processed and the second object to be processed in the fused target images.
[0135] According to one or more embodiments of this disclosure, an image processing apparatus is provided, comprising: an acquisition module for acquiring a plurality of images to be processed; a fusion module for, in response to a fusion command, fusing the plurality of images to be processed and one or more first preset images to obtain one or more fused target images, wherein the target images include objects to be processed corresponding to the plurality of images to be processed respectively; and a display module for displaying the one or more fused target images.
[0136] According to one or more embodiments of this disclosure, this disclosure provides an electronic device, including:
[0137] One or more processors;
[0138] Memory, used to store one or more programs;
[0139] When the one or more programs are executed by the one or more processors, the one or more processors implement any of the image processing methods provided in this disclosure.
[0140] According to one or more embodiments of the present disclosure, the present disclosure provides a computer-readable storage medium having a computer program stored thereon that, when executed by a processor, implements an image processing method as described in any of the present disclosure.
[0141] This disclosure also provides a computer program product, which includes a computer program or instructions that, when executed by a processor, implement the image processing method described above.
[0142] The above description is merely a preferred embodiment of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features disclosed in this disclosure that have similar functions.
[0143] Furthermore, while the operations are described in a specific order, this should not be construed as requiring these operations to be performed in the specific order shown or in a sequential order. In certain environments, multitasking and parallel processing may be advantageous. Similarly, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of this disclosure. Certain features described in the context of individual embodiments may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented individually or in any suitable sub-combination in multiple embodiments.
[0144] Although the subject matter has been described using language specific to structural features and / or methodological logic, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. Rather, the specific features and actions described above are merely illustrative examples of implementing the claims.
Claims
1. An image processing method, characterized in that, The method includes: Acquire multiple images to be processed; In response to a fusion command, the plurality of images to be processed and one or more first preset images are fused to obtain one or more fused target images. The target images include the objects to be processed corresponding to the plurality of images to be processed respectively. The fusion command is used to fuse the faces of the images to be processed to the face positions in the first preset images. Display the one or more fused target images; The acquisition of multiple images to be processed includes: When a trigger operation targeting a preset identifier is detected, a user interface is displayed. The user interface includes a first area and a second area. The first area is used to display a first image to be processed, and the second area is used to display a second image to be processed, which includes an image captured by the imaging device. Obtain the first image to be processed and the second image to be processed; The step of fusing the plurality of images to be processed and one or more first preset images to obtain one or more fused target images includes: Obtain a first object to be processed from the first image to be processed, and obtain a second object to be processed from the second image to be processed; The first object to be processed and the second object to be processed are merged into one or more first preset images to obtain one or more merged target images, wherein the target images include the merged first object to be processed and the merged second object to be processed. The step of fusing the first object to be processed and the second object to be processed into one or more first preset images to obtain the one or more fused target images includes: Select a target preset image from a plurality of first preset images, wherein the target preset image includes a third object to be processed and a fourth object to be processed; Replace either the third object to be processed or the fourth object to be processed with the first object to be processed, and replace the other one of the third object to be processed or the fourth object to be processed with the second object to be processed, to obtain the fused target image.
2. The method according to claim 1, characterized in that, The user interface also includes one or more second preset images; Before acquiring the first image to be processed and the second image to be processed, the method further includes: The first image to be processed from one or more second preset images is displayed in the first area.
3. The method according to claim 2, characterized in that, When the user interface is displayed, the first area displays a third preset image; Displaying the first image to be processed from one or more second preset images in the first area includes: Replace the third preset image displayed in the first area with the first image to be processed from one or more second preset images.
4. The method according to claim 1, characterized in that, Before acquiring the first image to be processed and the second image to be processed, the method further includes: Acquire images captured by the imaging device, wherein the captured images include a first object to be processed and a second object to be processed; From the acquired images, obtain the first image to be processed corresponding to the first object to be processed and the second image to be processed corresponding to the second object to be processed; The first image to be processed is displayed in the first area, and the second image to be processed is displayed in the second area.
5. The method according to claim 4, characterized in that, When the user interface is displayed, the first area displays a third preset image; Displaying the first image to be processed in the first area includes: Replace the third preset image displayed in the first area with the first image to be processed.
6. The method according to claim 1, characterized in that, If multiple objects to be processed enter the acquisition range of the shooting device, then the second objects to be processed in the second image to be processed include the objects to be processed that meet the preset conditions among the multiple objects to be processed.
7. The method according to claim 1, characterized in that, The method further includes: If the second object to be processed in the second image to be processed moves outside the acquisition range of the shooting device, then the object to be processed that meets the preset conditions among the remaining objects to be processed other than the second object to be processed among the multiple objects to be processed acquired by the shooting device is taken as the second object to be processed.
8. The method according to claim 4, characterized in that, The first object to be processed in the first image to be processed includes the object to be processed that meets the preset conditions among the remaining objects to be processed other than the second object to be processed among the multiple objects to be processed acquired by the shooting device. The second object to be processed includes the object to be processed in the second image to be processed.
9. The method according to claim 5, characterized in that, The method further includes: If the first object to be processed moves outside the acquisition range of the shooting device, the third preset image is restored and displayed in the first area.
10. The method according to claim 5, characterized in that, The method further includes: If the second object to be processed moves outside the acquisition range of the shooting device, the first image to be processed is displayed in the second area, and the third preset image is restored to be displayed in the first area.
11. The method according to any one of claims 6-8, characterized in that, Objects to be processed that meet the preset conditions include at least one of the following: The object to be processed that first enters the acquisition range of the shooting device; The largest object to be processed in the image captured by the imaging device; The object to be processed with the highest clarity in the image captured by the imaging device; The object to be processed with the smallest difference between its angle and the preset angle.
12. The method according to claim 1, characterized in that, The first object to be processed and the second object to be processed are fused into one or more first preset images to obtain one or more fused target images, including: Display multiple first preset images; In response to a selection instruction for a target preset image among the plurality of first preset images, any one of the third and fourth objects to be processed in the target preset image is replaced with the first object to be processed, and the other one of the third and fourth objects to be processed is replaced with the second object to be processed, thereby obtaining a fused target image.
13. The method according to claim 1, characterized in that, The first object to be processed and the second object to be processed are fused into one or more first preset images to obtain one or more fused target images, including: For each of the multiple first preset images, replace any one of the third and fourth objects to be processed in the first preset image with the first object to be processed, and replace the other one of the third and fourth objects to be processed with the second object to be processed, to obtain multiple fused target images.
14. The method according to any one of claims 12-13, characterized in that, After displaying the one or more fused target images, the method further includes: In response to the swap command, the first object to be processed and the second object to be processed in the fused target image are swapped.
15. An image processing apparatus, characterized in that, include: The acquisition module is used to acquire multiple images to be processed; The fusion module is used to respond to a fusion command to fuse the plurality of images to be processed and one or more first preset images to obtain one or more fused target images. The target images include the objects to be processed corresponding to the plurality of images to be processed respectively. The fusion command is used to fuse the faces of the images to be processed to the face positions in the first preset images. A display module is used to display the one or more fused target images; The acquisition of multiple images to be processed includes: When a trigger operation targeting a preset identifier is detected, a user interface is displayed. The user interface includes a first area and a second area. The first area is used to display a first image to be processed, and the second area is used to display a second image to be processed, which includes an image captured by the imaging device. Obtain the first image to be processed and the second image to be processed; The step of fusing the plurality of images to be processed and one or more first preset images to obtain one or more fused target images includes: Obtain a first object to be processed from the first image to be processed, and obtain a second object to be processed from the second image to be processed; The first object to be processed and the second object to be processed are merged into one or more first preset images to obtain one or more merged target images, wherein the target images include the merged first object to be processed and the merged second object to be processed. The step of fusing the first object to be processed and the second object to be processed into one or more first preset images to obtain the one or more fused target images includes: Select a target preset image from a plurality of first preset images, wherein the target preset image includes a third object to be processed and a fourth object to be processed; Replace either the third object to be processed or the fourth object to be processed with the first object to be processed, and replace the other one of the third object to be processed or the fourth object to be processed with the second object to be processed, to obtain the fused target image.
16. An electronic device, characterized in that, The electronic device includes: One or more processors; Storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1-14.
17. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1-14.
Citation Information
Patent Citations
Image processing method, device, equipment and medium
CN112560698A