Image fusion method and apparatus, and electronic device
Patent Information
- Application Number
- PCT/CN2026/090788
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2025-04-19
- Filing Date
- 2026-04-15
- Publication Date
- 2026-10-22
Smart Images

Figure CN2026090788_22102026_PF_FP_ABST
Abstract
Description
Image fusion methods, apparatus and electronic equipment
[0001] Cross-references to related applications
[0002] This application claims priority to Chinese Patent Application No. 202510493790.X, filed in China on April 19, 2025, the entire contents of which are incorporated herein by reference. Technical Field
[0003] This application belongs to the field of image processing technology, specifically relating to an image fusion method, apparatus, and electronic device. Background Technology
[0004] With the development of electronic device technology, users have increasingly higher demands for the image processing capabilities of electronic devices. Currently, electronic devices can not only capture images but also edit them according to user needs. For example, an electronic device can, based on user input, merge the subject of one image into another to obtain a merged image.
[0005] In related technologies, when a user wants object C in image A to be displayed in image B, it is usually necessary to use professional image editing software to extract object C from image A and then merge object C into image B to achieve the fusion of object C and image B. The above image editing operation is cumbersome and complicated and takes a long time. Summary of the Invention
[0006] The purpose of this application is to provide an image fusion method, apparatus, and electronic device that can improve the efficiency of image fusion.
[0007] In a first aspect, embodiments of this application provide an image fusion method, the method comprising: receiving a first input to an object region in a first image of a photo album interface; the object region being an image region of an object selected by the first input; in response to the first input, displaying an object image, the object image being an image copy obtained by copying the image of the object region; and, if the object image is displayed on a second image, displaying a third image, the third image being obtained by image fusion of the object image and the second image.
[0008] Secondly, embodiments of this application provide an image fusion apparatus, which includes: a receiving module and a display module; the receiving module is configured to receive a first input to an object region in a first image of an album interface; the object region is the image region of the object selected by the first input; the display module is configured to display an object image in response to the first input received by the receiving module, the object image being an image copy obtained by copying the image of the object region; the display module is further configured to display a third image when the object image is displayed on a second image, the third image being obtained by image fusion of the object image and the second image.
[0009] Thirdly, embodiments of this application provide an electronic device including a processor and a memory, wherein the memory stores a program or instructions executable on the processor, and the program or instructions, when executed by the processor, implement the steps of the image fusion method as described in the first aspect.
[0010] Fourthly, embodiments of this application provide a readable storage medium storing a program or instructions that, when executed by a processor, implement the steps of the image fusion method as described in the first aspect.
[0011] Fifthly, embodiments of this application provide a chip, the chip including a processor and a communication interface, the communication interface being coupled to the processor, the processor being used to run programs or instructions to implement the steps of the image fusion method as described in the first aspect.
[0012] In a sixth aspect, embodiments of this application provide a computer program product stored in a storage medium, which is executed by at least one processor to implement the steps of the image fusion method as described in the first aspect.
[0013] In this embodiment, a first input is received to an object region in a first image of the album interface; the object region is the image region of the object selected by the first input; in response to the first input, an object image is displayed, which is an image copy obtained by copying the image of the object region; if the object image is displayed on a second image, a third image is displayed, which is obtained by image fusion of the object image and the second image. Through this solution, after receiving the first input to an object region in the first image of the album interface, the object image in the first image can be obtained directly by copying the image of the object region; and if the object image is displayed on a second image, image fusion of the object image and the second image can be performed directly. The entire process eliminates the need for tedious manual image editing by the user, achieving rapid image fusion. This not only shortens the image fusion time but also improves the efficiency of image fusion. Attached Figure Description
[0014] Figure 1 is a flowchart illustrating an image fusion method provided in some embodiments of this application;
[0015] Figure 2 is a schematic diagram of displaying images in a photo album interface according to some embodiments of this application;
[0016] Figure 3 is a schematic diagram of extracting an object from a photo album interface according to some embodiments of this application;
[0017] Figure 4 is a schematic diagram of playing motion effects on the outline of an object according to some embodiments of this application;
[0018] Figure 5A is a schematic diagram of generating an object image according to some embodiments of this application;
[0019] Figure 5B is a schematic diagram of dragging an object image to a thumbnail according to some embodiments of this application;
[0020] Figure 6 is a schematic diagram of displaying prompt information in a photo album interface according to some embodiments of this application;
[0021] Figure 7 is a schematic diagram of dragging an image copy onto an image according to some embodiments of this application;
[0022] Figure 8 is a schematic diagram of an image fusion editing interface provided by some embodiments of this application;
[0023] Figure 9 is a schematic diagram of sliding a first image on a photo album interface according to some embodiments of this application;
[0024] Figure 10 is a schematic diagram of dragging an object image in an album interface according to some embodiments of this application;
[0025] Figure 11 is a schematic diagram of clicking a thumbnail in a photo album interface according to some embodiments of this application;
[0026] Figure 12 is a schematic diagram of displaying prompt information in the album interface according to some embodiments of this application;
[0027] Figure 13 is a schematic diagram of adjusting the display position of an object image according to some embodiments of this application;
[0028] Figure 14 is a schematic diagram of adjusting the display size of an object image according to some embodiments of this application;
[0029] Figure 15 is a schematic diagram of adjusting the display orientation of an object image according to some embodiments of this application;
[0030] Figure 16 is a schematic diagram of an image fusion control in an image fusion editing interface provided by some embodiments of this application;
[0031] Figure 17 is a schematic diagram of a first image provided by some embodiments of this application;
[0032] Figure 18 is a schematic diagram of a second image provided by some embodiments of this application;
[0033] Figure 19A is a schematic diagram of an image fusion editing interface provided by some embodiments of this application;
[0034] Figure 19B is a schematic diagram of a third image provided by some embodiments of this application;
[0035] Figure 20A is a schematic diagram of a first image provided by some embodiments of this application;
[0036] Figure 20B is a schematic diagram of a second image provided by some embodiments of this application;
[0037] Figure 20C is a schematic diagram of an image fusion editing interface provided in some embodiments of this application;
[0038] Figure 21 is a schematic diagram of a third image obtained after image fusion according to some embodiments of this application;
[0039] Figure 22A is a schematic diagram of a first image provided by some embodiments of this application;
[0040] Figure 22B is a schematic diagram of a second image provided by some embodiments of this application;
[0041] Figure 22C is a schematic diagram of an image fusion editing interface provided in some embodiments of this application;
[0042] Figure 23 is a schematic diagram of a third image obtained after image fusion according to some embodiments of this application;
[0043] Figure 24 is a schematic diagram of a first image provided by some embodiments of this application;
[0044] Figure 25 is a schematic diagram of a second image provided by some embodiments of this application;
[0045] Figure 26 is a schematic diagram of an image fusion editing interface provided by some embodiments of this application;
[0046] Figure 27 is a schematic diagram of a third image obtained after image fusion according to some embodiments of this application;
[0047] Figure 28 is a schematic diagram of an image fusion interface provided by some embodiments of this application;
[0048] Figure 29 is a schematic diagram of an interface in an image fusion process provided by some embodiments of this application;
[0049] Figure 30 is a schematic diagram of the structure of an image fusion device provided in some embodiments of this application;
[0050] Figure 31 is a schematic diagram of the structure of an electronic device provided in some embodiments of this application;
[0051] Figure 32 is a schematic diagram of the hardware structure of an electronic device provided in some embodiments of this application. Detailed Implementation
[0052] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.
[0053] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.
[0054] The terms "at least one," "at least one of," etc., used in the specification and claims of this application refer to any one, any two, or a combination of two or more of the included items. For example, at least one of a, b, and c can mean: "a," "b," "c," "a and b," "a and c," "b and c," and "a, b, and c," where a, b, and c can be single or multiple. Similarly, "at least two" refers to two or more items, and its meaning is similar to that of "at least one."
[0055] The terminology used in the embodiments section of this application is only for explaining specific embodiments of this application and is not intended to limit this application. The technical terms involved in the embodiments of this application are explained.
[0056] The identifiers in this application are text, symbols, images, etc. used to indicate information, and can be displayed in the form of controls or other containers, including but not limited to text identifiers, symbol identifiers, and image identifiers.
[0057] Artificial Intelligence Generated Content (AIGC) refers to the technology of automatically generating or modifying digital content using artificial intelligence. AI technologies include deep learning models and generative adversarial networks, and the digital content can include images, text, audio, video, and more.
[0058] Subject matting: Subject matting refers to the technical process of separating the target subject from the original image and generating its precise transparency channel (Alpha channel).
[0059] Image fusion: Image fusion refers to the technical process of merging two images into one image by placing them on an image fusion carrier and adjusting the fusion parameters.
[0060] Foreground subject segmentation algorithm: The foreground subject segmentation algorithm belongs to the field of digital image processing technology. Specifically, it involves a computer vision method that achieves pixel-level foreground extraction through multimodal data fusion. It is suitable for high-precision image segmentation and synthesis in complex scenes and can segment the subject object in the foreground according to the depth distribution in the image.
[0061] Two-finger operation: refers to the interactive action that a user performs simultaneously on the touch screen of an electronic device using two fingers.
[0062] Large image page in photo album: This refers to the full-screen display mode for browsing images in the photo album of an electronic device, where a complete image is displayed in most of the screen area.
[0063] The rule of thirds: This refers to dividing the image into thirds or a nine-square grid when composing a picture, and placing the main subject of the image on the intersection of the third lines or the nine-square grid.
[0064] The golden ratio rule refers to placing the main subject of an image along the golden ratio line of the overall composition.
[0065] Symmetry rule: This refers to placing the main subject of an image on a line of symmetry in the overall composition.
[0066] Leading lines rule: This refers to placing the main subject of an image on actual or implied lines within the overall composition. These actual or implied lines can be rivers, roads, zebra crossings, etc.
[0067] The image fusion method and electronic device provided in this application will be described in detail below with reference to the accompanying drawings, through specific embodiments and application scenarios.
[0068] The image fusion method provided in this application can be applied to cross-image fusion scenarios. A cross-image fusion scenario refers to a scenario where objects from one or more images are merged with another image to obtain a new image.
[0069] One specific cross-image fusion scenario is creative check-in. For example, scenario 1 below.
[0070] Scenario 1: Users can merge their own portrait photos with landscape photos from around the world to generate pictures of themselves taken while traveling, allowing them to visit famous tourist attractions without leaving home.
[0071] One specific scenario for cross-image fusion is image retouching. Cross-image fusion allows for the addition of specific elements to a captured image, enabling quick post-processing. For example, scenario 2 below.
[0072] Scenario 2: A user took a picture of coconut trees by the sea, but the picture is too empty. The user wants to add their own portrait picture to the picture. In this case, a portrait of the user can be merged with the picture of coconut trees by the sea through cross-image fusion to achieve fine retouching of the picture.
[0073] One specific cross-image fusion scenario is taking a group photo remotely. For example, scenario 3 below.
[0074] Scenario 3: When friends are taking a group photo, one friend is absent and cannot be in the picture, which is a pity. At this time, cross-image merging can be used to find a picture of the absent friend, merge this picture with the group photo, and add the absent friend back into the current group photo to achieve a virtual group photo.
[0075] The image fusion method provided in this application can be executed by an image fusion device. Exemplarily, the image fusion method can be an electronic device, or a functional component or entity within that electronic device. The following will executor an electronic device as an example to illustrate the image fusion method provided in this application.
[0076] Figure 1 is a flowchart illustrating the image fusion method provided in an embodiment of this application. As shown in Figure 1, the image fusion method provided in an embodiment of this application may include the following steps 101 to 103.
[0077] Step 101: The electronic device receives a first input to an object area in the first image of the album interface.
[0078] In some embodiments of this application, the aforementioned album interface can be a page for browsing images on an electronic device, which may be referred to as a large image page in the album. This album interface can display the first image completely.
[0079] In some embodiments of this application, the first image described above can be an image selected by the user that includes a subject object or a foreground object. This first image can be an image saved in a photo album application of the electronic device, or it can be an image received by the electronic device that can be processed by a photo album application.
[0080] In some embodiments of this application, the aforementioned object region can be the image region of the first input selected object. In other words, the aforementioned object region is the region in the first image where the object to be extracted, selected by the user, is located.
[0081] In some embodiments of this application, the aforementioned object can be any foreground object of the first image, or it can be the main object of the first image. For example, the aforementioned object can be a person, animal, plant, table and chair, etc., and this application does not limit this.
[0082] In some embodiments of this application, the number of the above-mentioned objects may be one, two or more, and this application does not limit this.
[0083] In some embodiments of this application, the first input can be any form of input from a user to an object area in the first image via a touch area of an electronic device. For example, the touch area can be the screen of the electronic device.
[0084] In some embodiments of this application, the aforementioned first input includes, but is not limited to: a user using a touch device such as a finger or stylus to perform touch input on an object area in the first image through the touch area of an electronic device, or a specific gesture input by the user, or other feasible input. Specifically, it can be determined according to actual usage needs, and this application embodiment does not limit it.
[0085] For example, the above-mentioned touch input may include single-click input, double-click input, or any number of clicks, or it may also include long-press input, short-press input, swipe input, drag input, or drop input, etc.
[0086] For example, the specific gesture mentioned above can be any one of the following: a single-click gesture, a pressure-recognition gesture, a long-press gesture, an area-changing gesture, a double-press gesture, or a double-tap gesture.
[0087] In some embodiments of this application, the first input may include a first sub-input and a second sub-input. The first sub-input may be an input to an object region, used to display the outline of an object in the object region in the first image, facilitating user identification of whether the object is the one to be cut out. The second sub-input may be an input to an image of the object region, used to generate an image copy of the object region image, which is editable and can be moved with the user's finger.
[0088] For example, the first sub-input mentioned above can be a long press input, and the second sub-input mentioned above can be a move input, a drag input, a double-click input, etc.
[0089] In some embodiments of this application, the first sub-input and the second sub-input can be two consecutive inputs. For example, the first sub-input can be a long press input, and the second sub-input can be a swipe input. Specifically, at the end of the long press input, the user's finger does not leave the screen of the electronic device before proceeding with the swipe input.
[0090] In some embodiments of this application, a user can open the photo album application of an electronic device and select a first image from multiple images in the photo album application. The electronic device then opens the photo album interface to display the first image for the user to browse, and the user can make a first input in the image area of the first image.
[0091] For example, Figure 2 is a schematic diagram of displaying images in a photo album interface according to an embodiment of this application. Taking a mobile phone as the electronic device and a large photo album page as the photo album interface, as shown in Figure 2, the user opens the photo album application on the mobile phone, selects the first image 11 from the photo album application, the first image 11 contains a clear human figure, and then the mobile phone enters the large photo album page a1, and displays the complete first image 11 in the large photo album page a1. Below the first image 11, thumbnails of the first image 11 and thumbnails of other images in the photo album application are displayed, such as thumbnails of the second image, thumbnails of picture 1, and thumbnails of picture 2.
[0092] Taking scenario 1 or scenario 2 as an example, and taking a mobile phone as an electronic device, the user opens a photo taken at home on the mobile phone, then long presses on the photo and drags the image of the portrait area in the photo to cut out the portrait in the photo and obtain the object image.
[0093] Taking scenario 3 as an example, the user finds a photo of a friend who is not in the picture, opens the photo on their phone, long-presses on the photo, and drags the image of the portrait area in the photo to cut out the portrait in the photo and obtain the object image.
[0094] Step 102: The electronic device responds to the first input and displays an image of the object.
[0095] In some embodiments of this application, the aforementioned object image may be an image copy obtained by replicating an image of the object region. The image of the object region refers to the image composed of pixels within the object region in the first image.
[0096] In some embodiments of this application, the object image is in an editable state, and the user can adjust the display position of the object image in the album interface by dragging the object image.
[0097] In some embodiments of this application, the electronic device, in response to a first input, can copy an image of an object region in a first image, generate an object image, and display the object image on a photo album interface.
[0098] In some embodiments of this application, the first input may include a first sub-input and a second sub-input, and step 102 may be implemented by steps 1021 and 1022 as described below.
[0099] Step 1021: In response to the first sub-input to the object region, the electronic device plays a first motion effect on the outline of the object in the object region.
[0100] In some embodiments of this application, the outline of an object refers to the boundary line of the object in the object region or the boundary line of the object region, that is, the dividing line between the object and the background or other objects. The outline of an object can be obtained by extracting the part of the image of the object region where the gray value or color changes most significantly, and presenting the key information such as the shape and structure of the object in a concise line form. The outline of an object is the area in the image of the object region where the gray value or color changes sharply, reflecting the shape and structure of the object.
[0101] For example, in a black and white image, the pixel values of the object's edge change drastically from black (0) to white (255), forming an outline.
[0102] In some embodiments of this application, when a user makes a first sub-input to the first image of the album interface, the electronic device responds to the first sub-input by performing image segmentation on the first image using a foreground-subject segmentation algorithm to determine the object region of each object in the first image. Then, it determines whether the input position of the first sub-input is within the object region of a certain object. If the input position of the first sub-input is within the object region of a certain object, a first animation effect is played on the outline of the object in that object region. If the input position of the first sub-input is not within the object region of any object, no processing is performed, and the first image continues to be displayed.
[0103] In some embodiments of this application, the foreground subject segmentation algorithm described above can achieve high-precision image segmentation and synthesis in complex scenes, achieving pixel-level matting. It can clearly extract fine edges, accurately extract subjects with hair, and has a fast matting speed. Specifically, the foreground subject segmentation algorithm can extract the outline of the object in the first image based on the depth information in the first image.
[0104] For example, the electronic device employs a foreground-subject segmentation algorithm to determine the depth information of each object in the first image, and determines the foreground and background in the first image based on the depth information. The foreground is then binarized, i.e., the foreground mask is converted into a binary image. Next, an edge detection algorithm is used to extract the edges of the binary image, i.e., to extract the contour of each object in the first image. Then, if the input position of the first sub-input is within the object region of a certain object, a first animation effect is played on the contour of the object within that object region. The edge detection algorithm may include algorithms such as Canny and Sobel.
[0105] In this way, determining whether the input position of the first sub-input is within the object area of a certain object can ensure that the overall interaction logic is more in line with the user's intuition. That is, by long-pressing a certain object in the first image, the image of the long-pressed object in the long-pressed area can be extracted, realizing that what is pressed is what is extracted. At the same time, it can effectively avoid accidental touches in daily operation of the album interface.
[0106] In some embodiments of this application, when the electronic device performs image segmentation on the first image using a foreground subject segmentation algorithm, it may determine that multiple objects exist in the first image. If multiple objects exist in the first image and the multiple objects are in a segmented state, then each object in the first image is treated as a separate object. Then, the electronic device determines whether the input position of the first sub-input is within the object region of one of the multiple objects. If so, a first motion effect is played on the outline of the object within that object region.
[0107] For example, after the electronic device uses a foreground subject segmentation algorithm on the first image A, it determines that there are two people, X and Y, standing separately in the first image A. The algorithm then identifies these two objects as X and Y. At this point, the electronic device determines whether the user's first sub-input is located in the region where X or Y is located. If the first sub-input is located in the region where X is located, the electronic device plays a first animation effect on the outline of X; if the first sub-input is located in the region where Y is located, the electronic device plays a first animation effect on the outline of Y. If the first sub-input is located in neither the region where X nor the region where Y is located, the first image A remains unchanged.
[0108] In some embodiments of this application, when there are multiple objects in the first image, if there are two or more objects stuck together among the multiple objects, the two or more objects stuck together are regarded as one object, and the individual object is regarded as one object. Then it is determined whether the input position of the first sub-input is within the object area of one of the multiple objects. If so, the first motion effect is played on the outline of the object in the object area.
[0109] For example, after the electronic device uses a foreground subject segmentation algorithm on the first image, it determines that there are two people, X and Y, standing together in the first image. Since these two people have overlapping parts in the first image, it can be determined that the first image contains a complete object. Then, the electronic device can determine whether the position of the first sub-input is contained in the object region of this complete object. If so, the electronic device plays the first motion effect on the outline of this complete object.
[0110] In some embodiments of this application, if an object in the first image, as determined by the foreground subject segmentation algorithm, occupies ≥90% or ≤2.5% of the first image, the electronic device can mask that object, i.e., not treat it as an object that can be extracted, and not play the first animation on the object's outline. This avoids the presence of too many small and inconveniently manipulated objects, or excessively large objects, in the first image.
[0111] In some embodiments of this application, the electronic device responds to a first sub-input to an object region, and if the input duration of the first sub-input is greater than a first duration, plays a first motion effect on the outline of an object in the object region.
[0112] It should be noted that the aforementioned first duration can be set by the default setting of the electronic device or by the user according to actual needs, and this application embodiment does not limit this. For example, the aforementioned first duration can be 600ms or 500ms, etc.
[0113] In some embodiments of this application, the first duration is different from the input duration of other long-press inputs that may exist in the album interface or electronic device, thus reducing the possibility of accidental function touches.
[0114] For example, taking the first sub-input as a long press input, and the first duration as 600ms, the electronic device responds to the user's long press input on the object area. If the long press input is longer than 600ms, the first animation effect can be played on the outline of the object in the object area.
[0115] In some embodiments of this application, the first motion effect may include at least one of the following: a highlight motion effect, a flowing light motion effect, and a breathing motion effect.
[0116] In some embodiments of this application, a highlighting effect refers to the effect of enhancing the brightness or saturation of a specific area in an image, making it more visually prominent or eye-catching. Specifically, this can be achieved by adjusting the brightness value of pixels or applying filters such as Gaussian blur, combined with dynamic effects to enhance visual impact. These dynamic effects may include gradients or flickering.
[0117] In some embodiments of this application, the flowing light effect is a visual effect that simulates the flow or flickering of light, typically manifested as light moving smoothly or flickering on an image surface. Specifically, gradient colors and animation effects can be used to simulate the flow of light, combined with changes in transparency and displacement animation to achieve flickering light and shadow.
[0118] In some embodiments of this application, the breathing animation effect is a visual effect that simulates the "breathing" or "pulsating" of an object, typically manifested as periodic changes in the size, transparency, or color of elements in an image. Specifically, periodic changes in size or transparency can be achieved through keyframe animation, combined with an easing function to make the animation more natural. The easing function can be Ease In / Out.
[0119] For example, for highlight animation effects, color enhancement can be used, which involves increasing the pixel values of the outline area to create contrast with the background, and then gradually increasing the brightness of the outline through timeline animation to create a flickering or gradient effect, thus achieving a dynamic effect. Increasing the pixel values of the outline area includes increasing the brightness or saturation of the pixels in the outline area.
[0120] For example, for the flowing light effect, a gradient overlay is used, that is, a semi-transparent gradient layer is superimposed on the outline to simulate the flow of light, and the gradient layer is moved along the outline through displacement animation to form the flowing light effect.
[0121] For example, for breathing animation, the sense of breathing is enhanced by scaling the outline, that is, periodically enlarging or shrinking the outline lines with the center of the outline as a reference, while adjusting the transparency of the outline lines at the same time.
[0122] Next, taking the album interface as the large image page, the object area as the human body area, the first sub-input as a long press input, the first duration as 600ms, and the first animation effect as a highlight animation effect and a flowing light animation effect as examples, we will describe the process by which the electronic device responds to the first sub-input of the object area and plays the first animation effect on the outline of the object in the object area. As shown in Figure 3, on the large image page a1 of the electronic device's album, the user long presses the human body area 14 in the first image 11. After a 600ms long press, the electronic device can use a foreground image segmentation algorithm to determine the object in the first image 11 and determine whether the area long-pressed by the user is within the object area of a certain object in the first image. Then, as shown in Figure 4, if the area long-pressed by the user is the area of the human body object in the first image, i.e., the human body area 14, the electronic device highlights the outline line 15 of the human body in the first image and plays a flowing light animation effect on the outline line 15.
[0123] Step 1022: In response to the second sub-input of the image of the object region, the electronic device copies the image of the object region to obtain the object image and displays the object image.
[0124] In some embodiments of this application, the image of the object region can be an image composed of pixels of the object region. The second sub-input can be a drag input, a move input, or a drop input, etc., and this application does not limit this.
[0125] In some embodiments of this application, the object image includes the image of the object region in the first image, with other regions being transparent, meaning other regions have no pixels. In other words, the shape of the object image is the shape of the object in that object region.
[0126] In some embodiments of this application, the object image can be displayed in a floating form on the album interface, and the display position of the object image on the album interface can be determined according to the end position of the user's second sub-input.
[0127] In some embodiments of this application, the electronic device, in response to a second sub-input from a user on an image of an object region, determines the pixels of the object region, then copies the image composed of the pixels of the object region to generate an object image, and displays the object image at the end position of the second sub-input. The image size of the object image is the same as the image size of the object region.
[0128] In some embodiments of this application, if the image size of the object image is large, such as occupying 80% of the first image, the electronic device can reduce the image size of the object image according to a reference ratio. If the image size of the object image is too small, such as occupying 3% of the first image, the electronic device can increase the image size of the object image according to a reference ratio. If the image size of the object image is appropriate, such as occupying 10% of the first image, the electronic device does not need to adjust the image size of the object image.
[0129] For example, the above reference ratio can be 10%-20%, that is, the image size of the object image occupies 10%-20% of the first image, so that the object image can be seen clearly without affecting the subsequent interaction process.
[0130] In this way, the electronic device can adjust or not adjust the size of the object image based on the size relationship between the object image and the first image, ensuring that the object image does not seriously obstruct the picture of the album interface and affect normal interaction during the interaction process.
[0131] It should be noted that when the electronic device does not adjust the image size of the object image, the object image used in all subsequent steps is an image obtained directly after copying the object area. When the electronic device adjusts the image size of the object image, the object image used in all subsequent steps can be an object image obtained by adjusting the image size of the image copy of the object area.
[0132] Next, taking the album interface as the large album page, the object area as the human body area in the first image, the second sub-input as drag input, and the object image as an image copy as an example, the process of the electronic device responding to the second sub-input on the image of the object area, copying the image of the object area, obtaining the object image, and displaying the object image will be described. As shown in Figure 5A, on the large album page a1 of the electronic device, the user drags the human body image of the human body area 14 in the first image 11, and the end position of the drag input is at the upper right corner of the first image 11. The electronic device responds to the user's drag input, generates an image copy, namely the object image 13, and displays the object image 13 at the upper right corner of the first image 11.
[0133] In some embodiments of this application, taking a long-press input as the first sub-input and a drag input as an example, after the user long-presses the object area of the first image using a touch device, the electronic device plays a first animation on the outline of the object in the object area. The user continues to long-press the screen of the electronic device without releasing the touch device and drags the image of the object area. The electronic device then copies the image of the object area to generate an object image and displays the object image. In this case, the first sub-input and the second sub-input are two consecutive inputs.
[0134] Thus, in response to the user's first sub-input, the electronic device plays a first animation on the outline of the object selected by the user, so that the user can see the selected object. Then, in response to the user's second sub-input, the electronic device copies the image of the object region, generates an object image, and displays it. This object image is in an editable state, so that the user can subsequently achieve image fusion by moving the position of the object image. In other words, the user can trigger the foreground subject segmentation algorithm to cut out the object region of the object to be extracted in the first image by long-pressing it, thus quickly and intuitively obtaining the image of the object in the image, improving the efficiency of the cutout. Furthermore, since the foreground subject segmentation algorithm can clearly extract fine edges, it improves the accuracy of the cutout and achieves better cutout results.
[0135] Step 103: If the object image is displayed on the second image, the electronic device displays the third image.
[0136] In some embodiments of this application, the third image may be obtained by image fusion of the object image and the second image. The second image is an image other than the first image that has been image fused with the object image.
[0137] In some embodiments of this application, when an object image is displayed on a second image, the electronic device can perform image fusion between the object image and the second image to obtain a third image and display the third image.
[0138] In some embodiments of this application, before step 103, the electronic device may display a second image, and then, with the object image displayed on the second image, the electronic device may perform image fusion of the object image and the second image to obtain a third image.
[0139] In some embodiments of this application, the electronic device can display the second image in three ways. The first way is to slide the first image on the album interface to switch the first image displayed on the album interface to the second image. The second way is to click on the thumbnail of the second image displayed on the album interface, and the electronic device displays the second image on the album interface. The third way is for the user to drag an object image onto the thumbnail of the second image displayed on the album interface, and the electronic device displays the second image on the album interface.
[0140] In some embodiments of this application, after the electronic device displays a second image in the album interface, if the object image is displayed on the second image, the electronic device can perform image fusion on the object image and the second image to obtain a third image, and then display the third image. If the object image is not displayed on the second image, the user can drag the object image onto the second image by dragging input, and then the electronic device can perform image fusion on the object image and the second image to obtain a third image, and then display the third image.
[0141] The image fusion method provided in this application embodiment receives a first input to an object region in a first image of an album interface; the object region is the image region of the object selected by the first input; in response to the first input, an object image is displayed, which is an image copy obtained by copying the image of the object region; if the object image is displayed on a second image, a third image is displayed, which is obtained by fusion of the object image and the second image. Through this solution, after receiving a first input to an object region in a first image of an album interface, the object image in the first image can be obtained directly by copying the image of the object region; and if the object image is displayed on a second image, the object image and the second image can be directly fused. The entire process eliminates the need for tedious manual image editing by the user, achieving rapid image fusion. This not only shortens the image fusion time but also improves the efficiency of image fusion.
[0142] In some embodiments of this application, before step 103 above, the image fusion method provided in the embodiments of this application may further include steps 201 to 204 below, and step 103 above can be specifically implemented by step 1031 below.
[0143] Step 201: The electronic device receives the first drag input.
[0144] In some embodiments of this application, the first drag input described above can be used to drag an object image onto an image identifier of a second image. In other words, the object image can move as the first drag input moves.
[0145] In some embodiments of this application, in addition to displaying the first image, the photo album interface of the electronic device may also display a list of image identifiers for images in the photo album application. This list may include the image identifier of the first image and the image identifiers of images in the photo album application that precede or follow the first image. For example, the image identifiers may be thumbnails or image names, etc.
[0146] In some embodiments of this application, if the image identifier list includes an image identifier for the second image, the user can drag the object image onto that image identifier. If the image identifier list does not include an image identifier for the second image, the user can first slide the image identifier list to update the displayed image identifiers, and then drag the object image onto that image identifier if the image identifier list includes the image identifier for the second image.
[0147] In some embodiments of this application, the first drag input may be the user's input of an object image after the first input has ended and the user's touch device has left the screen of the electronic device.
[0148] For example, taking a touch device as the user's finger, the first input includes a first sub-input and a second sub-input, and the second sub-input is a drag input. After the drag input is completed, the user can drag the object image to the image icon of the second image after the finger leaves the screen of the electronic device.
[0149] In some embodiments of this application, the first drag input can be the user's input of an object image after the first input has ended and the user's touch device has been pressing and holding the screen of the electronic device.
[0150] For example, taking a touch device as the user's finger, the first input includes a first sub-input and a second sub-input, and the second sub-input is a drag input. After the drag input is completed, the user can drag the object image to the image icon of the second image while keeping their finger pressed on the screen of the electronic device.
[0151] Step 202: The electronic device responds to the first drag input and displays the second image.
[0152] In some embodiments of this application, the electronic device, in response to a first drag input, switches the first image displayed on the album interface to the second image when the end position of the first drag input is on the image identifier of the second image.
[0153] For example, taking a photo album interface as a large photo album page, image icons as thumbnails, and a user dragging input using their right index finger as an example, the process of an electronic device displaying a second image in response to a first drag input is described. As shown in Figure 5B, on the large photo album page a1 of the electronic device, a first image 11, an object image 13, and a thumbnail list are displayed. The thumbnail list includes thumbnails of the first image 11, the second image 121, the image 1 thumbnail, and the image 2 thumbnail. The user can drag the object image 13 onto the second image thumbnail 121 using their right index finger.
[0154] It should be noted that users can use any finger of any hand to perform the first drag input described above, and this application embodiment does not limit this.
[0155] In some embodiments of this application, step 202 described above can be implemented by step 2021 described below.
[0156] Step 2021: If the duration of the object image on the image identifier of the second image is greater than or equal to the duration threshold, the electronic device responds to the first drag input and displays the second image.
[0157] It should be noted that the aforementioned duration threshold can be set by the electronic device by default or by the user according to actual needs, and this application embodiment does not limit this. For example, the aforementioned duration threshold can be 300ms, 200ms, or 280ms, etc.
[0158] In some embodiments of this application, the aforementioned duration threshold is different from the input duration of other long-press inputs that may exist in the album interface or electronic device, thereby reducing the possibility of accidental function touches.
[0159] For example, referring to Figure 5B above, taking a duration threshold of 300ms as an example, as shown in Figure 6, if the user uses his right index finger to drag the object image 13 to the image identifier 121 of the second image and stays on the image identifier 121 of the second image for 300ms, the electronic device can switch the first image 11 displayed on the album interface a1 to the second image 12.
[0160] Therefore, displaying the second image after the object image has remained on the image identifier of the second image for a sufficiently long time can reduce accidental touches.
[0161] Step 203: The electronic device receives the second drag input.
[0162] In some embodiments of this application, the second drag input described above can be used to drag an object image onto a second image. In other words, the object image can move as the second drag input moves.
[0163] In some embodiments of this application, the second drag input described above can be used to drag an object image from an image identifier of a second image onto the second image.
[0164] In some embodiments of this application, the second drag input can be a drag input of the object image by the user after the first drag input has ended and the touch device used by the user has left the screen of the electronic device.
[0165] The aforementioned touch device may include the user's finger, stylus, etc.
[0166] For example, taking the touch device as the user's finger and the image identifier as the thumbnail, the user can drag the object image from the thumbnail of the second image to the second image after dragging the object image onto the thumbnail of the second image and then leaving the screen of the electronic device.
[0167] In some embodiments of this application, the first drag input can be the user drag input of the object image when the first drag input ends and the user's touch device continues to press and hold the screen of the electronic device.
[0168] For example, taking a touch device as a user's finger, a user can drag an object image from the thumbnail of the second image onto the second image while holding down the finger on the screen of the electronic device.
[0169] For example, after a user drags an object image onto the thumbnail of a second image using their right index finger, they hold their right index finger on the object image without lifting it. Then, the user drags the object image from the thumbnail of the second image onto the second image again using their right index finger.
[0170] Step 204: The electronic device responds to the second drag input and displays the object image on the second image.
[0171] In some embodiments of this application, the electronic device responds to a second drag input and displays an object image on the second image when the end position of the second drag input is on the second image.
[0172] For example, taking the user's right index finger, the album interface as a large album page, and the image identifier as a thumbnail as an example, the process of the electronic device responding to the second drag input and displaying the object image on the second image is described. As shown in Figure 7, on the large album page a1 of the electronic device, the user uses their right index finger to drag the object image 13 from the thumbnail 121 of the second image 12 to the second image 12 for display.
[0173] In some embodiments of this application, the "displaying the object image on the second image" in step 204 above can be specifically implemented by step 2041 or step 2042 as described below.
[0174] Step 2041: The electronic device displays the object image at a first position on the second image.
[0175] In some embodiments of this application, the first position mentioned above may be the end position of the second drag input.
[0176] In some embodiments of this application, the electronic device responds to the second drag input, determines the end position of the second drag input, and displays an object image at the end position of the second drag input.
[0177] In other words, the electronic device can display an object image at a location manually selected by the user on the second image.
[0178] Step 2042: The electronic device displays the object image at a second position on the second image.
[0179] In some embodiments of this application, the aforementioned second position may be the display position of an object image determined based on composition recommendation information of the second image, which may be determined based on image features of the second image.
[0180] In some embodiments of this application, the electronic device can determine composition recommendation information based on the image features of the second image, and then determine the display position of the object image, i.e., the second position, based on the composition recommendation information of the second image.
[0181] In some embodiments of this application, the above-mentioned composition recommendation information may include a composition recommendation position.
[0182] In some embodiments of this application, the specific implementation of the electronic device determining composition recommendation information based on the image features of the second image may include: the electronic device extracting the image features of the second image, and determining the matching degree between each object in the second image and the object in the object image based on the image features of the second image, and determining the position of the object in the second image whose matching degree is greater than the matching degree threshold as the composition recommendation position.
[0183] The matching threshold can be set by the electronic device by default or by the user according to actual needs; this application embodiment does not limit this. For example, the matching threshold can range from 70% to 95%. For instance, the matching threshold can be 90% or 95%.
[0184] For example, taking a human portrait as the object image and a picture of coconut trees by the sea in scene 2 as the second image, after the electronic device extracts the image features of the second image, it determines that the second image includes the sky, the sea, the beach and the coconut trees. The beach has the highest matching degree with the human portrait, the sky has a lower matching degree with the human portrait, the sea has a lower matching degree with the human portrait, and the coconut trees have a higher matching degree with the human portrait. The electronic device can then determine the location of the beach or the location around the coconut trees as the recommended composition location.
[0185] In some embodiments of this application, the specific implementation of the electronic device determining composition recommendation information based on the image features of the second image may include: the electronic device determining candidate composition recommendation positions on the second image according to composition rules, and then determining the composition recommendation position from the candidate composition recommendation positions based on the image features of the second image at each candidate composition recommendation position.
[0186] In some embodiments of this application, the composition rules may include the rule of thirds, the golden ratio, the symmetry rule, and the guide line rule. For example, the electronic device uses the rule of thirds to divide the second image into a nine-grid layout, and determines the intersections or lines of the grid as candidate composition recommendation positions. The electronic device uses the golden ratio rule to determine the position at 0.618 of the width or height of the second image as a candidate composition recommendation position. The electronic device uses the symmetry rule; if the second image has a symmetrical composition, the central axis of the second image is determined as a candidate composition recommendation position. The electronic device uses the guide line rule; if the second image contains guide lines such as rivers or roads, the endpoints of the guide lines are determined as candidate composition recommendation positions.
[0187] In some embodiments of this application, the electronic device can determine the matching degree between the object at each candidate composition recommendation position and the object in the object image based on the image features of the second image at each candidate composition recommendation position, and determine the candidate composition recommendation position of the object in the second image whose matching degree with the object in the object image is greater than the matching degree threshold as the composition recommendation position.
[0188] In some embodiments of this application, the specific implementation of the electronic device determining the second position based on the composition recommendation information of the second image may include: the electronic device determining the matching degree between the object and the object image at each composition recommendation position based on the image features of the second image and the image features of the object image at each composition recommendation position, and determining the composition recommendation position of the object in the second image with the highest matching degree with the object image as the second position.
[0189] In some embodiments of this application, the specific implementation of the electronic device determining the second position based on the composition recommendation information of the second image may include: the electronic device may randomly select one of the composition recommendation positions and determine it as the second position.
[0190] In some embodiments of this application, the electronic device can input a second image and an object image into a composition recommendation model, which outputs a second position. The electronic device then displays the object image at the second position of the second image. In other words, the extraction of image features from the second image, the determination of composition recommendation information based on those features, and the determination of the object image's display position based on that composition recommendation information can be specifically achieved through a composition recommendation model.
[0191] In this way, the user only needs to move the object image onto the second image, without the user needing to select a position. The electronic device can automatically frame a suitable position on the second image to display the object image, reducing the user's operation.
[0192] Step 1031: When the second drag input ends, the electronic device merges the object image with the second image to obtain a third image and displays the third image.
[0193] In some embodiments of this application, the aforementioned second drag input end means that the user stops dragging the object image and the touch device leaves the screen of the electronic device.
[0194] It should be noted that the explanation of the touch device can be found in the relevant description of the above embodiments, and will not be repeated here to avoid repetition.
[0195] For example, taking a touch device as a finger, when a user drags an object image onto a second image and then releases their finger, the electronic device merges the object image with the second image to obtain a third image and displays the third image.
[0196] It should be noted that the specific implementation of the electronic device fusing the object image with the second image to obtain a third image and displaying the third image can be found in the relevant description of the following embodiments.
[0197] Next, taking the example of a user using their right index finger, the album interface being a large image page, and image icons being thumbnails, and referring to Figures 6 and 7, steps 201 to 204, step 1031, and related steps will be described. As shown in Figure 6, the large image page a1 displays a first image 11, an object image 13, and a thumbnail list, which includes a thumbnail 121 of the second image 12. The user drags the object image 13 onto the thumbnail 121 of the second image 12 using their right index finger and holds it for 300ms, at which point the electronic device switches the first image 11 displayed on the large image page a1 to the second image 12. Then, as shown in Figure 7, the user drags the object image 13 from the thumbnail 121 of the second image 12 onto the second image 12 displayed on the large image page a1 using their right index finger, and the electronic device displays the object image 13 on the second image 12.
[0198] Taking scenario 1 as an example, the user long-presses the portrait with their right index finger and drags the portrait onto the thumbnail of the coconut tree image on the beach in the album interface. The album interface of the electronic device displays the coconut tree image on the beach. Then, the user drags the portrait from the thumbnail of the coconut tree image on the beach to the coconut tree image on the beach displayed in the album interface with their right index finger.
[0199] Taking scenario 3 as an example, the user long-presses on a friend's portrait with their right index finger and drags the friend's portrait onto the thumbnail of the group photo in the album interface. The album interface of the electronic device displays the group photo. Then, the user drags the portrait from the thumbnail of the group photo onto the group photo displayed in the album interface with their right index finger.
[0200] In this way, the user drags the object image with a single finger to display a second image on the electronic device, and then displays the object image on top of the second image. After the user's dragging operation ends, the electronic device merges the object image and the second image. Since the object image's display position on the second image can be the position where the user's dragging operation ends, the user simply drags and drops the cutout object to a desired location in the merged image, and releasing the finger achieves the desired merging effect. The overall interaction is simple and easy to operate, and the position of the cutout object in the merged image meets the user's needs. Alternatively, since the object image's display position on the second image can be the optimal composition position determined by the electronic device, the user simply drags and drops the cutout object to the desired merging image, without needing to worry about the placement position, and releasing the finger achieves the optimal merging effect. The overall interaction is even simpler and easier to operate, and the position of the cutout object in the merged image is also at the optimal composition position, resulting in a good image merging effect.
[0201] In some embodiments of this application, step 1031 can be specifically implemented by steps 10311 to 10313 as described below.
[0202] Step 10311: When the second drag input ends, the electronic device displays the image fusion editing interface.
[0203] In some embodiments of this application, the aforementioned second drag input end means that the user stops dragging the object image and the touch device leaves the screen of the electronic device.
[0204] In some embodiments of this application, the image fusion editing interface described above may include an object image, a second image, and an image fusion control, with the object image displayed on the second image.
[0205] For example, taking a touch device as a finger, when a user drags an object image onto a second image and then releases their finger, the electronic device can display an image fusion editing interface. On this image fusion interface, the object image can be displayed at the second position where the drag input ends on the second image, or the object image can be displayed at a second position on the second image.
[0206] It should be noted that the explanation of the second position and the display position of the object image on the second image can be found in the relevant description of the above embodiments, and will not be repeated here to avoid repetition.
[0207] Step 10312: The electronic device receives a second input to the image fusion control.
[0208] In some embodiments of this application, the image fusion editing interface described above may include an image fusion control, which is used to trigger an image fusion operation.
[0209] In some embodiments of this application, the second input can be any form of input from the user to the image fusion control via a touch area of the electronic device. For example, the touch area can be the screen of the electronic device.
[0210] In some embodiments of this application, the second input mentioned above includes, but is not limited to: single-click input, double-click input, any number of clicks input, short-press input, long-press input, single-click gesture, or long-press gesture, etc.
[0211] Step 10313: The electronic device responds to the second input by performing image fusion between the object image and the second image to obtain a third image, and then displays the third image.
[0212] It should be noted that the specific implementation of the electronic device fusing the object image with the second image to obtain a third image and displaying the third image can be found in the relevant description of the following embodiments.
[0213] For example, taking a click as the second input, as shown in Figure 8, the electronic device displays an image fusion editing interface a2. The image fusion editing interface a2 includes an image fusion control 21, an object image 13, and a second image 12. The object image 13 is displayed on the second image 12. The user can click the image fusion control 21. In response to the user's click input, the electronic device merges the object image 13 with the second image 12 to obtain a third image 40, and displays the third image 40.
[0214] Thus, after the user drags the object image onto the second image, the electronic device can display an image fusion editing interface, allowing the user to adjust the object image and preview its layout, size, and other aspects in the second image. Then, when the user clicks the image fusion control in the image fusion editing interface, the electronic device will merge the object image with the second image. This results in a third image that better meets the user's diverse image fusion needs. The fusion interaction is simple, and the fusion position of the object image can be flexibly adjusted.
[0215] In some embodiments of this application, before step 103 above, the image fusion method provided in the embodiments of this application may further include the following steps 301 or 302, and step 103 above can be specifically implemented by the following step 1032.
[0216] Step 301: The electronic device receives a switching input for the first image and, in response to the switching input, switches the first image to the second image.
[0217] In some embodiments of this application, the photo album interface of the electronic device displays a first image, and the user can switch the first image. In response to the switching input, the electronic device switches the displayed first image to a second image.
[0218] In some embodiments of this application, the aforementioned switching input can be a sliding input. For example, the sliding input can be a left-right sliding input or a up-down sliding input.
[0219] It should be noted that if the second image is the previous or next image of the first image, the first switching input may include one slide input. If there are multiple images between the second image and the first image, the first switching input may include multiple slide inputs. The specific number of slide inputs can be determined according to the actual situation, and this application embodiment does not limit this.
[0220] In some embodiments of this application, taking user interaction with the screen of an electronic device via finger as an example, after the electronic device responds to the first input and displays an object image, the user keeps one finger pressed on the object image, and the user can use another finger to switch inputs to the first image. Here, one finger and another finger are two different fingers.
[0221] It should be noted that, in the embodiments of this application, the two different fingers used by the user may include one finger of the left hand and one finger of the right hand, or may include two fingers of the left hand, or may include two fingers of the right hand, or may include any finger of user A and any finger of user B. The embodiments of this application do not limit this.
[0222] For example, taking the user using their left index finger to perform a switching input, using their right index finger to long-press an object image, the album interface being the large album page, the switching input being a single swipe input, and the second image being the next image after the first image as an example, as shown in Figure 9, the large album page a1 of the electronic device displays the second image 12, the object image 13, a thumbnail of the first image 11, and a thumbnail 121 of the second image. The user long-presses the object image 13 with their right index finger and swipes once from left to right on the first image 11 with their left index finger. Then, as shown in Figure 10, the electronic device responds to the user's single swipe input with their left index finger and switches the first image 11 displayed on the large album page a1 to the second image 12. During this process, the user's right index finger continues to long-press the object image 13, and the object image 13 remains displayed.
[0223] In the context of scenario 1 above, the user long-presses the portrait with their right index finger and then slides the first image on the album screen with their left index finger, and the electronic device displays a picture of coconut trees by the sea on the album screen.
[0224] In conjunction with scenario 3 above, the user long-presses the portrait with their right index finger and then slides the first image on the album interface with their left index finger, and the electronic device displays the group photo on the album interface.
[0225] Step 302: The electronic device receives a selection input for the image identifier of the second image, and displays the second image in response to the selection input.
[0226] In some embodiments of this application, the photo album interface of the electronic device not only displays the first image, but also displays a list of image identifiers, which includes the image identifier of the first image and the image identifiers of other images in the photo album application.
[0227] In some embodiments of this application, when the image identifier of the second image is displayed in the album interface, the user can select the image identifier of the second image, and the electronic device responds to the selection input by displaying the second image in the album interface.
[0228] Displaying a second image in the album interface can include switching the first image displayed in the album interface to the second image, or updating the display of the second image in the album interface.
[0229] In some embodiments of this application, when the image identifier of the second image is not displayed on the album interface, the user can first slide the image identifier list on the album interface, that is, slide the image identifier list until the image identifier of the second image is displayed in the image identifier list. Then the user selects the image identifier of the second image, and the electronic device displays the second image in response to the selection input.
[0230] For example, the above selection input can be single-click input, double-click input, single-click input, or short-press input.
[0231] In some embodiments of this application, taking user interaction with the screen of an electronic device via finger as an example, after the electronic device displays an object image in response to the first input, the user keeps one finger pressed on the object image, and the user can use another finger to select an image identifier for a second image. Here, "one finger" and "another finger" refer to two different fingers.
[0232] It should be noted that, in the embodiments of this application, the two different fingers used by the user may include one finger of the left hand and one finger of the right hand, or may include two fingers of the left hand, or may include two fingers of the right hand, or may include any finger of user A and any finger of user B. The embodiments of this application do not limit this.
[0233] For example, taking the user using their left index finger to switch input, using their right index finger to long-press on an object image, the album interface being the large image page, the input selection being a single click, and the second image being the next image after the first image as an example, as shown in Figure 11, the large image page a1 of the electronic device displays the first image 11, the object image 13, a thumbnail of the first image 11, and a thumbnail 121 of the second image. The user long-presses on the object image 13 with their right index finger and clicks on the thumbnail 121 of the second image with their left index finger. Then, as shown in Figure 10, the electronic device responds to the user's left index finger clicking on the thumbnail 121 of the second image and displays the second image 12 on the large image page a1. During this process, the user's right index finger continues to long-press on the object image 13, and the object image 13 remains displayed.
[0234] In the context of scenario 1 above, the user long-presses on a portrait with their right index finger and then taps the thumbnail of a coconut tree image on the beach in the album interface with their left index finger. The album interface of the electronic device then displays the coconut tree image.
[0235] In conjunction with scenario 3 above, the user long-presses on a friend's portrait with their right index finger, and then taps the thumbnail of the group photo in the album interface with their left index finger. The group photo is then displayed in the album interface of the electronic device.
[0236] Step 1032: When the first input ends and the object image is displayed on the second image, the electronic device performs image fusion between the object image and the second image to obtain a third image and displays the third image.
[0237] In some embodiments of this application, the aforementioned first input end refers to the touch device leaving the screen of the electronic device after the electronic device displays an image of the object.
[0238] In some embodiments of this application, taking the first input as including a first sub-input and a second sub-input, and the user interacting with the screen of the electronic device through a finger as an example, after the user performs the second sub-input on the image of the object area, the electronic device responds to the second sub-input by displaying the object image. During this process, the user's finger is pressed and held on the object image without leaving it. Then, when the user releases their finger, it indicates that the first input has ended.
[0239] In some embodiments of this application, taking the interaction between a user and the screen of an electronic device via a finger as an example, the user holds down one finger on the object image without lifting it, and the user uses another finger to switch the first image. In response to the switching input, the electronic device switches the first image displayed on the album interface to the second image. Then, after the user releases their finger from the object image, if the object image is displayed on the second image, the electronic device merges the object image and the second image to obtain a third image, and displays the third image.
[0240] In some embodiments of this application, taking the interaction between a user and the screen of an electronic device via a finger as an example, the user holds down one finger on the object image without lifting it, and the user uses another finger to select an image identifier of the second image. The electronic device responds to the selection input and displays the second image. Then, after the user releases their finger from the object image, if the object image is displayed on the second image, the electronic device performs image fusion between the object image and the second image to obtain a third image and displays the third image.
[0241] It should be noted that the specific implementation of the electronic device fusing the object image with the second image to obtain a third image and displaying the third image can be found in the relevant description of the following embodiments.
[0242] In this way, when a user presses and holds an object image with one finger, the electronic device can trigger the display of a second image through the interaction of another finger. Furthermore, when the user releases the finger that has been pressing and holding the object image, if the object image is displayed on the second image, the electronic device performs image fusion. This provides a two-finger interaction method, which improves the flexibility of the user's interaction in triggering the display of a second image on the electronic device, as well as the flexibility of the user's interaction in triggering the image fusion on the electronic device.
[0243] In some embodiments of this application, step 1032 can be specifically implemented by steps 10321 to 10323 as described below.
[0244] Step 10321: When the first input ends, the electronic device displays the image fusion editing interface.
[0245] In some embodiments of this application, when the first input ends and the object image is displayed on the second image, the electronic device displays an image fusion editing interface.
[0246] It should be noted that the explanation of the end of the first input can be found in the relevant description of step 1032 above, and will not be repeated here to avoid repetition.
[0247] In some embodiments of this application, the image fusion editing interface described above may include an object image, a second image, and an image fusion control, with the object image displayed on the second image.
[0248] For example, taking the interaction between a user and the screen of an electronic device through a finger as an example, when the user triggers the electronic device to display a second image with another finger, the user's finger presses down on the object image. After the electronic device displays the second image, the user releases their finger, that is, the finger leaves the screen of the electronic device. If the object image is displayed on the second image, the electronic device can display an image fusion editing interface, on which the object image can be displayed on the second image.
[0249] For example, after a user drags an image of an object area with their right index finger to generate an object image, they press and hold the object image with their right index finger, and then use their left index finger to switch inputs or slide inputs to trigger the electronic device to display a second image. After the electronic device displays the second image, the user's right index finger leaves the screen of the electronic device. Then, if the object image is displayed on the second image, the electronic device can display an image fusion editing interface, on which the object image can be displayed on the second image.
[0250] Step 10322: The electronic device receives a second input to the image fusion control.
[0251] Step 10323: In response to the second input, the electronic device performs image fusion between the object image and the second image to obtain a third image and displays the third image.
[0252] It should be noted that the specific implementation of step 10322 can be found in the relevant description of step 10312 above, and the specific implementation of step 10323 can be found in the relevant description of step 10312 above. To avoid repetition, it will not be described again here.
[0253] In this way, when a user presses and holds an object image with one finger, they can trigger the electronic device to display a second image by interacting with another finger. When the user releases the finger that was pressing and holding the object image, if the object image is still displayed on the second image, the electronic device can display an image fusion editing interface. This allows the user to adjust the object image and preview its layout, size, and other aspects within the second image. Then, when the user clicks the image fusion control in the image fusion editing interface, the electronic device merges the object image with the second image. The resulting third image is more in line with the user's needs and has a better effect.
[0254] It should be noted that in the above description, steps 301 and 302 are both triggered by two-finger operation to switch the second image on the electronic device, and step 1032 is performed when the user releases their hand after pressing the object image and the object image is displayed on the second image.
[0255] In some other embodiments of this application, steps 301 and 302 described above can be triggered by a single-finger operation to switch the second image on the electronic device. In this case, the electronic device can perform an image fusion operation while displaying the object image on the second image.
[0256] In some embodiments of this application, taking the interaction between a user and the screen of an electronic device via a finger as an example, after the electronic device responds to the first input and displays the object image, the user can release their hand, and the object image can remain displayed on the album interface. The user can switch inputs to the first image with one finger. After the electronic device responds to the switch input and displays the second image, if the object image is displayed on the second image, the electronic device can perform image fusion between the object image and the second image to obtain a third image and display the third image.
[0257] In some embodiments of this application, taking the interaction between a user and the screen of an electronic device via a finger as an example, after the electronic device responds to the first input and displays the object image, the user can release their hand, and the object image can remain displayed on the album interface. The user can use one finger to select the image icon of the second image. After the electronic device responds to the selection input and displays the second image, if the object image is displayed on the second image, the electronic device can perform image fusion between the object image and the second image to obtain a third image, and then display the third image.
[0258] In some embodiments of this application, the image fusion method provided in this application may further include the following steps 303 to 305, and the above step 103 may be implemented by the following step 1033.
[0259] Step 303: If the object image is not displayed on the second image, the electronic device displays the first prompt message.
[0260] In some embodiments of this application, the aforementioned first prompt information can be used to prompt the user to drag the object image onto the second image for image fusion.
[0261] In some embodiments of this application, if the object image is not displayed on the second image after the electronic device displays the second image, the electronic device cannot perform the image fusion operation. In this case, the electronic device may display a first prompt message to prompt the user to drag the object image onto the second image for image fusion.
[0262] In some embodiments of this application, the electronic device may display a first prompt message on the second image, allowing the user to intuitively determine whether to drag the object image onto the second image. For example, the electronic device may display the first prompt message at the center, top, or bottom of the second image.
[0263] For example, as shown in FIG12, the album interface a1 of the electronic device displays the second image 12, and the object image 13 is displayed in the blank area of the album interface a1, that is, the object image 13 is not displayed on the second image 12. The electronic device can display the first prompt information 16 on the second image 12, such as "drag to the screen to merge", to prompt the user to drag the object image 13 to the second image 12.
[0264] Step 304: The electronic device receives the third drag input.
[0265] In some embodiments of this application, the third drag input described above can be used to drag an object image onto a second image.
[0266] In some embodiments of this application, the display position of the object image on the album interface is the end position of the user's second sub-input. After the second sub-input ends, the user can keep pressing and holding the object image. Then, after seeing the first prompt, the user can perform a third drag input on the object image. In this case, the second sub-input and the third drag input can be understood as two consecutive inputs.
[0267] In some embodiments of this application, the display position of the object image on the album interface is the end position of the user's second sub-input. After the second sub-input ends, the user releases the hand, and then, after seeing the first prompt information, the user performs a third drag input on the object image.
[0268] Step 305: In response to the third drag input, the electronic device displays the object image on the second image.
[0269] In some embodiments of this application, the electronic device, in response to a third drag input, displays an object image on the second image when the end position of the third drag input is on the second image.
[0270] In some embodiments of this application, the electronic device may display the object image at a third or fourth position on the second image. The third position may be the end position of a third drag input. The fourth position may be the display position of the object image determined based on composition recommendation information of the second image, which may be determined based on image features of the second image.
[0271] It should be noted that the details regarding the third position, the fourth position, and the display of the object image on the second image can be found in the descriptions of steps 204, 2041, and 2042 above. To avoid repetition, these details will not be repeated here. Furthermore, steps 303 to 305 can be executed after steps 202, 301, or 302 above; this embodiment does not limit this.
[0272] Step 1033: When the third drag input ends, the electronic device merges the object image with the second image to obtain a third image and displays the third image.
[0273] In some embodiments of this application, the aforementioned third drag input end means that the user stops dragging the object image and the touch device leaves the screen of the electronic device.
[0274] For example, taking a touch device as a finger, when a user drags an object image onto a second image and then releases their finger, the electronic device merges the object image with the second image to obtain a third image and displays the third image.
[0275] It should be noted that the specific implementation of the electronic device fusing the object image with the second image to obtain a third image and displaying the third image can be found in the relevant description of the following embodiments.
[0276] Thus, when the object image is not displayed on the second image, the electronic device can prompt the user to drag the object image onto the second image for image fusion through the first prompt message. This method can intuitively inform the user of the operation to be performed next, without requiring the user to remember all the interaction processes, making the interaction operation simpler and easier to use.
[0277] In some embodiments of this application, the image fusion method provided in this application may further include the following step 401.
[0278] Step 401: When the object image is displayed on the second image, the electronic device displays a corner mark.
[0279] In some embodiments of this application, the aforementioned badge marker can be used to indicate that the object image and the second image can be merged. Exemplarily, the aforementioned badge marker can be an icon, symbol, or graphic, etc.
[0280] In some embodiments of this application, if the object image is displayed on the second image and the electronic device is already capable of performing image fusion, the electronic device may display a badge to indicate to the user that the object image and the second image can be fused.
[0281] In some embodiments of this application, the electronic device may display a badge at the upper left or upper right corner of the object image.
[0282] For example, as shown in Figure 7 or Figure 10, the second image 12 is displayed on the album interface a1 of the electronic device, and the object image 13 is displayed on the second image 12. The electronic device can display a corner mark 17, such as "+", in the upper right corner of the object image 13 to prompt the user that the object image 13 and the second image 12 can be image fused.
[0283] It should be noted that step 401 can be performed after steps 204, 301, 302 or 305, and this application embodiment does not limit this.
[0284] Thus, when the object image is displayed on the second image, the electronic device can use a badge to indicate to the user that the object image and the second image can be merged. This method can intuitively inform the user of the next operation, without requiring the user to remember all the interaction processes, making the interaction operation simpler and easier to use.
[0285] In some embodiments of this application, the “electronic device displaying image fusion editing interface” in steps 10311 and 10321 above can be specifically implemented through step 402 below.
[0286] Step 402: The electronic device adjusts the image size of the object image according to the reference ratio so that the ratio of the image size of the object image to the image size of the second image is equal to the reference ratio.
[0287] In some embodiments of this application, the aforementioned reference ratio may be the ratio of the image size of the object image to the image size of the second image. The image size may include the image width and the image height.
[0288] It should be noted that the above reference ratio can be set by the default setting of the electronic device or by the user according to actual needs, and this application embodiment does not limit this.
[0289] In some embodiments of this application, the aforementioned reference ratio may include the ratio of the image area of the object image to the image area of the second image. Exemplarily, the range of this reference ratio may be 10%-60%. For example, the reference ratio may be 30% or 50%.
[0290] In some embodiments of this application, the electronic device can calculate the image area of the object image and the image area of the second image based on the image size of the object image and the image size of the second image, and then calculate the ratio of the image area of the object image to the image area of the second image. Then, if the ratio of the image area of the object image to the image area of the second image is less than a reference ratio, the image size of the object image is proportionally increased so that the ratio of the adjusted image size of the object image to the image size of the second image equals the reference ratio. Alternatively, if the ratio of the image area of the object image to the image area of the second image is greater than the reference ratio, the image size of the object image is proportionally increased so that the ratio of the adjusted image size of the object image to the image size of the second image equals the reference ratio. Alternatively, if the ratio of the image area of the object image to the image area of the second image equals the reference ratio, the image size of the object image is not adjusted.
[0291] In some embodiments of this application, the aforementioned reference ratio may include the ratio of the image width of the object image to the image width of the second image, and the ratio of the image height of the object image to the image height of the second image. For example, the reference ratio may include 2:3 and 1:2; or, the reference ratio may include 1:2 and 2:3; or, the reference ratio may include 2:3 and 2:3.
[0292] In some embodiments of this application, the electronic device can calculate the ratio of the width of the object image to the width of the second image, and the ratio of the height of the object image to the height of the second image, based on the image size of the object image and the image size of the second image. Then, taking the image width as an example, if the ratio of the width of the object image to the width of the second image is less than a reference ratio, the width of the object image is increased so that the adjusted ratio equals the reference ratio. Alternatively, if the ratio of the width of the object image to the width of the second image is greater than the reference ratio, the width of the object image is increased so that the adjusted ratio equals the reference ratio. Alternatively, if the ratio of the width of the object image to the width of the second image equals the reference ratio, the width of the object image is not adjusted. Similarly, the image height is adjusted according to the above method.
[0293] In some embodiments of this application, when the size relationship between the image size of the object image and the image size of the second image satisfies any of the following conditions A, the electronic device can adjust the size of the object image according to a reference ratio.
[0294] In some embodiments of this application, condition A may include: the image height of the object image is greater than the image height of the second image; the image width of the object image is greater than the image width of the second image; and the image height of the object image is greater than the image height of the second image, and the image width of the object image is greater than the image width of the second image.
[0295] In some embodiments of this application, when the image height of the object image is less than or equal to the image height of the second image and the image width of the object image is greater than the image width of the second image, the reference ratio is a first ratio, that is, the ratio of the image width of the second image to the image width of the object image.
[0296] In some embodiments of this application, when the image width of the object image is less than or equal to the image width of the second image and the image height of the object image is greater than the image height of the second image, the reference ratio is a second ratio, that is, the ratio of the image height of the second image to the image height of the object image.
[0297] In some embodiments of this application, when the image height of the object image is greater than the image height of the second image and the image width of the object image is greater than the image width of the second image, the reference ratio can be the smaller ratio between the first ratio and the second ratio.
[0298] In some embodiments of this application, when the first ratio is less than the second ratio, the reference ratio can be the ratio of the image width of the second image to the image width of the object image. When the first ratio is greater than the second ratio, the reference ratio can be the ratio of the image height of the second image to the image height of the object image. When the first ratio is less than the second ratio, either the first ratio or the second wallpaper can be used as the reference ratio.
[0299] For example, assuming the target image has a width of 200 pixels and a height of 600 pixels, and the second image has a width of 4000 pixels and a height of 2000 pixels, the electronic device can determine that the width and height of the target image are both no greater than those of the second image. In this case, the target image will be displayed at its original size on the image fusion editing page. Here, the original size can be the size of the target image within the target area of the first image.
[0300] For example, assuming the object image has a width of 800 pixels and a height of 2000 pixels, and the second image has a width of 400 pixels and a height of 1000 pixels, the electronic device can determine that the height of the object image is greater than the height of the second image, and the width of the object image is greater than the width of the second image, and that the first ratio and the second ratio are the same, both being 1 / 2. The electronic device can then proportionally reduce the object image by 1 / 2, that is, proportionally scale the object image to a width of 400 pixels and a height of 1000 pixels, so that the size of the object image fits the size of the second image.
[0301] For example, assuming the object image has a width of 800 pixels and a height of 1600 pixels, and the second image has a width of 400 pixels and a height of 1500 pixels, the electronic device can determine that the height of the object image is greater than the height of the second image, the width of the object image is greater than the width of the second image, and the first ratio is 1 / 2, the second ratio is 15 / 16, and the first ratio is less than the second ratio. Then the electronic device can proportionally reduce the object image by 1 / 2, that is, proportionally scale the object image to a width of 400 pixels and a height of 800 pixels, so that the size of the object image is adapted to the size of the second image.
[0302] In some embodiments of this application, before the electronic device generates and displays the object image, the electronic device can adjust the size of the object image. If the image size of the object image is smaller than the image size of the object region image, the electronic device can restore the image size of the object image to be the same as the image size of the object region image when displaying the image fusion editing interface. Then, the electronic device can adjust the image size of the object image according to a reference ratio so that the ratio of the image size of the object image to the image size of the second image is equal to the reference ratio.
[0303] For example, as shown in FIG5A, the electronic device copies the image of the object area and reduces the size of the image of the object area to obtain object image 13, and then displays object image 13, which has a smaller image size. Next, as shown in FIG8, when the electronic device displays the image fusion editing interface a2, the electronic device can restore the size of object image 13 to be the same as the size of the image of the object area, and then increase the image size of object image to make object image more coordinated with the second image.
[0304] Thus, when displaying the object image and the second image in the image fusion editing interface, the image size of the object image is appropriately increased if it is too small, and appropriately decreased if it is too large, so that the size of the object image is adapted to the size of the second image, thereby making the display ratio of the object image and the second image in the image fusion editing interface more coordinated.
[0305] In some embodiments of this application, after the electronic device displays the image fusion editing interface, the image fusion method provided in this application embodiment may further include the following steps 402 and 403. The above steps 10313 and 10323 can both be implemented by the following step 404. Furthermore, between the above steps 403 and 404, the electronic device may also execute the above step 10312.
[0306] Step 402: The electronic device receives adjustment inputs for the object image in the image fusion editing interface.
[0307] In some embodiments of this application, the electronic device may display a rectangular frame around an object image in the image fusion editing interface. This rectangular frame can be understood as the smallest frame that can completely enclose the object image.
[0308] In some embodiments of this application, the object image and the rectangle can be regarded as a whole. When the display position, display size and display orientation of the object image are adjusted, the display position, display size and display orientation of the rectangle will also change accordingly.
[0309] In some embodiments of this application, editing controls may be displayed on the rectangle, allowing users to adjust certain display attributes of the object image. For example, users can adjust the display position, size, and orientation of the object image using these editing controls.
[0310] In some embodiments of this application, the above-mentioned adjustment input may include at least one of the following: user input on the object image, user input on the whole consisting of the object image and the rectangle, and user input on the editing adjustment control.
[0311] In some embodiments of this application, the image fusion editing interface may also display brightness adjustment controls and transparency adjustment controls to prompt the user to adjust the brightness and transparency of the object image.
[0312] In some embodiments of this application, the aforementioned adjustment input can be user input to the brightness adjustment control or the transparency adjustment control.
[0313] In some embodiments of this application, the image fusion editing interface described above may also display a third prompt message, which can be used to prompt the user to adjust the display attributes of the object image.
[0314] For example, as shown in FIG8, the image fusion editing interface a2 of the electronic device displays an object image 13 and a second image 12, as well as an image fusion control 21 and a third prompt message 22, which is "contents within the movable, rotated, and scaled box", to prompt the user to move the position of the object image, rotate the image, or scale the size of the object image.
[0315] Step 403: In response to the adjustment input, the electronic device adjusts the display properties of the object image.
[0316] In some embodiments of this application, the above-mentioned display attributes may include at least one of the following: display position, display size, display orientation, brightness, and transparency.
[0317] It should be noted that when adjusting the display position, size, and orientation of an object image on an electronic device, the object image and its border can be treated as a whole, and the display position, size, and orientation of that whole can be adjusted.
[0318] In some embodiments of this application, the aforementioned adjustment input is a fourth drag input on the object image. The electronic device receives the fourth drag input from the user on the image fusion interface and, in response to the fourth drag input, adjusts the display position of the object image, that is, displays the object image at the end position of the fourth drag input.
[0319] For example, taking the adjustment input as the fourth drag input of the object image as an example, as shown in Figure 13, the user performs the fourth drag input on the object image 13. For example, the user drags the object image 13 from the upper right corner to the lower right corner on the image fusion interface a2. The electronic device adjusts the display position of the object image 13, that is, the object image 13 is displayed at the end position of the fourth drag input.
[0320] In some embodiments of this application, the aforementioned adjustment input is a scaling input to the editing adjustment controls, which may include a shrinking input or a zooming input. The electronic device receives scaling input from the user on the image fusion interface for the editing adjustment controls, and in response to this scaling input, scales the object image, i.e., adjusts the size of the object image.
[0321] For example, taking the adjustment input as the enlargement input of the editing adjustment control as an example, as shown in Figure 14, the user drags the editing adjustment control 231 on the rectangle 23 of the object image 13 to the outside of the border on the image fusion interface a2. The electronic device responds to the user's operation by proportionally enlarging the size of the object image 13 and then displays the enlarged object image 13.
[0322] In some embodiments of this application, the aforementioned adjustment input is a rotation input to the editing adjustment control. The electronic device receives the user's rotation input to the editing adjustment control on the image fusion interface, and in response to the rotation input, adjusts the display direction of the object image, i.e., rotates the object image.
[0323] For example, taking the adjustment input as the rotation input of the editing adjustment control as an example, as shown in Figure 15, the user rotates the editing adjustment control 231 on the rectangle of the object image 13 clockwise on the image fusion interface a2. The electronic device responds to the user's operation, adjusts the display direction of the object image 13 clockwise, and displays the object image 13 tilted to the right after adjusting the display direction.
[0324] In some embodiments of this application, the aforementioned adjustment input is a sliding input to the brightness adjustment control. The electronic device receives the user's sliding input to the brightness adjustment control on the image fusion interface, adjusts the brightness of the object image in response to the sliding input, and displays the object image after brightness adjustment.
[0325] In some embodiments of this application, the sliding input of the brightness adjustment control may include sliding up, sliding down, sliding left, or sliding right. For example, sliding up and sliding left increases the brightness of the object image, while sliding down and sliding right decreases the brightness of the object image; or, sliding up and sliding left decreases the brightness of the object image, while sliding down and sliding right increases the brightness of the object image; or, sliding up and sliding right increases the brightness of the object image, while sliding down and sliding left decreases the brightness of the object image; or, sliding up and sliding right decreases the brightness of the object image, while sliding down and sliding left increases the brightness of the object image.
[0326] For example, consider a sliding input to a brightness adjustment control, where the sliding input is downward, and downward sliding reduces the brightness. When a user slides the brightness adjustment control downward in the image fusion editing interface, the electronic device responds to this sliding input by reducing the brightness of the object image and displays the object image with reduced brightness.
[0327] In some embodiments of this application, the aforementioned adjustment input is a sliding input to the transparency adjustment control. The electronic device receives the user's sliding input to the transparency adjustment control on the image fusion interface, adjusts the transparency of the object image in response to the sliding input, and displays the object image after the transparency adjustment.
[0328] In some embodiments of this application, the sliding input of the transparency adjustment control may include sliding up, sliding down, sliding left, or sliding right. For example, sliding up and sliding left increases the transparency of the object image, while sliding down and sliding right decreases the transparency of the object image; or, sliding up and sliding left decreases the transparency of the object image, while sliding down and sliding right increases the transparency of the object image; or, sliding up and sliding right increases the transparency of the object image, while sliding down and sliding left decreases the transparency of the object image; or, sliding up and sliding right decreases the transparency of the object image, while sliding down and sliding left increases the transparency of the object image.
[0329] It should be noted that increasing the opacity of the object image as described above will make the object image more transparent, while decreasing the opacity of the object image as described above will make the object image less transparent.
[0330] For example, consider a sliding input to a transparency adjustment control, where the sliding input is downward, and downward sliding reduces the transparency. When a user slides the transparency adjustment control downward in the image blending and editing interface, the electronic device responds to this sliding input by reducing the transparency of the object image and displays the object image with reduced transparency.
[0331] It should be noted that steps 402 and 403 can be performed after steps 10311 or 10321, and this application embodiment does not limit this.
[0332] Step 10312: The electronic device receives a second input to the image fusion control.
[0333] Step 404: In response to the second input, the electronic device merges the object image with the second image after adjusting the display attributes to obtain a third image and displays the third image.
[0334] In some embodiments of this application, the electronic device, in response to a second input, merges the object image with the second image based on the adjusted display attributes of the object image to obtain a third image and displays the third image.
[0335] In other words, when merging the object image with the second image, the object image is merged into the second image according to the adjusted display position, display size, display orientation, etc., to obtain the third image, and the third image is then displayed.
[0336] For example, taking a click input as the second input, as shown in Figure 16, after the electronic device adjusts the display properties of the object image 13, the user clicks the image fusion control 21 of the image fusion editing interface a2. In response to the click input, the electronic device performs image fusion with the object image after adjusting the display properties and the second image.
[0337] It should be noted that the specific implementation of the electronic device performing image fusion with the second image after adjusting the display attributes to obtain a third image and displaying the third image can be found in the relevant description of the following embodiments.
[0338] For example, taking a click input as the second input, as shown in Figure 13, after the user adjusts the display position of the object image 13, the user clicks the image fusion control 21 of the image fusion editing interface a2. The electronic device responds to the click input and performs image fusion with the object image after the display position is adjusted and the second image.
[0339] For example, taking the second input as a click input, as shown in Figure 14, after the user enlarges the display size of the object image 13, the user clicks the image fusion control 21 of the image fusion editing interface a2. The electronic device responds to the click input and performs image fusion with the object image after the display size has been enlarged.
[0340] For example, taking a click input as the second input, as shown in Figure 15, after the user adjusts the display direction of the object image 13, the user clicks the image fusion control 21 of the image fusion editing interface a2. The electronic device responds to the click input and performs image fusion with the object image after adjusting the display direction and the second image.
[0341] In this way, before the electronic device performs image fusion on the object image and the second image, it can display an image fusion editing interface so that the user can adjust the display attributes of the object image in the image fusion editing interface. This ensures that the positional relationship, size relationship, etc. of the object image and the second image meet the user's needs during image fusion, thereby making the final fused third image meet the user's expectations and improving the user experience.
[0342] In some embodiments of this application, the “electronic device displaying image fusion editing interface” in steps 10311 and 10321 above can be specifically implemented through step 405 below.
[0343] Step 405: When the second drag input ends, the electronic device displays the image fusion editing interface and the nine-grid reference lines.
[0344] In some embodiments of this application, the aforementioned nine-grid reference lines can be used to assist users in adjusting the display position of object images.
[0345] In some embodiments of this application, when the second drag input ends, the electronic device can display a nine-grid reference line on the image fusion editing interface so that the user can adjust the display position of the object image according to the nine-grid reference line.
[0346] In some embodiments of this application, when the second drag input ends, the electronic device can display an image fusion editing interface. Then, when the user adjusts the position of the object image in the image fusion editing interface, the electronic device displays a nine-grid reference line on the image fusion editing interface so that the user can adjust the display position of the object image according to the nine-grid reference line.
[0347] For example, as shown in Figure 13, when the user drags the object image 13 on the image fusion editing interface a2 to adjust the display position of the object image 13, the electronic device can display the nine-grid reference lines 24 on the image fusion editing interface a2.
[0348] Thus, displaying the nine-grid reference lines on the image fusion editing interface can help users adjust the position of the object image, making it easier to compose the image. This not only improves adjustment efficiency but also allows the final image fusion result to have a better composition, thus enhancing the overall image fusion effect.
[0349] In some embodiments of this application, before "displaying the third image" in step 103 above, the image fusion method provided in this application may further include the following step 501.
[0350] Step 501: The electronic device inputs the object image and the second image into the image fusion model. The image fusion model fuses the object image and the second image based on at least one of the first image information of the object image and the second image information of the second image to obtain a third image and displays the third image.
[0351] In some embodiments of this application, the image fusion model described above possesses AIGC capabilities, enabling image fusion or image synthesis through artificial intelligence technology. This image fusion model can be a large model obtained by training a deep learning model with a large number of training samples.
[0352] In some embodiments of this application, the first image information may include information for characterizing image features of the object image, or the first image information may include information for characterizing the display position of the object image in the second image, or the first image information may include information for characterizing image features of the object image and information for the display position of the object image in the second image.
[0353] For example, the first image information may include at least one of the following: object contour feature information of the object image, position information of the object image in the second image, and object features of the object in the object image.
[0354] Among them, the object contour feature information of the object image can be used to indicate the contour shape of the object in the object image. The object features of the object image can include the object's skin color, clothing type, clothing color, action, posture, etc.
[0355] In some embodiments of this application, the second image information described above may include information used to characterize image features of the second image.
[0356] For example, the second image information may include at least one of the following: lighting information of the second image, depth information of each object in the second image, background object features of the second image, image content features of the second image, and image size of the second image.
[0357] The lighting information may include the location of the light source, the intensity of the light, the direction of the light, the color of the light, and the hue. The background object features can be used to indicate background objects in the second image, which may include a wide range of floating objects in the image, such as snowflakes, raindrops, fallen leaves, fallen flowers, willow catkins, pieces of paper, and water splashes.
[0358] In some embodiments of this application, an electronic device can adjust the visual attributes of an object image, such as shadows, hues, and brightness, based on the image features of the second image, such as depth information, illumination direction, and color temperature, as well as the image content features, image position, and image size of the second image, thereby generating a third image that is physically consistent with the second image.
[0359] Thus, by using an image fusion model to combine at least one of the first and second image information to fuse the object image and the second image, a more harmonious third image can be obtained, reducing the feeling of pasting and bringing a more natural and realistic image fusion effect.
[0360] In some embodiments of this application, the aforementioned first image information may include object contour feature information and position information. The object contour feature information is the contour feature information of the object in the object image, and the position information is the position information of the object image in the second image. The aforementioned second image information may include illumination information. The "image fusion model, based on at least one of the first image information of the object image and the second image information of the second image, fuses the object image with the second image to obtain a third image" in step 501 above can be specifically implemented through the following steps 5011 to 5013.
[0361] Step 5011: The electronic device adjusts the brightness of the object image based on the illumination information using an image fusion model.
[0362] In some embodiments of this application, the above-mentioned lighting information may include the position of the light source, the light intensity, the light direction, the color of the light, and the hue.
[0363] In some embodiments of this application, the image fusion model can determine the hue, color temperature, and illumination intensity of the second image based on the overall color and brightness of the second image. Furthermore, the image fusion model can determine the position and direction of the light source in the second image based on existing shadows and the brightness distribution of the second image. Then, based on the illumination information of the second image, the image fusion model simulates the highlight portion of the object image under the illumination of the light source in the second image and increases the brightness of the highlight portion.
[0364] For example, if the brightness of the object image is lower than that of the second image (i.e., the object image is generally darker and the second image is generally brighter), when the object image and the second image are merged, the overall brightness of the object image will increase, meaning the object image will be brighter overall. Furthermore, the brightness of the highlights of the object image under the illumination of the second image will be higher, meaning the highlights of the object image under the illumination of the second image will be brighter.
[0365] Step 5012: The electronic device generates a shadow image of the object in the object image based on the illumination information, object contour feature information and position information through the image fusion model, and determines the third position.
[0366] In some embodiments of this application, the third position is the position to be displayed in the second image, and the shadow image is the image of the shadow cast by the object under the illumination of a light source in the second image.
[0367] In some embodiments of this application, the image fusion model can determine the position and shadow image of the shadow cast by the object in the object image under the illumination of the light source in the second image, based on the illumination information of the second image and the object contour feature information of the object in the object image. Furthermore, the higher the position of the light source in the second image, the shorter the generated shadow image; conversely, the lower the position of the light source in the second image, the taller the generated shadow image.
[0368] For example, assuming the object in the image is a puppy, the electronic device can generate a shadow image of the puppy based on the puppy's body shape, shape, and other contour features, combined with the lighting information in the second image. Assuming the light source in the second image is side-lighting, the electronic device can generate a shadow image of the puppy in a side-lighting scene.
[0369] Step 5013: The electronic device adds a shadow image to the third position using an image fusion model.
[0370] In some embodiments of this application, the electronic device adds a shadow image at a third position of the second image, and then performs image fusion between the second image with the added shadow image and the object image to obtain a third image. This third image includes not only the object image, but also the shadow image of the object image generated by the object under the illumination of the light source of the second image.
[0371] For example, Figure 17 is a schematic diagram of displaying a first image in a photo album interface according to some embodiments of this application. The photo album interface a1 displays a first image 11, in which the object is a person. Figure 18 is a schematic diagram of displaying a second image in a photo album interface according to some embodiments of this application. The second image 12 is an image of a coconut tree by the sea, including the coconut tree and its shadow. Then, the electronic device extracts the person from the first image 11 to obtain a portrait, i.e., the object image. Next, as shown in Figure 19A, the electronic device displays the portrait 13 and the image 12 of the coconut tree by the sea on the image fusion editing interface a2. Then, after the user clicks the image fusion control 21, the electronic device inputs the portrait and the image of the coconut tree by the sea into the image fusion model. The image fusion model adjusts the brightness of the portrait to generate a shadow image of the person under the light source of the image of the coconut tree by the sea, and also merges the shadow image into the image during the image fusion process of the portrait and the image of the coconut tree by the sea to obtain a third image. Figure 19B is a schematic diagram of the third image displayed in the image fusion interface according to some embodiments of this application. The third image is a fusion of the image of a person and the image of a coconut tree by the sea. The third image includes not only the image of the person, the coconut tree by the sea and the shadow of the coconut tree by the sea, but also the shadow image of the shadow cast by the person under the light source of the image of the coconut tree by the sea.
[0372] In this way, the image fusion model can improve the lighting effect of the final fused third image by extracting the lighting information of the second image and adjusting the brightness of the object image based on the lighting information, thereby generating the shadow image of the object image under the illumination of the light source of the second image, making the third image more realistic and natural.
[0373] In some embodiments of this application, the second image information of the second image may include depth information of each object in the second image, and the first image information of the object image includes position information of the object image in the second image. The "image fusion model fuses the object image with the second image based on at least one of the first image information of the object image and the second image information of the second image to obtain a third image" in step 501 can be specifically implemented through the following steps 5014 to 5016.
[0374] Step 5014: The electronic device determines the depth information of the object in the second image based on the position information of the object image in the second image using an image fusion model.
[0375] In some embodiments of this application, the image fusion model determines the original object at the location indicated by the location information of the object image in the second image based on the location information of the object image in the second image, and determines the depth information of the original object in the second image as the depth information of the object in the object image in the second image.
[0376] For example, suppose the second image is a landscape photo, and the landscape photo includes a foreground meadow, a midground path, and a background mountain. If the object image is on the path in the second image, then the depth information of the path in the landscape photo can be determined as the depth information of the object in the object image in the landscape photo.
[0377] Step 5015: The electronic device uses an image fusion model to determine the occlusion relationship between the objects in the object image and each object in the second image based on the depth information of each object in the second image and the depth information of the objects in the object image in the second image.
[0378] In some embodiments of this application, among all objects located at the same image position in the second image, objects with smaller depth of field occlude objects with larger depth of field.
[0379] In some embodiments of this application, the image fusion model can determine the depth information of each object in the second image based on the sharpness of each object in the second image and the distance between the camera and each object in the second image at the time of shooting.
[0380] In some embodiments of this application, the image fusion model can determine the display area of the object image in the second image based on the position information of the object image in the second image and the image size of the object image. Then, based on the depth information of each object in the display area of the second image and the depth information of the objects in the object image in the second image, the image fusion model sorts all objects in the display area of the second image and the objects in the object image in ascending order of depth information. According to the sorting result, the objects ranked higher occlude the objects ranked lower.
[0381] For example, suppose the second image has many flowers and plants in the foreground and many trees in the background, and the object image is a human portrait. The image fusion model determines the depth information of the human portrait in the second image based on its position, and then determines the human portrait's location between the foreground and background based on the depth information. That is, the distance from the camera in the display scene from near to far is "flowers and plants", "human portrait", and "trees". Then the occlusion relationship between flowers and plants, trees and human is that flowers and plants will occlude the human portrait to some extent, and the human portrait will occlude the trees to some extent.
[0382] Step 5016: The electronic device uses an image fusion model to fuse the second image and the object image according to the occlusion relationship between the objects in the object image and each object in the second image, to obtain a third image.
[0383] For example, Figure 20A is a schematic diagram of displaying a first image in an album interface according to some embodiments of this application. The album interface a1 displays a first image 11, in which the object is a person. Figure 20B is a schematic diagram of displaying a second image in an album interface according to some embodiments of this application. The second image 12 is a landscape photo, including flowers, grass, and trees. Then, the electronic device extracts the person from the first image 11 to obtain a portrait, i.e., the object image. Next, as shown in Figure 20C, the electronic device displays the portrait 13 and the landscape photo 12 on the image fusion editing interface a2. Then, after the user clicks the image fusion control 21, the electronic device inputs the portrait and the landscape photo into the image fusion model. The image fusion model determines the occlusion relationship between the flowers, grass, trees, and person based on the depth information of the flowers, grass, trees, and person in the landscape photo, and combines the occlusion relationship to perform image fusion of the portrait and the landscape photo to obtain a third image. Figure 21 is a schematic diagram of the third image displayed in the image fusion interface according to some embodiments of this application. The third image 40 is an image obtained by image fusion of a portrait and a landscape photo. The third image 40 includes flowers, trees and a portrait, and the flowers partially obscure the portrait, while the portrait partially obscures the trees.
[0384] In this way, the image fusion model can simulate the occlusion relationship between objects in the object image and objects in the second image based on the original image of the second image, imitate the real depth effect, construct a real sense of spatial hierarchy, and make the final fused third image more natural and harmonious.
[0385] In some embodiments of this application, the second image information of the second image may include background object features. The "image fusion model fuses the object image with the second image based on at least one of the first image information of the object image and the second image information of the second image to obtain a third image" in step 501 above can be specifically implemented through step 5017 below.
[0386] Step 5017: The electronic device generates at least one background object image corresponding to the background object features based on the background object features using an image fusion model, and adds at least one background object image to the object image.
[0387] In some embodiments of this application, the aforementioned background object features can be used to characterize background objects in the second image. These background objects may include a wide range of objects floating in the image, such as snowflakes, raindrops, fallen leaves, fallen flowers, willow catkins, pieces of paper, and water splashes.
[0388] In some embodiments of this application, the image fusion model can first identify whether the second image includes a background object. If so, it generates at least one background object image corresponding to the background object features learned during training, and adds the at least one background object image at any position of the object image.
[0389] For example, Figure 22A is a schematic diagram of displaying a first image in a photo album interface according to some embodiments of this application. The photo album interface a1 displays a first image 11, and the object in the first image 11 is a portrait. Figure 22B is a schematic diagram of displaying a second image in a photo album interface according to some embodiments of this application. The second image 12 is an image of falling leaves, including trees and fallen leaves. Then, the electronic device extracts the person from the first image 11 to obtain a portrait, i.e., an object image. Next, as shown in Figure 22C, the electronic device displays the portrait 13 and the image of falling leaves 12 on the image fusion editing interface a2. Then, after the user clicks the image fusion control 21, the electronic device inputs the portrait and the image of falling leaves into the image fusion model. The image fusion model recognizes that the image of falling leaves includes fallen leaves, and based on the environmental feature of "fallen leaves," i.e., the background object feature of fallen leaves, it generates multiple images of fallen leaves and adds these multiple images of fallen leaves to the portrait. Then, it merges the portrait with the added images of fallen leaves with the image of falling leaves to obtain a third image. Figure 23 is a schematic diagram of a third image displayed on an image fusion interface according to some embodiments of this application. The third image 40 is an image obtained by image fusion of a human figure and an image of falling leaves, and there are also fallen leaves on the person in the third image 40.
[0390] For example, assuming the second image is a snow scene and the object image is a human portrait, the image fusion model can extract the environmental feature of "snowflakes" when fusing the object image and the second image, that is, the background object feature of snowflakes, and add some snowflakes to the human portrait in the second image.
[0391] In this way, the image fusion model can simulate the effect of a real environment by adding a background image with the background object features of a second image to the object image, making the image fusion effect more natural and vivid.
[0392] In some embodiments of this application, the first image information of the object image may include object features of the object in the object image. The "image fusion model fuses the object image with the second image based on at least one of the first image information of the object image and the second image information of the second image to obtain a third image" in step 501 can be specifically implemented through steps 5018 to 5020 below.
[0393] Step 5018: When the object in the object image is incomplete, the image fusion model generates an image of the missing part of the object in the object image based on the object features of the object in the object image.
[0394] In some embodiments of this application, the object characteristics of the aforementioned object may include object type, skin color, clothing type, clothing color, clothing style, posture, action, etc. The object type may include men, women, dogs, cats, etc.
[0395] In some embodiments of this application, the image fusion model can first identify whether the object in the object image is complete. If not, it can then determine whether the scene of the second image needs to complete the object in the object image. If so, it can generate an image of the missing part of the object in the object image based on the object features of the object in the object image and the image of the object corresponding to the object features learned during training.
[0396] It should be noted that when the object in the image is a living organism, the image fusion model must generate an image of the missing portion that conforms to the proportions of that organism. For example, if the object image is an upper-body portrait, the image fusion model must generate a lower-body portrait that conforms to human body proportions, with legs that are neither too long nor too short.
[0397] In some embodiments of this application, taking an object image as an upper-body portrait of a person holding a basketball and a second image as a photograph of a basketball court as an example, in reality, a full-body portrait is more suitable for a basketball court photograph. Therefore, an image fusion model is needed to complete the lower-body portrait to obtain a complete image. Assuming the person in the object image is wearing a white short-sleeved shirt and black pants, holding a basketball, the image fusion model can generate legs wearing black pants and feet wearing white sneakers for the person in the object image. Furthermore, if the person in the object image is running while holding a basketball, the legs wearing black pants and feet wearing white sneakers generated by the image fusion model for the person in the object image will also be in a running posture.
[0398] Step 5019: The electronic device synthesizes the missing part of the image and the object image through an image fusion model to generate a complete image of the object.
[0399] In some embodiments of this application, taking the upper half of a portrait as an example, the missing part of the image is the lower half of the portrait. The electronic device synthesizes the lower half and the upper half of the portrait using an image fusion model to generate a complete portrait.
[0400] Step 5020: The electronic device fuses the complete image of the object and the second image using an image fusion model to obtain a third image.
[0401] For example, Figure 24 is a schematic diagram of displaying a first image in an album interface according to some embodiments of this application. The album interface a1 displays a first image 11, in which the object is a person. The electronic device can extract the person from the first image 11 to obtain an upper-body portrait, i.e., the object image. Figure 25 is a schematic diagram of displaying a second image in an album interface according to some embodiments of this application. The second image is a landscape photo. Figure 26 is a schematic diagram of displaying an object image and a second image in an image fusion editing interface according to some embodiments of this application. The object image is an upper-body portrait, and the second image is a landscape photo. Then, after the user clicks the image fusion control 21, the electronic device inputs the portrait and the landscape photo into the image fusion model. The image fusion model generates a lower-body portrait based on the upper-body portrait, and synthesizes the upper-body portrait and the lower-body portrait to obtain a complete portrait. The complete portrait and the landscape photo are then fused to obtain a third image. Figure 27 is a schematic diagram of the third image displayed in the image fusion interface according to some embodiments of this application. The third image 40 is an image obtained by image fusion of an upper body portrait and a landscape photo. The third image 40 includes a complete portrait in which the person is standing with one hand on their hip.
[0402] Thus, the image fusion model can complete incomplete object images based on the object features of objects in the object image. Furthermore, during the completion process, it ensures that the complete object image conforms to the object features of the objects in the object image, resulting in a harmonious and natural-looking complete object image. Additionally, using the method of this embodiment, even if the object image extracted from the first image is incomplete, it can be completed during the fusion of the object image and the second image, resulting in a third image that more closely reflects the actual situation.
[0403] It should be noted that the various image fusion processes described in the above method embodiments are all illustrated using fusion in a single scene as an example. In actual implementation, fusion in different scenes can be superimposed to achieve the image fusion process. For example, fusion in a single scene can be the scene described in steps 5011 to 5013 above, or the scene described in steps 5018 to 5020 above, etc.
[0404] For example, the fusion of different scenes can be achieved by fusing the generated shadow images together during the image fusion process, and by combining the occlusion relationship between the objects in the object image and the objects in the second image during the fusion process.
[0405] In some embodiments of this application, the image fusion method provided in this application may further include the following step 601.
[0406] Step 601: During the fusion process of the object image and the second image, the electronic device plays a second motion effect on the object image.
[0407] In some embodiments of this application, the second motion effect includes at least one of the following: high-brightness motion effect, flowing light motion effect, color motion effect, breathing motion effect, and rotation motion effect.
[0408] It should be noted that the relevant content regarding high-brightness animation effects, flowing light animation effects, and breathing animation effects can be found in the relevant description of step 1021 above. To avoid repetition, it will not be repeated here.
[0409] In some embodiments of this application, color animation refers to the effect of visual change achieved by dynamically changing the color attributes of an image or video. Specifically, a color map table or dynamically adjusting RGB values can be used, combined with timeline animation to achieve color gradient or pulse effects. The color attributes can include hue, saturation, brightness, etc.
[0410] In some embodiments of this application, rotation effects refer to the visual effect of an element rotating around a central point or any axis. Specifically, complex rotation effects can be achieved using CSS's transform:rotate() property or JavaScript animation libraries, combined with 3D transformations such as rotateX and rotateY.
[0411] For example, for color animation effects, contour coloring is used, that is, filling the contour area with a specific color, or applying a color map and implementing color gradient or pulse effects within the contour area to achieve a color gradient effect, and changing the contour color through timeline animation to form a gradient or flashing effect.
[0412] For example, for rotation animation effects, the outline is rotated, that is, the outline lines are rotated periodically around the center of the outline. This can be achieved using the CSS `transform:rotate()` property for 2D rotation, a 3D graphics library for 3D rotation, or an image processing library to perform an affine transformation on the outline to simulate rotation.
[0413] In some embodiments of this application, the electronic device may play a third motion effect on the outline of an object in an object image.
[0414] For example, taking a portrait as the object image and a landscape photo as the second image, during the process of merging the portrait and the landscape photo, the electronic device increases the brightness of the outline of the person in the portrait in order to highlight the outline of the person.
[0415] In some embodiments of this application, the electronic device may play a third motion effect on the object area of the object image.
[0416] For example, taking a portrait as the object image and a landscape as the second image, during the fusion of the portrait and the landscape, the electronic device can increase the brightness or saturation of the pixel values of the area where the person is located in the portrait, and overlay a layer of gradient colors on the area where the person is located in the portrait.
[0417] In some embodiments of this application, the electronic device may play a third motion effect on the outline of an object in an object image and on the object region in the object image.
[0418] For example, taking a portrait as the object image and a landscape as the second image, during the fusion of the portrait and the landscape, the electronic device increases the brightness and color of the outline of the person in the portrait to highlight the outline of the person, and overlays a semi-transparent gradient layer on the outline to simulate the flow of light. It can also increase the brightness or saturation of the pixel values of the area where the person is in the portrait, and overlay a gradient color layer on the area where the person is in the portrait to achieve a dynamic effect of colored light.
[0419] In some embodiments of this application, the second motion effect may further include a colored light dynamic rotation motion effect. This colored light dynamic rotation motion effect is a semi-transparent layer with added color onto the object image and in a rotating state.
[0420] For example, taking a portrait as the object image and a seascape as the second image, during the fusion of the portrait and the seascape, the electronic device increases the brightness or saturation of the pixels in the portrait, raises the brightness of the outline of the person in the portrait, and overlays a semi-transparent gradient layer on the outline to simulate the flow of light. It can also periodically enlarge or shrink the outline and adjust the transparency of the outline to enhance the sense of breathing. Furthermore, it can overlay a colored and rotating semi-transparent layer on the portrait to achieve the effect of dynamic rotation of colored light.
[0421] Therefore, since the process of fusing the object image and the second image to obtain the third image takes a certain amount of time, the electronic device plays a second animation effect around or on the cut-out subject during the image fusion process, and connects a futuristic ripple and halo effect when the algorithm is completed, according to the algorithm's progress. This not only alleviates the user's waiting anxiety while the electronic device generates the third image, but also increases the technological feel of the image fusion process, making the transition from displaying the image before fusion to displaying the image after fusion smoother, and improving the smoothness of the displayed image after fusion.
[0422] In some embodiments of this application, the "electronic device displays a third image" in step 103 above can be specifically implemented through steps 602 and 603 below.
[0423] Step 602: The electronic device plays a third animation on the object image and the second image.
[0424] In some embodiments of this application, the third motion effect includes at least one of the following: dynamic blur motion effect, image shrinkage motion effect, color light dynamic rotation motion effect, color light overflow motion effect, transition ripple motion effect, and transition halo motion effect.
[0425] In some embodiments of this application, the aforementioned dynamic blur effect can be a layer with a blur effect superimposed on an image. The blur effect of this layer is constantly changing, and the blur effect at different locations within the layer can be different. For example, the blur effect of the layer with the blur effect gradually weakens from the center outwards.
[0426] In some embodiments of this application, the above-mentioned image shrinking animation is to shrink the object image and the second image toward the center of the screen of the electronic device.
[0427] In some embodiments of this application, the above-mentioned dynamic rotation effect of colored light is a semi-transparent layer with color added to the object image and the second image and in a rotating state.
[0428] In some embodiments of this application, the aforementioned color light overflow animation is that the color light diffuses outward from the center of the overall screen of the object image and the second image displayed by the electronic device until it overflows the entire screen, simulating the scattering phenomenon of a light source.
[0429] In some embodiments of this application, the aforementioned connecting ripple motion effect is a motion effect that simulates the diffusion of water waves based on concentric circles or wavy lines. Furthermore, the connecting ripple motion effect can use gradient transparency or monochrome highlights to create a sense of layering, and superimpose weak highlights or shadows to increase the sense of three-dimensionality.
[0430] For example, the motion of the connecting ripple effect can be to spread outward from the center point, and the speed can be linear or accelerated, such as a buffer effect of "slow → fast → slow". The motion rhythm of the ripple is that a single ripple usually lasts for 0.5-1.5 seconds, and can be cyclical or disappear after being triggered.
[0431] In some embodiments of this application, the aforementioned halo effect is a motion effect in which blurred light spots radiate outward from the luminous core, with the edges gradually fading. The color of this halo effect can be a warm or cool tone, contrasting with the colors of the object image and the second image. Furthermore, this halo effect is superimposed with a soft light effect, which can simulate lens flare or light scattering.
[0432] For example, the motion of the connecting halo effect is to slowly diffuse outward from the center or rotate around the main body. The rhythm of the halo is that each halo lasts for 1-3 seconds, and it can be cycled or synchronized with the main body's movement.
[0433] For example, taking the above scenario 1 as an example, during the process of merging portrait and landscape photos, the electronic device can play a dynamic blur effect on the overall screen of the portrait and landscape photos. During the playback of the dynamic blur effect, the portrait and landscape photos are shrunk towards the center. Then, a colored light overflow effect is played on the overall screen of the portrait and landscape photos. When the colored light covers the entire screen, the transition ripple effect and transition halo effect are played.
[0434] Step 603: During the playback of the third animation effect, when the controlled object image and the second image disappear synchronously with the playback of the third animation effect, the electronic device controls the third image to be displayed synchronously with the playback of the third animation effect.
[0435] For example, taking scenario 1 above, during the fusion of a portrait and a landscape photo, the electronic device can play a motion blur effect on the overall image of the portrait and landscape photo. While the motion blur effect is playing, the portrait and landscape photo are shrunk towards the center. Then, a colored light overflow effect is played on the overall image of the portrait and landscape photo. When the colored light covers the entire screen, a transition ripple effect and a transition halo effect begin to play. Then, during the playback of the transition ripple effect, as the transition ripple spreads, the electronic device controls the disappearance of the object image and the second image, and controls the display of the third image.
[0436] Thus, after the image fusion is complete, adding animation effects to the display of the third image can enrich the display effect of the third image and improve the user experience.
[0437] In some embodiments of this application, step 602 can be specifically implemented by step 6021 described below.
[0438] Step 6021: The electronic device sequentially plays dynamic blur effect, image shrinkage effect, color light dynamic rotation effect, color light overflow effect, transition ripple effect and transition halo effect on the object image and the second image.
[0439] For example, the electronic device first plays a motion blur effect on the object image and the second image, then plays an image shrinking effect, and during the playback of the image shrinking effect, it plays a color light dynamic rotation effect. Then, during the playback of the color light dynamic rotation effect, it plays a color light overflow effect, that is, the color light overflows outward until it covers the entire screen. Next, it plays a transition ripple effect and a transition halo effect on the object image and the second image. Then, during the playback of the transition ripple effect, as the transition ripple spreads, the electronic device controls the object image and the second image to disappear, and controls the display of the third image.
[0440] In some embodiments of this application, step 602 can be implemented by steps 6022 to 6025, and step 603 can be implemented by step 6031.
[0441] Step 6022: The electronic device plays a dynamic blur effect on the object image and the second image.
[0442] Step 6023: The electronic device shrinks the object image and the second image with the object image as the center, and plays a colored light overflow animation on the object image and the second image.
[0443] Step 6024: When the colored light overflow animation completely covers the object image and the second image, the electronic device stops playing the dynamic blur animation and plays the transition ripple animation and transition halo animation on the object image and the second image, with the transition halo being the first color.
[0444] Step 6025: During the playback of the transition ripple effect and the transition halo effect, the electronic device controls the diffusion of the transition ripple and the transition halo, and controls the transition halo to change from the first color to the second color.
[0445] Step 6031: During the process of controlling the diffusion of the connecting ripples, the electronic device controls the third image to be displayed synchronously with the diffusion of the connecting ripples, while the object image and the second image disappear synchronously with the diffusion of the connecting ripples.
[0446] For example, consider a portrait as the first image and a landscape as the second. When the image fusion model completes the fusion of the portrait and landscape to obtain a third image, the electronic device can add an entrance animation effect for the third image, i.e., the third animation effect. The following is a description of the entrance animation effect for the third image: 1) The electronic device adds a dynamic blur effect to the overall image of the portrait and landscape; 2) The electronic device shrinks around the portrait on the overall image and plays a colored light overflow effect, with the colored light brightening and overflowing until it covers the entire image; 3) When the colored light covers the entire image, the dynamic blur effect disappears, and the electronic device plays a transition ripple on the overall image, along with a transition halo, which is white; 4) The electronic device controls the transition ripple and transition halo to diffuse simultaneously, and the transition halo changes from white to colored; 5) During the playback of the transition ripple, the portrait and landscape in the overall image disappear synchronously as the transition ripple diffuses, and the third image appears synchronously as the transition ripple diffuses. This completes the entrance animation effect for the third image.
[0447] Thus, after the image fusion is complete, electronic devices can add entrance animations to the third image, which can enrich the display effect of the third image and improve the user experience.
[0448] In some embodiments of this application, when the image fusion progress of the object image and the second image reaches 100%, that is, when the image fusion is completed, the electronic device can display an image fusion interface and display a third image on the image fusion interface.
[0449] In some embodiments of this application, the image fusion interface described above may display a third image, as well as a fourth prompt message, a save control, a restore control, and a third cancel control.
[0450] In some embodiments of this application, the aforementioned fourth prompt message can be used to notify the user that image fusion has been completed. Alternatively, the aforementioned fourth prompt message can be used to notify the user that image fusion has been completed and to inform the user that they can re-fuse the image by triggering the recovery control to enter the image fusion editing interface.
[0451] In some embodiments of this application, the electronic device can receive a fifth input from the user to the save control, and in response to the fifth input, the electronic device can store a third image. Exemplarily, the electronic device can store the third image in the default path of a photo album application, or it can store it in a photo album folder selected by the user.
[0452] In some embodiments of this application, the electronic device can receive a sixth input from the user to the restore control. In response to this sixth input, the electronic device can display an image fusion editing interface, which includes an object image and a second image, with the object image displayed on top of the second image. The display attributes of the object image are the display attributes last adjusted by the user before image fusion. In other words, in response to the sixth input, the electronic device restores the displayed screen to the state before image fusion.
[0453] In some embodiments of this application, the electronic device can receive a seventh input from the user to the third cancel control. In response to this seventh input, the electronic device can exit the image fusion interface and display an album interface showing the second image. In other words, in response to the seventh input, the electronic device returns to the album interface displaying the second image, and the object image in the album interface disappears.
[0454] For example, Figure 28 is a schematic diagram of an image fusion interface provided in an embodiment of this application. Taking the fifth, sixth, and seventh inputs as click outputs as an example, as shown in Figure 28, the image fusion interface a3 includes a third image 40, a fourth prompt message 31, a restore control 32, a save control 33, and a third cancel control 34. The fourth prompt message 31 reads, "Fusion is complete. Click 'Restore' to restore the effect before fusion. You can re-fusion." After the user clicks the restore control 32, the electronic device can redisplay the image fusion editing interface a2, as shown in Figure 16. After the user clicks the save control 33, the electronic device can save the third image 40. After the user clicks the third cancel control 34, the electronic device can redisplay the album interface a1, which displays the second image 12, but does not display the object image 13.
[0455] In some embodiments of this application, the image fusion editing interface may further include a first cancel control; the image fusion method provided in the embodiments of this application may further include the following steps 701 and 702.
[0456] Step 701: During the fusion of the object image and the second image, the electronic device maintains the image fusion control and the first cancellation control in a disabled editing state, and displays the second prompt message and the second cancellation control.
[0457] In some embodiments of this application, the aforementioned second prompt information can be used to indicate the progress of image fusion between the object image and the second image. For example, the second prompt information can be text information, such as "Image fusion progress...20%" or "Image fusion in progress...25%" or "Intelligent generation in progress...20%", etc.
[0458] It should be noted that the content of this second prompt message can be dynamically updated in real time according to the image fusion progress of the object image and the second image. For example, the second prompt message may read "Image fusion in progress...1%", where 1% can be updated in real time according to the image fusion progress.
[0459] In some embodiments of this application, the first cancellation control described above can be used to cancel image editing, and the second cancellation control described above can be used to cancel image fusion.
[0460] For example, Figure 29 shows a schematic diagram of an image fusion editing interface. As shown in Figure 29, the image fusion editing interface a2 includes an object image 13 and a second image 12, as well as an image fusion control 21, a first cancellation control 24, a second prompt message 25, and a second cancellation control 26. The object image is playing a second animation effect, the second prompt message 25 reads "Image fusion in progress...25%", the image fusion control 21 and the first cancellation control 24 are grayed out, indicating they are unusable, and the second cancellation control 26 is in an editable state.
[0461] Step 702: If the image fusion progress has not reached 100% and a fourth input to the second cancel control is received, the electronic device cancels the image fusion of the object image and the second image, hides the second prompt message and the second cancel control, and updates the image fusion control and the first cancel control to the editable state.
[0462] In some embodiments of this application, "image fusion progress not reaching 100%" means that the object image and the second image have not yet been fused, that is, the third image has not yet been generated.
[0463] In some embodiments of this application, the fourth input can be a touch input, short press input, long press input, click input, single click input, or double click input, etc., of the second cancel control.
[0464] In some embodiments of this application, when the image fusion progress has not reached 100%, the user can make a fourth input to the second cancellation control, and the electronic device hides the second prompt information and the second cancellation control. This can be understood as the electronic device canceling the display of the second prompt information and the second cancellation control.
[0465] For example, as shown in Figure 29, taking the fourth input as a click input, after the user clicks the second cancel control 26 on the image fusion interface a2, the electronic device can cancel the image fusion of the object image and the second image, hide the second prompt message 25 and the second cancel control 26, and update the image fusion control 21 and the first cancel control 24 to the editable state, as shown in Figure 16.
[0466] Thus, during the image fusion process of using the image fusion model to fuse the object image and the second image, the user is informed of the image fusion progress through a second prompt message and a second cancel control is displayed. This allows the electronic device to exit the image fusion process and readjust the object image in the image fusion editing interface, without the user having to wait until the fusion is complete to make modifications. This improves the freedom and flexibility of image fusion.
[0467] It should be noted that some embodiments of this application illustrate the image fusion method by merging one object image into a second image. Based on the image fusion method provided in the embodiments of this application, electronic devices can expand the scope of image fusion from two images to more images, for example, by selecting and long-pressing multiple object images for image fusion. Furthermore, prompt descriptions, such as "make the weather a little brighter," can be added during the image fusion process via AIGC, making the image fusion effect closer to the user's actual needs. Users can also optimize and adjust the image fusion effect through these prompts.
[0468] It should be noted that each of the above method embodiments, or various possible implementations of each method embodiment, can be executed individually or in combination of any two or more. The specific implementation can be determined according to actual usage requirements, and this application embodiment does not impose any restrictions on this.
[0469] The image fusion method provided in this application can be executed by an image fusion device. This application uses an image fusion device executing the image fusion method as an example to illustrate the image fusion device provided in this application.
[0470] Figure 30 is a schematic diagram of the structure of the image fusion device provided in the embodiment of this application. The image fusion device 800 includes a receiving module 801 and a display module 802.
[0471] The receiving module 801 receives a first input to an object area in a first image of the album interface; the object area is the image area of the object selected by the first input; the display module 802 is used to display an object image in response to the receiving module 801 receiving the first input, the object image being an image copy obtained by copying the image of the object area; the display module 802 is also used to display a third image when the object image is displayed on a second image, the third image being obtained by image fusion of the object image and the second image.
[0472] In some possible embodiments, the first input mentioned above includes a first sub-input and a second sub-input; the display module 802 is specifically used for:
[0473] In response to the first sub-input to the aforementioned object region, a first motion effect is played on the outline of the object in that object region;
[0474] In response to a second sub-input of the image of the aforementioned object region, the image of the object region is copied to obtain an object image, and the object image is displayed.
[0475] The first animation effect mentioned above includes at least one of the following: high-brightness animation effect, flowing light animation effect, and breathing animation effect.
[0476] In some possible embodiments, the device 800 further includes: a processing module;
[0477] The receiving module 801 is further configured to receive a first drag input, which is used to drag an object image onto an image marker of a second image; the display module 802 is further configured to display the second image in response to the first drag input received by the receiving module 801; the receiving module 801 is further configured to receive a second drag input, which is used to drag an object image onto the second image; the display module 802 is further configured to display an object image on the second image in response to the second drag input received by the receiving module 801; the processing module is configured to perform image fusion between the object image and the second image when the second drag input ends, to obtain a third image; the display module 802 is specifically configured to display the third image obtained by the processing module.
[0478] In some possible embodiments, the display module 802 described above is specifically used for:
[0479] The object image is displayed at a first position on the second image; wherein the first position is the end position of the second drag input.
[0480] Alternatively, the object image may be displayed at a second position on the second image; wherein the second position is the display position of the object image determined based on the composition recommendation information of the second image, and the composition recommendation information is determined based on the image features of the second image.
[0481] In some possible embodiments, the display module 802 described above is specifically used for:
[0482] If the duration of the object image on the image identifier of the second image is greater than or equal to the duration threshold, the second image is displayed in response to the first drag input.
[0483] In some possible embodiments, the device 800 further includes: a processing module;
[0484] The display module 802 is further configured to display an image fusion editing interface when the second drag input ends. The image fusion editing interface includes an object image, a second image, and an image fusion control, and the object image is displayed on the second image. The receiving module 801 is further configured to receive a second input to the image fusion control. The processing module is configured to perform image fusion of the object image and the second image in response to the second input received by the receiving module 801 to obtain a third image. The display module 802 is specifically configured to display the third image obtained by the processing module.
[0485] In some possible embodiments, the device 800 further includes: a processing module;
[0486] The receiving module 801 is further configured to receive a switching input for the first image, and in response to the switching input, switch the first image to the second image; or, receive a selection input for the image identifier of the second image, and in response to the selection input, display the second image; the processing module is configured to, when the first input ends and the object image is displayed on the second image, perform image fusion between the object image and the second image to obtain a third image; the display module 802 is specifically configured to display the third image obtained by the processing module.
[0487] In some possible embodiments, the device 800 further includes: a processing module;
[0488] The display module 802 is further configured to display an image fusion editing interface when the first input ends. The image fusion editing interface includes an object image, a second image, and an image fusion control, and the object image is displayed on the second image. The receiving module 801 is further configured to receive a second input to the image fusion control. The processing module is configured to perform image fusion of the object image and the second image in response to the second input received by the receiving module 801 to obtain a third image. The display module 802 is specifically configured to display the third image obtained by the processing module.
[0489] In some possible embodiments, the device 800 further includes: a processing module;
[0490] The display module 802 is further configured to display a first prompt message when the object image is not displayed on the second image, the first prompt message being used to prompt the object image to be dragged onto the second image for image fusion; the receiving module 801 is further configured to receive a third drag input, the third drag input being used to drag the object image onto the second image; the display module 802 is further configured to display the object image on the second image in response to the third drag input received by the receiving module 801; the processing module is configured to perform image fusion between the object image and the second image when the third drag input ends, to obtain a third image; the display module 802 is specifically configured to display the third image.
[0491] In some possible embodiments, the display module 802 is further configured to display a badge when the object image is displayed on the second image, the badge indicating that the object image and the second image can be merged.
[0492] In some possible embodiments, the display module 802 described above is specifically used for:
[0493] Adjust the image size of the object image according to the reference ratio so that the ratio of the image size of the object image to the image size of the second image is equal to the aforementioned reference ratio.
[0494] In some possible embodiments, the above-described device 800 further includes a processing module;
[0495] The receiving module 801 is further configured to receive adjustment inputs to the object image in the image fusion editing interface; the processing module is configured to adjust the display attributes of the object image in response to the adjustment inputs received by the receiving module 801, wherein the display attributes include at least one of the following: display position, display size, display orientation, brightness, and transparency; the processing module is further configured to perform image fusion with the object image after adjusting the display attributes and the second image in response to the second inputs received by the receiving module 801 to obtain a third image; the display module 802 is specifically configured to display the third image obtained by the processing module.
[0496] In some possible embodiments, the display module 802 is specifically used to display an image fusion editing interface and a nine-grid reference line, which is used to assist the user in adjusting the display position of the object image.
[0497] In some possible embodiments, the above-described device 800 further includes a processing module;
[0498] The aforementioned processing module is used to input the object image and the second image into an image fusion model before displaying the third image. The image fusion model fuses the object image and the second image based on at least one of the first image information of the object image and the second image information of the second image to obtain the third image.
[0499] In some possible embodiments, the first image information includes object contour feature information and position information; the object contour feature information is the contour feature information of an object in the object image; the position information is the position information of the object image in the second image; the second image information includes illumination information; the image fusion model, based on at least one of the first image information of the object image and the second image information of the second image, fuses the object image with the second image to obtain a third image, including:
[0500] Based on the above lighting information, the image fusion model adjusts the brightness of the object image;
[0501] Based on the above-mentioned illumination information, object contour feature information, and position information, the image fusion model generates a shadow image of the object in the object image and determines a third position, which is the position to be displayed in the second image; wherein, the shadow image is the image of the shadow of the object under the illumination of the light source in the second image.
[0502] The image fusion model adds the aforementioned shadow image at the third position.
[0503] In some possible embodiments, the second image information includes depth information for each object in the second image, and the first image information includes position information of the object image in the second image; the image fusion model fuses the object image with the second image based on at least one of the first image information of the object image and the second image information of the second image to obtain a third image, including:
[0504] The image fusion model determines the depth information of an object in a second image based on the object image's position information in the second image.
[0505] The image fusion model determines the occlusion relationship between the object in the object image and each object in the second image based on the depth information of each object in the second image and the depth information of the object in the object image in the second image.
[0506] The image fusion model performs image fusion between the second image and the object image according to the occlusion relationship between the objects in the object image and each object in the second image, to obtain the third image;
[0507] Among all objects located at the same image position in the second image, objects with smaller depth of field occlude objects with larger depth of field.
[0508] In some possible embodiments, the second image information includes background object features; the image fusion model fuses the object image with the second image based on at least one of the first image information of the object image and the second image information of the second image to obtain a third image, including:
[0509] Based on the aforementioned background object features, the image fusion model generates at least one background object image corresponding to the background object features of the "Sprinkling Flower Girl" book, and adds the aforementioned at least one background object image to the object image.
[0510] In some possible embodiments, the first image information includes object features of an object in the object image; the image fusion model, based on at least one of the first image information of the object image and the second image information of the second image, fuses the object image with the second image to obtain a third image, including:
[0511] When an object in an object image is incomplete, the image fusion model generates an image of the missing part of the object based on the object features in the object image.
[0512] The image fusion model synthesizes the missing images and the object image to generate a complete image of the object.
[0513] The image fusion model fuses the complete image and the second image of the above objects to obtain a third image.
[0514] In some possible embodiments, the display module 802 is further configured to play a second motion effect on the object image during the fusion of the object image and the second image; wherein the second motion effect includes at least one of the following: a highlight motion effect, a flowing light motion effect, a color motion effect, a breathing motion effect, and a rotation motion effect.
[0515] In some possible embodiments, the display module 802 is specifically used to play a third motion effect on the object image and the second image; during the playback of the third motion effect, while controlling the object image and the second image to disappear synchronously with the playback of the third motion effect, the third image is controlled to be displayed synchronously with the playback of the third motion effect.
[0516] In some possible embodiments, the third motion effect described above includes at least one of the following:
[0517] Dynamic blur effect, image shrinkage effect, dynamic rotation effect of colored light, color light overflow effect, transition ripple effect, transition halo effect.
[0518] In some possible embodiments, the display module 802 described above is specifically used for:
[0519] On the object image and the second image, play the following motion effects in sequence: dynamic blur effect, image shrinkage effect, color light dynamic rotation effect, color light overflow effect, transition ripple effect, and transition halo effect.
[0520] In some possible embodiments, the display module 802 described above is specifically used for:
[0521] Play a dynamic blur effect on the object image and the second image;
[0522] Centered on the object image, shrink the object image and the second image, and play a colored light overflow animation on the object image and the second image;
[0523] When the aforementioned colored light overflow animation completely covers the object image and the second image, stop playing the aforementioned dynamic blur animation. Instead, play the transition ripple animation and the transition halo animation on the object image and the second image. The transition halo is the first color.
[0524] During the playback of the transition ripple and transition halo effects, control the diffusion of the transition ripples and transition halos, and control the transition halo to change from the first color to the second color;
[0525] During the process of controlling the diffusion of the connecting ripples, while the object image and the second image disappear synchronously as the connecting ripples diffuse, the third image is controlled to be displayed synchronously as the connecting ripples diffuse.
[0526] In some possible embodiments, the image fusion editing interface described above also includes a first cancel control; the display module 802 is further configured to maintain the image fusion control and the first cancel control in a prohibited editing state during the fusion of the object image and the second image, and to display a second prompt message and the second cancel control, wherein the second prompt message is used to indicate the progress of the image fusion of the object image and the second image.
[0527] The aforementioned processing module is also used to cancel the image fusion of the object image and the second image when the image fusion progress has not reached 100% and a fourth input to the second cancel control is received, hide the second prompt message and the second cancel control, and update the image fusion control and the cancel control to the editable state.
[0528] The image fusion apparatus provided in this application embodiment receives a first input to an object region in a first image of an album interface; the object region is the image region of the object selected by the first input; in response to the first input, an object image is displayed, which is an image copy obtained by copying the image of the object region; if the object image is displayed on a second image, a third image is displayed, which is obtained by fusion of the object image and the second image. Through this solution, after receiving a first input to an object region in a first image of an album interface, the object image in the first image can be obtained directly by copying the image of the object region; and if the object image is displayed on a second image, the object image and the second image can be directly fused. The entire process eliminates the need for tedious manual image editing by the user, achieving rapid image fusion. This not only shortens the image fusion time but also improves the efficiency of image fusion.
[0529] The image fusion device in this application embodiment can be an electronic device or a component within an electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal or other devices besides a terminal. For example, the electronic device can be a mobile phone, tablet computer, laptop computer, PDA, in-vehicle electronic device, mobile internet device, augmented reality / virtual reality device, robot, wearable device, super mobile personal computer, netbook, or personal digital assistant, etc. It can also be a server, network attached storage (NAS), personal computer (PC), television set (TV), ATM, or self-service machine, etc. This application embodiment does not specifically limit the specific devices.
[0530] The image fusion device in this application embodiment can be a device with an operating system. This operating system can be Android, iOS, or other possible operating systems; this application embodiment does not specifically limit the specific operating system used.
[0531] The image fusion apparatus provided in this application can realize the various processes implemented in the various embodiments of the above-described image fusion method. To avoid repetition, it will not be described again here.
[0532] Optionally, as shown in FIG31, this application embodiment also provides an electronic device 900, including a processor 901 and a memory 902. The memory 902 stores a program or instructions that can run on the processor 901. When the program or instructions are executed by the processor 901, they implement the various steps of the above-described image fusion method embodiment and can achieve the same technical effect. To avoid repetition, they will not be described again here.
[0533] It should be noted that the electronic devices in the embodiments of this application include the mobile electronic devices and non-mobile electronic devices described above.
[0534] Figure 32 is a schematic diagram of the hardware structure of an electronic device that implements an embodiment of this application.
[0535] The electronic device 1000 includes, but is not limited to, components such as: radio frequency unit 1001, network module 1002, audio output unit 1003, input unit 1004, sensor 1005, display unit 1006, user input unit 1007, interface unit 1008, memory 1009, and processor 1010.
[0536] Those skilled in the art will understand that the electronic device 1000 may also include a power supply (such as a battery) for powering various components. The power supply can be logically connected to the processor 1010 through a power management system, thereby enabling functions such as managing charging, discharging, and power consumption through the power management system. The electronic device structure shown in Figure 32 does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown, or combine certain components, or have different component arrangements, which will not be elaborated here.
[0537] The user input unit 1007 receives a first input to an object area in a first image of the album interface; the object area is the image area of the object selected by the first input; the display unit 1006 is configured to display an object image in response to the user input unit 1007 receiving the first input, the object image being an image copy obtained by copying the image of the object area; the display unit 1006 is also configured to display a third image when the object image is displayed on a second image, the third image being obtained by image fusion of the object image and the second image.
[0538] In some possible embodiments, the first input mentioned above includes a first sub-input and a second sub-input; the display unit 1006 is specifically used for:
[0539] In response to the first sub-input to the aforementioned object region, a first motion effect is played on the outline of the object in that object region;
[0540] In response to a second sub-input of the image of the aforementioned object region, the image of the object region is copied to obtain an object image, and the object image is displayed.
[0541] The first animation effect mentioned above includes at least one of the following: high-brightness animation effect, flowing light animation effect, and breathing animation effect.
[0542] In some possible embodiments, the user input unit 1007 is further configured to receive a first drag input, which is used to drag an object image onto an image identifier of a second image; the display unit 1006 is further configured to display the second image in response to the first drag input received by the user input unit 1007; the user input unit 1007 is further configured to receive a second drag input, which is used to drag an object image onto the second image; the display unit 1006 is further configured to display an object image on the second image in response to the second drag input received by the user input unit 1007; the processor 1010 is configured to perform image fusion between the object image and the second image to obtain a third image when the second drag input ends; the display unit 1006 is specifically configured to display the third image obtained by the processor 1010.
[0543] In some possible embodiments, the display unit 1006 described above is specifically used for:
[0544] The object image is displayed at a first position on the second image; wherein the first position is the end position of the second drag input.
[0545] Alternatively, the object image may be displayed at a second position on the second image; wherein the second position is the display position of the object image determined based on the composition recommendation information of the second image, and the composition recommendation information is determined based on the image features of the second image.
[0546] In some possible embodiments, the display unit 1006 described above is specifically used for:
[0547] If the duration of the object image on the image identifier of the second image is greater than or equal to the duration threshold, the second image is displayed in response to the first drag input.
[0548] In some possible embodiments, the display unit 1006 is further configured to display an image fusion editing interface when the second drag input ends. The image fusion editing interface includes an object image, a second image, and an image fusion control, and the object image is displayed on the second image. The user input unit 1007 is further configured to receive a second input to the image fusion control. The processor 1010 is configured to perform image fusion of the object image and the second image in response to the second input received by the user input unit 1007 to obtain a third image. The display unit 1006 is specifically configured to display the third image obtained by the processor 1010.
[0549] In some possible embodiments, the user input unit 1007 is further configured to receive a switching input for the first image, and in response to the switching input, switch the first image to the second image; or, receive a selection input for the image identifier of the second image, and in response to the selection input, display the second image; the processor 1010 is configured to perform image fusion between the object image and the second image to obtain a third image when the first input ends and the object image is displayed on the second image; the display unit 1006 is specifically configured to display the third image obtained by the processor 1010.
[0550] In some possible embodiments, the display unit 1006 is further configured to display an image fusion editing interface when the first input ends. The image fusion editing interface includes an object image, a second image, and an image fusion control, and the object image is displayed on the second image. The user input unit 1007 is further configured to receive a second input to the image fusion control. The processor 1010 is configured to perform image fusion of the object image and the second image in response to the second input 801 received by the receiving module to obtain a third image. The display unit 1006 is specifically configured to display the third image obtained by the processor 1010.
[0551] In some possible embodiments, the display unit 1006 is further configured to display a first prompt message when the object image is not displayed on the second image, the first prompt message being used to prompt the user to drag the object image onto the second image for image fusion; the user input unit 1007 is further configured to receive a third drag input, the third drag input being used to drag the object image onto the second image; the display unit 1006 is further configured to display the object image on the second image in response to the third drag input received by the user input unit 1007; the processor 1010 is configured to perform image fusion of the object image and the second image to obtain a third image when the third drag input ends; the display unit 1006 is specifically configured to display the third image.
[0552] In some possible embodiments, the display unit 1006 is further configured to display a badge when the object image is displayed on the second image, the badge indicating that the object image and the second image can be merged.
[0553] In some possible embodiments, the display unit 1006 described above is specifically used for:
[0554] Adjust the image size of the object image according to the reference ratio so that the ratio of the image size of the object image to the image size of the second image is equal to the aforementioned reference ratio.
[0555] In some possible embodiments, the user input unit 1007 is further configured to receive adjustment input for the object image in the image fusion editing interface; the processor 1010 is configured to adjust the display attributes of the object image in response to the adjustment input received by the user input unit 1007, the display attributes including at least one of the following: display position, display size, display orientation, brightness, and transparency; the processor 1010 is further configured to perform image fusion with the object image after adjusting the display attributes and the second image in response to the second input received by the user input unit 1007 to obtain a third image; the display unit 1006 is specifically configured to display the third image obtained by the processor 1010.
[0556] In some possible embodiments, the display unit 1006 is specifically used to display an image fusion editing interface and a nine-grid reference line, which is used to assist the user in adjusting the display position of the object image.
[0557] In some possible embodiments, the processor 1010 described above is used to input the object image and the second image into an image fusion model before displaying the third image. The image fusion model fuses the object image and the second image based on at least one of the first image information of the object image and the second image information of the second image to obtain the third image.
[0558] In some possible embodiments, the first image information includes object contour feature information and position information; the object contour feature information is the contour feature information of an object in the object image; the position information is the position information of the object image in the second image; the second image information includes illumination information; the image fusion model, based on at least one of the first image information of the object image and the second image information of the second image, fuses the object image with the second image to obtain a third image, including:
[0559] Based on the above lighting information, the image fusion model adjusts the brightness of the object image;
[0560] Based on the above-mentioned illumination information, object contour feature information, and position information, the image fusion model generates a shadow image of the object in the object image and determines a third position, which is the position to be displayed in the second image; wherein, the shadow image is the image of the shadow of the object under the illumination of the light source in the second image.
[0561] The image fusion model adds the aforementioned shadow image at the third position.
[0562] In some possible embodiments, the second image information includes depth information for each object in the second image, and the first image information includes position information of the object image in the second image; the image fusion model fuses the object image with the second image based on at least one of the first image information of the object image and the second image information of the second image to obtain a third image, including:
[0563] The image fusion model determines the depth information of an object in a second image based on the object image's position information in the second image.
[0564] The image fusion model determines the occlusion relationship between the object in the object image and each object in the second image based on the depth information of each object in the second image and the depth information of the object in the object image in the second image.
[0565] The image fusion model performs image fusion between the second image and the object image according to the occlusion relationship between the objects in the object image and each object in the second image, to obtain the third image;
[0566] Among all objects located at the same image position in the second image, objects with smaller depth of field occlude objects with larger depth of field.
[0567] In some possible embodiments, the second image information includes background object features; the image fusion model fuses the object image with the second image based on at least one of the first image information of the object image and the second image information of the second image to obtain a third image, including:
[0568] Based on the aforementioned background object features, the image fusion model generates at least one background object image corresponding to the background object features of the "Sprinkling Flower Girl" book, and adds the aforementioned at least one background object image to the object image.
[0569] In some possible embodiments, the first image information includes object features of an object in the object image; the image fusion model, based on at least one of the first image information of the object image and the second image information of the second image, fuses the object image with the second image to obtain a third image, including:
[0570] When an object in an object image is incomplete, the image fusion model generates an image of the missing part of the object based on the object features in the object image.
[0571] The image fusion model synthesizes the missing images and the object image to generate a complete image of the object.
[0572] The image fusion model fuses the complete image and the second image of the above objects to obtain a third image.
[0573] In some possible embodiments, the display unit 1006 is further configured to play a second motion effect on the object image during the fusion of the object image and the second image; wherein the second motion effect includes at least one of the following: a highlight motion effect, a flowing light motion effect, a color motion effect, a breathing motion effect, and a rotation motion effect.
[0574] In some possible embodiments, the display unit 1006 is specifically used to play a third motion effect on the object image and the second image; during the playback of the third motion effect, while controlling the object image and the second image to disappear synchronously with the playback of the third motion effect, the third image is controlled to be displayed synchronously with the playback of the third motion effect.
[0575] In some possible embodiments, the third motion effect described above includes at least one of the following:
[0576] Dynamic blur effect, image shrinkage effect, dynamic rotation effect of colored light, color light overflow effect, transition ripple effect, transition halo effect.
[0577] In some possible embodiments, the display unit 1006 described above is specifically used for:
[0578] On the object image and the second image, play the following motion effects in sequence: dynamic blur effect, image shrinkage effect, color light dynamic rotation effect, color light overflow effect, transition ripple effect, and transition halo effect.
[0579] In some possible embodiments, the display unit 1006 described above is specifically used for:
[0580] Play a dynamic blur effect on the object image and the second image;
[0581] Centered on the object image, shrink the object image and the second image, and play a colored light overflow animation on the object image and the second image;
[0582] When the aforementioned colored light overflow animation completely covers the object image and the second image, stop playing the aforementioned dynamic blur animation. Instead, play the transition ripple animation and the transition halo animation on the object image and the second image. The transition halo is the first color.
[0583] During the playback of the transition ripple and transition halo effects, control the diffusion of the transition ripples and transition halos, and control the transition halo to change from the first color to the second color;
[0584] During the process of controlling the diffusion of the connecting ripples, while the object image and the second image disappear as the connecting ripples diffuse, the third image is controlled to display as the connecting ripples diffuse.
[0585] In some possible embodiments, the image fusion editing interface described above also includes a second cancel control; the display unit 1006 is also used to control the image fusion control and the second cancel control to be in an uneditable state during the process of fusion of the object image and the second image.
[0586] In some possible embodiments, the image fusion editing interface described above also includes a first cancel control; the display unit 1006 is further configured to maintain the image fusion control and the first cancel control in a prohibited editing state during the fusion of the object image and the second image, and to display a second prompt message and the second cancel control, wherein the second prompt message is used to indicate the progress of the image fusion of the object image and the second image.
[0587] The processor 1010 is specifically used to cancel the image fusion of the object image and the second image when the image fusion progress has not reached 100% and a fourth input to the second cancellation control is received, hide the second prompt message and the second cancellation control, and update the image fusion control and the cancellation control to the editable state.
[0588] The electronic device provided in this application embodiment receives a first input to an object area in a first image of an album interface; the object area is the image area of the object selected by the first input; in response to the first input, an object image is displayed, which is an image copy obtained by copying the image of the object area; if the object image is displayed on a second image, a third image is displayed, which is obtained by image fusion of the object image and the second image. Through this solution, after receiving a first input to an object area in a first image of an album interface, the object image in the first image can be obtained directly by copying the image of the object area; and if the object image is displayed on a second image, the object image and the second image can be directly image fused. The entire process eliminates the need for tedious manual image editing by the user, achieving rapid image fusion. This not only shortens the image fusion time but also improves the efficiency of image fusion.
[0589] It should be understood that, in this embodiment, the input unit 1004 may include a graphics processing unit (GPU) 10041 and a microphone 10042. The GPU 10041 processes image data of still images or videos obtained by an image capture device (such as a camera) in video capture mode or image capture mode. The display unit 1006 may include a display panel 10061, which may be configured in the form of a liquid crystal display, an organic light-emitting diode, or the like. The user input unit 1007 includes a touch panel 10071 and at least one of other input devices 10072. The touch panel 10071 is also called a touch screen. The touch panel 10071 may include a touch detection device and a touch controller. Other input devices 10072 may include, but are not limited to, physical keyboards, function keys (such as volume control buttons, power buttons, etc.), trackballs, mice, and joysticks, which will not be described in detail here.
[0590] The memory 1009 can be used to store software programs and various data. The memory 1009 may primarily include a first storage area for storing programs or instructions and a second storage area for storing data. The first storage area may store the operating system, application programs or instructions required for at least one function (such as sound playback, image playback, etc.). Furthermore, the memory 1009 may include volatile memory or non-volatile memory, or both. The non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct memory bus RAM (DRRAM). The memory 109 in the embodiments of this application includes, but is not limited to, these and any other suitable types of memory.
[0591] The processor 1010 may include one or more processing units; optionally, the processor 1010 integrates an application processor and a modem processor, wherein the application processor mainly handles operations involving the operating system, user interface, and applications, and the modem processor mainly handles wireless communication signals, such as a baseband processor. It is understood that the aforementioned modem processor may also not be integrated into the processor 1010.
[0592] This application also provides a readable storage medium storing a program or instructions. When the program or instructions are executed by a processor, they implement the various processes of the above-described image fusion method embodiments and achieve the same technical effect. To avoid repetition, they will not be described again here.
[0593] The processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.
[0594] This application embodiment also provides a chip, which includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is used to run programs or instructions to implement the various processes of the above-described image fusion method embodiments and can achieve the same technical effect. To avoid repetition, it will not be described again here.
[0595] It should be understood that the chip mentioned in the embodiments of this application may also be referred to as a system-on-a-chip, system chip, chip system, or system-on-a-chip, etc.
[0596] This application provides a computer program product, which is stored in a storage medium and executed by at least one processor to implement the various processes of the image fusion method embodiments described above, and can achieve the same technical effect. To avoid repetition, it will not be described again here.
[0597] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.
[0598] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a computer software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0599] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.
Claims
1. An image fusion method, the method comprising: Receive the first input to the object region in the first image of the album interface; The object region is the image region of the object selected by the first input; In response to the first input, an object image is displayed, the object image being an image copy obtained by replicating the image of the object region; When the object image is displayed on the second image, a third image is displayed, which is obtained by image fusion of the object image and the second image.
2. The method of claim 1, wherein, The first input includes a first sub-input and a second sub-input; The step of displaying an object image in response to the first input includes: In response to the first sub-input to the object region, a first motion effect is played on the outline of the object in the object region; In response to the second sub-input to the image of the object region, the image of the object region is copied to obtain the object image, and the object image is displayed; The first animation effect includes at least one of the following: a bright animation effect, a flowing light animation effect, and a breathing animation effect.
3. The method of claim 1, wherein, In the case where the object image is displayed on the second image, before displaying the third image, the method further includes: Receive a first drag input, the first drag input being used to drag the object image onto the image identifier of the second image; In response to the first drag input, the second image is displayed; Receive a second drag input, the second drag input being used to drag the object image onto the second image; In response to the second drag input, the object image is displayed on the second image; When the object image is displayed on the second image, displaying the third image includes: When the second drag input ends, the object image is merged with the second image to obtain a third image, and the third image is displayed.
4. The method of claim 3, wherein, Displaying the object image on the second image includes: The object image is displayed at a first position on the second image; wherein the first position is the end position of the second drag input; Alternatively, the object image may be displayed at a second position on the second image; wherein the second position is the display position of the object image determined based on the composition recommendation information of the second image, the composition recommendation information being determined based on the image features of the second image.
5. The method of claim 3, wherein, The response to the first drag input, displaying the second image, includes: If the duration of the object image on the image identifier of the second image is greater than or equal to a duration threshold, the second image is displayed in response to the first drag input.
6. The method of claim 3, wherein, The step of fusing the object image with the second image to obtain a third image and displaying the third image after the second drag input ends includes: When the second drag input ends, the image fusion editing interface is displayed. The image fusion editing interface includes the object image, the second image, and the image fusion control, and the object image is displayed on the second image. Receive a second input to the image fusion control; In response to the second input, the object image is fused with the second image to obtain a third image, and the third image is displayed.
7. The method according to claim 1, wherein, In the case where the object image is displayed on the second image, before displaying the third image, the method further includes: The system receives a switching input for the first image and, in response to the switching input, switches the first image to the second image; or, it receives a selection input for the image identifier of the second image and, in response to the selection input, displays the second image. When the object image is displayed on the second image, displaying the third image includes: When the first input ends and the object image is displayed on the second image, the object image and the second image are merged to obtain a third image, and the third image is displayed.
8. The method according to claim 7, wherein, When the first input ends and the object image is displayed on the second image, the method of image merging the object image with the second image to obtain a third image and displaying the third image includes: When the first input ends, an image fusion editing interface is displayed. The image fusion editing interface includes the object image, the second image, and an image fusion control, and the object image is displayed on the second image. Receive a second input to the image fusion control; In response to the second input, the object image is fused with the second image to obtain a third image, and the third image is displayed.
9. The method according to claim 7, wherein, The method further includes: If the object image is not displayed on the second image, a first prompt message is displayed, which prompts the user to drag the object image onto the second image for image fusion. Receive a third drag input, the third drag input being used to drag the object image onto the second image; In response to the third drag input, the object image is displayed on the second image; When the object image is displayed on the second image, displaying the third image includes: When the third drag input ends, the object image is merged with the second image to obtain a third image, and the third image is displayed.
10. The method according to claim 3 or 7, wherein, The method further includes: When the object image is displayed on the second image, a badge is displayed to indicate that the object image and the second image can be merged.
11. The method according to claim 6 or 8, wherein, The image fusion editing interface includes: Adjust the image size of the object image according to a reference ratio so that the ratio of the image size of the object image to the image size of the second image is equal to the reference ratio.
12. The method according to claim 6 or 8, wherein, After displaying the image fusion editing interface, the method further includes: Receive adjustment input for the object image in the image fusion editing interface; In response to the adjustment input, the display attributes of the object image are adjusted, and the display attributes include at least one of the following: display position, display size, display orientation, brightness, and transparency; The step of responding to the second input by performing image fusion between the object image and the second image to obtain a third image and displaying the third image includes: In response to the second input, the object image with adjusted display attributes is merged with the second image to obtain a third image, and the third image is displayed.
13. The method according to claim 6 or 8, wherein, The image fusion editing interface includes: The display shows an image fusion editing interface and a nine-grid reference line, which is used to help users adjust the display position of the object image.
14. The method according to claim 1, wherein, Before displaying the third image, the method further includes: The object image and the second image are input into the image fusion model. The image fusion model fuses the object image and the second image based on at least one of the first image information of the object image and the second image information of the second image to obtain a third image.
15. The method according to claim 14, wherein, The first image information includes object contour feature information and position information; the object contour feature information is the contour feature information of the object in the object image; the position information is the position information of the object image in the second image; the second image information includes illumination information; The image fusion model fuses the object image with the second image based on at least one of the first image information of the object image and the second image information of the second image to obtain a third image, including: The image fusion model adjusts the brightness of the object image based on the illumination information; The image fusion model generates a shadow image of the object in the object image based on the illumination information, the object contour feature information, and the position information, and determines a third position, which is the position to be displayed of the shadow image in the second image; wherein, the shadow image is the image of the shadow cast by the object under the illumination of the light source in the second image; The image fusion model adds the shadow image at the third position.
16. The method of claim 14, wherein, The second image information includes depth information for each object in the second image, and the first image information includes the position information of the object image in the second image; The image fusion model fuses the object image with the second image based on at least one of the first image information of the object image and the second image information of the second image to obtain a third image, including: The image fusion model determines the depth information of the object in the object image in the second image based on the position information of the object image in the second image; The image fusion model determines the occlusion relationship between the objects in the object image and each object in the second image based on the depth information of each object in the second image and the depth information of the objects in the object image in the second image. The image fusion model performs image fusion between the second image and the object image according to the occlusion relationship between the objects in the object image and each object in the second image, to obtain a third image; Among all objects located at the same image position in the second image, objects with smaller depth of field occlude objects with larger depth of field.
17. The method of claim 14, wherein, The second image information includes background object features; The image fusion model fuses the object image with the second image based on at least one of the first image information of the object image and the second image information of the second image to obtain a third image, including: The image fusion model generates at least one background object image corresponding to the background object features based on the background object features, and adds the at least one background object image to the object image.
18. The method according to claim 14, wherein, The first image information includes the object features of the object in the object image; The image fusion model fuses the object image with the second image based on at least one of the first image information of the object image and the second image information of the second image to obtain a third image, including: When the objects in the object image are incomplete, the image fusion model generates an image of the missing parts of the objects in the object image based on the object features of the objects in the object image. The image fusion model synthesizes the image of the missing part and the image of the object to generate a complete image of the object; The image fusion model fuses the complete image of the object and the second image to obtain a third image.
19. The method according to claim 1, wherein, The method further includes: During the fusion process of the object image and the second image, a second motion effect is played on the object image; The second motion effect includes at least one of the following: high-brightness motion effect, flowing light motion effect, color motion effect, breathing motion effect, and rotation motion effect.
20. The method according to claim 1, wherein, The display of the third image includes: A third motion effect is played on the object image and the second image; During the playback of the third animation effect, while controlling the object image and the second image to disappear synchronously as the third animation effect plays, the third image is controlled to be displayed synchronously as the third animation effect plays.
21. The method according to claim 20, wherein, The third motion effect includes at least one of the following: dynamic blur motion effect, image shrinkage motion effect, color light dynamic rotation motion effect, color light overflow motion effect, transition ripple motion effect, and transition halo motion effect.
22. The method according to claim 21, wherein, Playing a third motion effect on the object image and the second image includes: On the object image and the second image, dynamic blur effect, image shrinkage effect, color light dynamic rotation effect, color light overflow effect, transition ripple effect and transition halo effect are played in sequence.
23. The method according to claim 21, wherein, Playing a third motion effect on the object image and the second image includes: A dynamic blur effect is played on the object image and the second image; Centered on the object image, shrink the object image and the second image, and play a colored light overflow animation on the object image and the second image; When the colored light overflow animation completely covers the object image and the second image, stop playing the motion blur animation and play the transition ripple animation and transition halo animation on the object image and the second image, where the transition halo is the first color; During the playback of the transition ripple effect and the transition halo effect, the transition ripple and the transition halo are controlled to diffuse, and the transition halo is controlled to change from a first color to a second color; During the process of controlling the diffusion of the connecting ripples, when the object image and the second image disappear synchronously as the connecting ripples diffuse, the third image is controlled to be displayed synchronously as the connecting ripples diffuse.
24. The method according to claim 1, wherein, The image fusion editing interface also includes a first cancel control; the method further includes: During the fusion process of the object image and the second image, the image fusion control and the first cancel control are kept in an edit-prohibited state, and a second prompt message and a second cancel control are displayed. The second prompt message is used to indicate the progress of the image fusion of the object image and the second image. If the image fusion progress has not reached 100% and a fourth input to the second cancel control is received, the image fusion of the object image and the second image is canceled, the second prompt message and the second cancel control are hidden, and the image fusion control and the cancel control are updated to the editable state.
25. An image fusion apparatus, the apparatus comprising: The receiving module is used to receive the first input to the object area in the first image of the album interface; The object region is the image region of the object selected by the first input; The display module is configured to, in response to the first input received by the receiving module, display an object image, wherein the object image is an image copy obtained by copying the image of the object region; and, if the object image is displayed on a second image, display a third image, wherein the third image is obtained by image fusion of the object image and the second image.
26. The apparatus according to claim 25, wherein, The first input includes a first sub-input and a second sub-input; The display module is specifically used for: In response to the first sub-input to the object region, a first motion effect is played on the outline of the object in the object region; In response to the second sub-input to the image of the object region, the image of the object region is copied to obtain the object image, and the object image is displayed; The first animation effect includes at least one of the following: a bright animation effect, a flowing light animation effect, and a breathing animation effect.
27. The apparatus according to claim 25, wherein, The device further includes: a processing module; The receiving module is further configured to receive a first drag input, the first drag input being used to drag the object image onto the image identifier of the second image; The receiving module is further configured to display the second image in response to the first drag input received by the receiving module; The receiving module is further configured to receive a second drag input, the second drag input being used to drag the object image onto the second image; The receiving module is further configured to display the object image on the second image in response to the second drag input received by the receiving module; The processing module is used to perform image fusion between the object image and the second image when the second drag input ends, to obtain a third image; The display module is specifically used to display the third image obtained by the processing module.
28. The apparatus according to claim 27, wherein, The display module is further configured to display an image fusion editing interface when the second drag input ends. The image fusion editing interface includes the object image, the second image, and an image fusion control, and the object image is displayed on the second image. The receiving module is also configured to receive a second input to the image fusion control; The processing module is specifically used to respond to the second input received by the receiving module by performing image fusion between the object image and the second image to obtain a third image; The display module is specifically used to display the third image obtained by the processing module.
29. The apparatus according to claim 25, wherein, The device further includes: a processing module; The receiving module is further configured to receive a switching input for the first image, and in response to the switching input, switch the first image to the second image; or, receive a selection input for the image identifier of the second image, and in response to the selection input, display the second image; When the object image is displayed on the second image, displaying the third image includes: The processing module is used to perform image fusion between the object image and the second image to obtain a third image when the first input ends and the object image is displayed on the second image; The display module is specifically used to display the third image obtained by the processing module.
30. The apparatus according to claim 29, wherein, The display module is further configured to display an image fusion editing interface when the first input ends. The image fusion editing interface includes the object image, the second image, and an image fusion control, and the object image is displayed on the second image. The receiving module is also configured to receive a second input to the image fusion control; The processing module is specifically used to respond to the second input received by the receiving module by performing image fusion between the object image and the second image to obtain a third image; The display module is specifically used to display the third image obtained by the processing module.
31. The apparatus according to claim 28 or 30, wherein, The display module is specifically used for: The display shows an image fusion editing interface and a nine-grid reference line, which is used to help users adjust the display position of the object image.
32. The apparatus according to claim 25, wherein, The display module is also used for: A third motion effect is played on the object image and the second image; During the playback of the third animation effect, while controlling the object image and the second image to disappear synchronously as the third animation effect plays, the third image is controlled to be displayed synchronously as the third animation effect plays.
33. The apparatus according to claim 32, wherein, The third motion effect includes at least one of the following: dynamic blur motion effect, image shrinkage motion effect, color light dynamic rotation motion effect, color light overflow motion effect, transition ripple motion effect, and transition halo motion effect.
34. The apparatus according to claim 33, wherein, The display module is specifically used for: On the object image and the second image, dynamic blur effect, image shrinkage effect, color light dynamic rotation effect, color light overflow effect, transition ripple effect and transition halo effect are played in sequence.
35. The apparatus according to claim 33, wherein, The display module is specifically used for: A dynamic blur effect is played on the object image and the second image; Centered on the object image, shrink the object image and the second image, and play a colored light overflow animation on the object image and the second image; When the colored light overflow animation completely covers the object image and the second image, stop playing the motion blur animation and play the transition ripple animation and transition halo animation on the object image and the second image, where the transition halo is the first color; During the playback of the transition ripple effect and the transition halo effect, the transition ripple and the transition halo are controlled to diffuse, and the transition halo is controlled to change from a first color to a second color; During the process of controlling the diffusion of the connecting ripples, when the object image and the second image disappear synchronously as the connecting ripples diffuse, the third image is controlled to be displayed synchronously as the connecting ripples diffuse.
36. The apparatus according to claim 25, wherein, The image fusion editing interface also includes a first cancel control; The display module is also used for: During the fusion process of the object image and the second image, the image fusion control and the first cancel control are kept in an edit-prohibited state, and a second prompt message and a second cancel control are displayed. The second prompt message is used to indicate the progress of the image fusion of the object image and the second image. If the image fusion progress has not reached 100% and a fourth input to the second cancel control is received, the image fusion of the object image and the second image is canceled, the second prompt message and the second cancel control are hidden, and the image fusion control and the cancel control are updated to the editable state.
37. An electronic device comprising a processor and a memory, the memory storing a program or instructions executable on the processor, the program or instructions, when executed by the processor, implementing the steps of the image fusion method as claimed in any one of claims 1 to 24.