Image processing method and electronic device
By adjusting the display method of prominent subjects and avoiding component processing, the problems of wallpaper image repetition and component occlusion were solved, improving user experience and composition aesthetics.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- HUAWEI TECH CO LTD
- Filing Date
- 2025-10-21
- Publication Date
- 2026-04-30
AI Technical Summary
When user-set wallpapers are displayed on electronic devices, the original camera images or web images are repetitive and monotonous, and components obscure the main subject, resulting in a poor user experience.
The display method of prominent subjects in wallpaper images is adjusted by means of shifting, scaling and cropping, and components are avoided after highlighting the prominent subjects in order to reduce the degree of obstruction of the prominent subjects by the components.
It improves the compositional aesthetics of wallpaper images and enhances the user's visual experience, highlighting prominent subjects and reducing the impact of component occlusion.
Smart Images

Figure CN2025128947_30042026_PF_FP_ABST
Abstract
Description
An image processing method and electronic device
[0001] This application claims priority to Chinese Patent Application No. 202411483630.9, filed on October 22, 2024, entitled "A Wallpaper Setting Method and Electronic Device", and to Chinese Patent Application No. 202510176598.8, filed on February 17, 2025, entitled "An Image Processing Method and Electronic Device", the entire contents of which are incorporated herein by reference. Technical Field
[0002] This application relates to the field of terminal technology, and in particular to an image processing method and an electronic device. Background Technology
[0003] With the development of technology, electronic devices have gradually become an indispensable tool in people's lives. Users can set wallpapers on their electronic devices, which can be displayed on the desktop, lock screen, Always On Display (AOD), and other user interfaces. Wallpaper display is always a prerequisite for user interaction with electronic devices, and it affects the user experience; therefore, the importance of wallpaper settings is self-evident.
[0004] Currently, users typically set raw camera images or images downloaded from the internet as wallpapers for their electronic devices. However, different types of users (e.g., users of different ages and genders) have varying needs for wallpapers. For some users, wallpapers set from raw camera images lack refinement, while wallpapers set from downloaded images tend to be repetitive and monotonous. Manually processing the images they want to use as wallpapers is too cumbersome, resulting in a poor user experience. Furthermore, the user interface displaying wallpapers usually also includes components such as clocks, app icons, and app cards. These components are typically arranged in preset layouts in fixed positions on the user interface, often obscuring the prominent subject of the wallpaper. This leads to a poor compositional aesthetic when the wallpaper and related components are combined, thus reducing the user's visual experience. Summary of the Invention
[0005] This application provides an image processing method and an electronic device. The method can be applied to a first electronic device. First, the first electronic device can acquire a first wallpaper image selected by a user. The compositional elements of the first wallpaper image include one or more objects, including a first element. The first element in the first wallpaper image is a first display mode. Next, the first electronic device can acquire a second wallpaper image based on the first wallpaper image. The first element in the second wallpaper image is a second display mode, wherein the second display mode is different from the first display mode. Then, the first electronic device can display a first interface, which includes the second wallpaper image and one or more components. The first interface is a desktop, lock screen, or AOD interface. The one or more components include a first component, which is displayed in a third display mode in the first interface. The third display mode is different from the preset display mode of the first component. By using the method provided in this application, the electronic device can highlight the prominent subject in the wallpaper image through one or more of the following methods: shifting, scaling (i.e., shrinking or enlarging), and cropping. After highlighting the prominent subject, components such as clocks, application icons, and application cards are avoided in the wallpaper image to reduce the degree of occlusion of the prominent subject.
[0006] In a first aspect, this application provides an image processing method applied to a first electronic device. The method includes: acquiring a first wallpaper image, wherein the compositional elements of the first wallpaper image include one or more objects, the one or more objects include a first element, and the first element in the first wallpaper image is a first display mode; acquiring a second wallpaper image based on the first wallpaper image, wherein the first element in the second wallpaper image is a second display mode, wherein the second display mode is different from the first display mode; and displaying a first interface, wherein the first interface includes the second wallpaper image and one or more components, wherein the first interface is a desktop, a lock screen interface, or an Always-On Display (AOD) interface, and the one or more components include a first component, wherein the first component is displayed in a third display mode in the first interface, and the third display mode is different from the preset display mode of the first component.
[0007] Wherein, the first electronic device can be the electronic device 100 shown in Figure 4; the first wallpaper image can be the wallpaper image before the electronic device 100 processes the wallpaper image; the first element can be a salient subject, the type of which can include, but is not limited to, people, animals, plants, food, buildings, and landscapes, and the salient subject can be a compositional element in one or more compositional elements of the wallpaper image whose representativeness is higher than a preset threshold; the first display mode can be the display mode of the first element before the electronic device 100 processes the wallpaper image; the second wallpaper image can be the wallpaper image after the electronic device 100 processes the wallpaper image; the second display mode can be the display mode of the first element after the electronic device 100 processes the wallpaper image; the first interface can be the user interface after setting the second wallpaper image as wallpaper, which can include, but is not limited to, an AOD interface, a lock screen interface, and a desktop; the first component can be any component in the first interface, which can include, but is not limited to, a clock component, an application icon, a folder icon, or a card component that provides different services, such as a suggestion card, an application card, or a weather card; and the third display mode can be the display mode of the first component after the electronic device 100 processes the wallpaper image.
[0008] By using the method provided in the first aspect, electronic devices can highlight prominent subjects in a wallpaper image by shifting, scaling (i.e., shrinking or enlarging), cropping, and avoid components such as clocks, app icons, and app cards in the wallpaper image after highlighting the prominent subjects, so as to reduce the degree of occlusion of the prominent subjects by the components.
[0009] In conjunction with the first aspect, in some embodiments, before acquiring the first wallpaper image, the method further includes: displaying a wallpaper settings interface; and displaying the selected first wallpaper image in the wallpaper settings interface.
[0010] In some embodiments, as shown in Figures 7A-7B, the electronic device 100 can receive an operation from a user selecting a wallpaper image from a wallpaper resource library. Exemplarily, as shown in Figure 7A, the electronic device 100 can display a wallpaper settings interface 130, which may include a selection control 131. This selection control 131 can be used to trigger access to the wallpaper resource library, which can be any application storing image resources, such as a gallery, file manager, etc. In some embodiments, the electronic device 100 can receive an operation to access the wallpaper resource library, such as a user input operation (e.g., a click) on the selection control 131. In response to this operation, the electronic device 100 can display a user interface 140 as shown in Figure 7B, which can be the user interface of a gallery application. The user interface 140 can display image resources that can be selected by the user as wallpaper images. After receiving an operation from the user selecting a first wallpaper image to be processed from the image resources, the electronic device 100 can display the selected first wallpaper image in the wallpaper settings interface.
[0011] In conjunction with the first aspect, in some embodiments, the display method of the first element includes one or more of the following: the position of the element, the size of the element, and the degree of completeness of the element.
[0012] The position of an element can refer to its location within the wallpaper image. The electronic device 100 can change the position of the first element in the wallpaper image by shifting it, thus highlighting the first element. The size of an element can refer to the size occupied by the element (also called a compositional element) within the wallpaper image; this size can be understood as the area occupied by the element. The electronic device 100 can change the size of the first element in the wallpaper image by scaling (i.e., shrinking or enlarging), thus highlighting the first element. The completeness of an element can refer to the degree of completeness of the element (also called a compositional element) displayed in the wallpaper image after the display method is changed, compared to the element (also called a compositional element) before the display method is changed. The electronic device 100 can change the completeness of the first element's display in the wallpaper image by cropping, thus highlighting certain features of the first element in the wallpaper image. These features may include, but are not limited to, facial and limb features of people or animals, morphological features of plants, and the appearance features of food / city / landscape.
[0013] In conjunction with the first aspect, in some embodiments, one or more objects further include a second element. Before acquiring the second wallpaper image based on the first wallpaper image, the method further includes: adjusting a first position of the first element in a first display mode to a second position of the first element in a second display mode based on the spacing between the first element and the second element; and / or adjusting a first size of the first element in the first display mode to a second size of the first element in the second display mode based on the spacing between the first element and the second element; and / or adjusting a first degree of completeness of the first element in the first display mode to a second degree of completeness of the first element in the second display mode based on the spacing between the first element and the second element.
[0014] Wherein, the second element can be a prominent subject in the wallpaper image, the first position can be the position of the first element in the first wallpaper image in the first display mode, the second position can be the position of the first element in the second wallpaper image in the second display mode, the first size can be the size of the first element in the first wallpaper image in the first display mode, the second size can be the size of the first element in the second wallpaper image in the second display mode, the first completeness can be the completeness of the first element in the first wallpaper image in the first display mode, and the second completeness can be the completeness of the first element in the second wallpaper image in the second display mode.
[0015] For example, the distance between two salient subjects can be characterized as compact, small-pitch, or large-pitch. If the number of salient subjects is greater than 2, the electronic device 100 can process multiple salient subjects multiple times as described above when the number of salient subjects is 2.
[0016] In conjunction with the first aspect, in some embodiments, the influencing factors for adjusting the display mode of the first element include one or more of the following: head information, face information, and skeletal point information. The method further includes: determining the position of the first element in the second display mode based on one or more of the head information, face information, and skeletal point information of the first element in the first wallpaper image; and / or determining the size of the first element in the second display mode based on one or more of the head information, face information, and skeletal point information of the first element in the first wallpaper image; and / or determining the completeness of the first element in the second display mode based on one or more of the head information, face information, and skeletal point information of the first element in the first wallpaper image.
[0017] It should be noted that the metadata of the salient subject can be used to provide feedback on how the salient subject is displayed in the wallpaper image. Before the electronic device 100 changes the display mode of the salient subject in the wallpaper image, the salient subject is in a first display mode in the first wallpaper image (i.e., the wallpaper image before the change in display mode), and this first display mode can be fed back through the metadata of the salient subject acquired by the electronic device 100. After the electronic device 100 changes the display mode of the salient subject in the wallpaper image, the salient subject is in a second display mode in the second wallpaper image (i.e., the wallpaper image after the change in display mode), and the second display mode is different from the first display mode. It can be understood that the second display mode is related to the first display mode, that is, the second display mode is related to the metadata of the salient subject acquired by the electronic device 100 in the first wallpaper image, or in other words, the factors influencing the change in the display mode of the salient subject may include, but are not limited to, the metadata of the salient subject in the first wallpaper image, which may include, but are not limited to, one or more of the following: head information, face information, and skeletal point information.
[0018] In conjunction with the first aspect, in some embodiments, the display mode of the first component includes one or more of the following: the position of the component, the brightness of the component, the color of the component, the transparency of the component, the depth relationship between the component and the first element, the degree of occlusion of the component on the first element, and the size of the component.
[0019] The component's position can refer to its location within the first interface. If the electronic device 100's layout of the component according to its preset position results in the component obscuring a prominent subject in the second wallpaper image to a degree exceeding a preset threshold (e.g., 30%), the electronic device 100 can change the component's position, altering it from the preset position, to reduce the obscuring of the prominent subject in the second wallpaper image. The component's brightness can refer to its brightness within the first interface. In some embodiments, the electronic device 100's layout according to a preset appearance (e.g., brightness) of the component may cause the component's brightness to be close to that of the second wallpaper image; for example, the brightness variance between the component and the second wallpaper image may be less than a preset threshold (e.g., 6000), making it difficult for the user to distinguish the component from the wallpaper image and affecting the user experience. In this case, the electronic device 100 can change the brightness of the component's layout, altering it from the preset brightness, to increase the distinction between the component and the second wallpaper image. The component's color can refer to its color within the first interface. In some embodiments, the electronic device 100's layout according to the preset appearance (e.g., color) of corresponding components may result in the component's color being similar to that of the second wallpaper image. For example, the color difference between the component and the second wallpaper image may be less than a preset threshold, making it difficult for the user to distinguish the component from the wallpaper image and affecting the user experience. In this case, the electronic device 100 can change the color of the corresponding component's layout, making the changed color different from the preset color to increase the distinguishability of the component from the second wallpaper image. In other embodiments, the electronic device 100's layout according to the preset appearance (e.g., color) of corresponding components may be rather uninteresting and affect the user experience. In this case, the electronic device 100 can change the color of the corresponding component's layout, making the changed color different from the preset color and the same as or similar to the main color of the prominent subject in the second wallpaper image. For example, the color difference between the changed color of the component and the main color of the prominent subject may be less than a preset threshold, so that the component's color and the main color of the prominent subject create a linkage effect, increasing the visual appeal. The transparency of the component may refer to the transparency of the component in the first interface. If the electronic device 100 arranges the components according to a preset appearance (e.g., transparency) such that the component occludes a prominent subject in the second wallpaper image to a degree exceeding a preset threshold (e.g., 30%), the electronic device 100 can change the transparency of the component's arrangement. This changed transparency can be higher than the preset transparency to reduce the occlusion of the prominent subject in the second wallpaper image. The depth relationship between the component and the prominent subject can refer to the difference between the layer containing the component and the layer containing the prominent subject in the wallpaper image.If the electronic device 100's layout according to the preset appearance (e.g., layer) of a corresponding component results in the component occluding a prominent subject in the second wallpaper image to a degree exceeding a preset threshold (e.g., 30%), the electronic device 100 can change the depth-of-field relationship between the corresponding component and the prominent subject in the second wallpaper image. This changed depth-of-field relationship can reduce the occlusion degree of the component on the prominent subject in the second wallpaper image. Here, the component size can refer to the size occupied by the component in the first interface. If the electronic device 100's layout according to the preset appearance (e.g., size) of a corresponding component results in the component occluding a prominent subject in the second wallpaper image to a degree exceeding a preset threshold (e.g., 30%), the electronic device 100 can change the size of the corresponding component's layout. This changed size differs from the preset size to reduce the occlusion degree of the component on the prominent subject in the second wallpaper image. It is understood that the aspect ratio of the component can be the same as or similar to the aspect ratio of the screen to improve the aesthetics of the composition.
[0020] In conjunction with the first aspect, in some embodiments, the third display mode includes the position of the first component, the position of the first component being determined based on the position of the first element in the second wallpaper image; and / or, the third display mode includes the brightness of the first component, the brightness of the first component being determined based on the color of the second wallpaper image; and / or, the third display mode includes the color of the first component, the color of the first component being determined based on the color of the first element; and / or, the third display mode includes the transparency of the first component, the transparency of the first component being determined based on the degree of occlusion of the first element by the first component; and / or, the third display mode includes the depth relationship between the first component and the first element, the depth relationship between the first component and the first element being determined based on the degree of occlusion of the first element by the first component.
[0021] In this way, the electronic device 100 can avoid components such as clocks, app icons, and app cards in the wallpaper image after highlighting the prominent subject, thereby reducing the degree to which the components obscure the prominent subject. For example, in the third display mode, the degree to which the components obscure the prominent subject is lower than the degree to which the components obscure the first element in the preset display mode.
[0022] In some embodiments, the electronic device 100's layout based on a preset appearance (e.g., brightness) of a component may result in the component having a similar brightness to the second wallpaper image. For example, the brightness variance between the component and the second wallpaper image may be less than a preset threshold (e.g., 6000), making it difficult for the user to distinguish the component from the wallpaper image and affecting the user experience. In this case, the electronic device 100 can adjust the component's display mode from a preset mode to a third mode based on the lightness of the second wallpaper image. In the third display mode, the component's brightness changes relative to the component's brightness in the preset display mode, thereby increasing the distinguishability between the component and the second wallpaper image.
[0023] It should be noted that after the user changes the wallpaper of the first interface to the second wallpaper image, the color of the component in the second wallpaper image is related to the color of the salient subject. In some embodiments, the electronic device 100 may arrange the components according to their preset appearance (e.g., color), which may result in the component's color being similar to that of the second wallpaper image. For example, the color difference between the component and the second wallpaper image may be less than a preset threshold, making it difficult for the user to distinguish the component from the wallpaper image and affecting the user experience. In this case, the electronic device 100 can adjust the display mode of the component from a preset display mode to a third display mode based on the main color of the first element. In the third display mode, the component's color changes relative to the component's color in the preset display mode, thereby increasing the distinguishability of the component from the second wallpaper image. In other embodiments, arranging the components according to their preset appearance (e.g., color) may be rather uninteresting and affect the user experience. In this case, the electronic device 100 can adjust the display mode of the component from a preset display mode to a third display mode based on the main color of the prominent subject. In the third display mode, the color of the component changes relative to the color of the component in the preset display mode, and is the same as or similar to the main color of the prominent subject in the second wallpaper image. For example, the color difference between the color of the component and the main color of the prominent subject in the third display mode is less than a preset threshold, so that the color of the component and the main color of the prominent subject produce a linkage effect, which improves the interest.
[0024] In some embodiments, if the electronic device 100 lays out the component according to the component's preset appearance (e.g., transparency), causing the component to occlude a prominent subject in the second wallpaper image to a degree higher than a preset threshold (e.g., 30%), the electronic device 100 may adjust the component's display mode from a preset display mode to a third display mode based on the degree of occlusion of the prominent subject. In the third display mode, the component's transparency changes relative to the component's transparency in the preset display mode, thereby reducing the degree of occlusion of the component on the prominent subject in the second wallpaper image.
[0025] In some embodiments, if the electronic device 100 lays out a component in a preset layer of a wallpaper image, causing the component to occlude a prominent subject in the wallpaper image to a degree higher than a preset threshold (e.g., 30%), the electronic device 100 may adjust the display mode of the component from a preset display mode to a third display mode based on the degree of occlusion of the component on the prominent subject. In the third display mode, the depth relationship between the component and the prominent subject changes relative to the depth relationship between the component and the prominent subject in the preset display mode. This changed depth relationship between the component and the prominent subject can reduce the degree of occlusion of the component on the prominent subject in the second wallpaper image.
[0026] In conjunction with the first aspect, in some embodiments, the degree of occlusion of the first element by the first component in the third display mode is lower than the degree of occlusion of the first element by the first component in the preset display mode.
[0027] In conjunction with the first aspect, in some embodiments, the influencing factors for adjusting the display mode of the first component include one or more of the following: head information, face information, and the method further includes: determining the position of the first component in the third display mode based on the head information and / or face information of the first element in the first wallpaper image; and / or determining the size of the first component in the third display mode based on the head information and / or face information of the first element in the first wallpaper image.
[0028] It should be noted that the way components are displayed in a wallpaper image is related to the way prominent subjects are displayed, and the way prominent subjects are displayed is related to the metadata of prominent subjects. Therefore, factors that affect the way components are displayed may include, but are not limited to, the metadata of prominent subjects, which includes, but are not limited to, one or more of the following: head information and face information.
[0029] In conjunction with the first aspect, in some embodiments, the first wallpaper image is a single-frame wallpaper image or at least one of multiple wallpaper images.
[0030] It should be noted that the type of the first wallpaper image selected by the user can include, but is not limited to, single-frame wallpaper images and multi-frame wallpaper images. Single-frame wallpaper images can include, but are not limited to, static images, while multi-frame wallpaper images can include, but are not limited to, animated images and videos. It should also be noted that different types of wallpaper images can be converted to each other. For example, a static image can be converted to an animated image or video by adding frames. Similarly, a video can be converted to an animated image or a static image by removing frames.
[0031] In a second aspect, this application provides an electronic device, which includes a processor and a memory; wherein the memory is coupled to the processor and is used to store a computer program, and when the processor executes the computer program, the electronic device performs the method described in any of the first aspects above.
[0032] Thirdly, this application provides a computer-readable storage medium storing a computer program that is executed by a processor to implement the method described in any of the first aspects above.
[0033] Fourthly, this application provides a computer program product that, when executed by a processor, implements the method described in any one of the first aspects above.
[0034] Fifthly, this application provides a chip including a processor and a memory, wherein the memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory, causing the chip to perform the method described in any of the first aspects above.
[0035] The solutions provided in the second to fifth aspects above are used to implement or cooperate with the methods provided in the first aspect above, and therefore can achieve the same or corresponding beneficial effects as the methods in the first aspect, which will not be elaborated here. Attached Figure Description
[0036] Figure 1 is a schematic diagram of a wallpaper image display scene provided in an embodiment of this application;
[0037] Figures 2A-2H are schematic diagrams illustrating wallpaper image changes based on an image processing method provided in an embodiment of this application;
[0038] Figure 3 is a schematic diagram of a scene for displaying wallpaper images based on an image processing method according to an embodiment of this application;
[0039] Figure 4 is a structural schematic diagram of an electronic device 100 provided in an embodiment of this application;
[0040] Figure 5A is a schematic diagram of a software architecture provided in an embodiment of this application;
[0041] Figure 5B is a schematic diagram of the software architecture of an image processing method provided in an embodiment of this application;
[0042] Figure 6A is a schematic flowchart of an image processing method provided in an embodiment of this application;
[0043] Figure 6B is a flowchart illustrating another image processing method provided in an embodiment of this application;
[0044] Figures 7A and 7B are a set of interface diagrams provided in the embodiments of this application;
[0045] Figures 8A and 8B are another set of interface diagrams provided in the embodiments of this application;
[0046] Figure 8C is a schematic diagram of a rule for changing the display method when the number of prominent subjects is greater than 1, provided in an embodiment of this application;
[0047] Figure 9A is a schematic diagram of the size type of a clock component provided in an embodiment of this application;
[0048] Figure 9B is a schematic diagram of the rules for the placement of components according to an embodiment of this application;
[0049] Figure 9C is a schematic diagram of a brightness change rule for a component provided in an embodiment of this application;
[0050] Figures 9D-9F are another set of interface diagrams provided in the embodiments of this application;
[0051] Figures 10A and 10B are another set of interface diagrams provided in the embodiments of this application;
[0052] Figures 11A-11D are another set of interface schematic diagrams provided in the embodiments of this application;
[0053] Figure 11E is a schematic diagram of a rule for changing the depth relationship between a component and a salient subject according to an embodiment of this application;
[0054] Figures 12A-12B are another set of interface schematic diagrams provided in the embodiments of this application;
[0055] Figure 13A is a schematic flowchart of a wallpaper setting method provided in an embodiment of this application;
[0056] Figure 13B is a schematic diagram of a method for removing impurities corresponding to different types of wallpaper images provided in an embodiment of this application;
[0057] Figures 14A-14F are schematic diagrams illustrating wallpaper image changes based on an impurity removal method provided in an embodiment of this application;
[0058] Figures 15A-15D are another set of interface diagrams provided in the embodiments of this application;
[0059] Figure 16 is a schematic diagram of the software architecture of a wallpaper setting method provided in an embodiment of this application;
[0060] Figures 17A and 17B are another set of interface diagrams provided in the embodiments of this application;
[0061] Figure 18 is a flowchart illustrating a wallpaper recommendation method provided in an embodiment of this application. Detailed Implementation
[0062] The terminology used in the embodiments of this application is for the purpose of describing particular embodiments only and is not intended to be a limitation of this application.
[0063] Figure 1 illustrates an exemplary scenario of wallpaper image display provided in an embodiment of this application.
[0064] As shown in Figure 1, the electronic device displays a lock screen interface 110, which may include a clock component 111, a wallpaper image 112, etc. The wallpaper image 112 may be an original camera image taken by the user using the electronic device or an image downloaded from the internet. Currently, the wallpaper set by the user is usually a wallpaper image that the electronic device adapts the original image to the screen's aspect ratio. Based on this, the electronic device then renders and composites the components to be laid out, such as the clock, with the wallpaper image according to preset layout rules. The composite wallpaper image can be, for example, the lock screen interface 110 shown in Figure 1. For example, the preset layout rules may include, but are not limited to, centering the clock component in the upper area of the lock screen interface 110, displaying clock information in a preset font size, and displaying the clock component with preset component colors, aspect ratios, and other related parameters.
[0065] Wallpaper image 112 may include one or more compositional elements (e.g., wallpaper image 112 includes two compositional elements: a girl and a puppy). These compositional elements contain a salient subject, the type of which may include, but is not limited to, people, animals, plants, food, buildings, and landscapes. For example, the salient subject in wallpaper image 112 is a girl. It should be noted that a salient subject can be one or more compositional elements of the wallpaper image whose representativeness exceeds a preset threshold. A wallpaper image may contain multiple salient subjects, or it may not contain any salient subjects. This embodiment does not limit the number of salient subjects in the wallpaper image. The aforementioned representativeness can be obtained by processing the wallpaper image using saliency detection algorithms, etc., which will not be elaborated here.
[0066] As shown in Figure 1, the prominent subjects in the unprocessed wallpaper image are not highlighted, resulting in a poor composition. Furthermore, because electronic devices typically use pre-defined layout rules for the components when composing user interfaces such as Always On Display (AOD), lock screens, and desktops, these components may obscure prominent subjects like people, animals, plants, food, buildings, and landscapes in the wallpaper image. This leads to a poor compositional aesthetic when the wallpaper image and its components are combined, thus diminishing the user's visual experience.
[0067] To address the aforementioned problems, this application provides an image processing method and an electronic device, applicable to a first electronic device. First, the first electronic device acquires a user-selected first wallpaper image. The compositional elements of the first wallpaper image include one or more objects, including a first element. The first element in the first wallpaper image is a first display mode. Next, the first electronic device acquires a second wallpaper image based on the first wallpaper image. The first element in the second wallpaper image is a second display mode, which differs from the first display mode. Then, the first electronic device displays a first interface, including the second wallpaper image and one or more components. The first interface is a desktop, lock screen, or AOD interface. The one or more components include a first component, which is displayed in a third display mode on the first interface. This third display mode differs from the preset display mode of the first component. By using the method provided in this application, the electronic device can highlight prominent subjects in the wallpaper image through one or more of the following methods: shifting, scaling (i.e., shrinking or enlarging), and cropping. After highlighting the prominent subjects, components such as clocks, application icons, and application cards are avoided in the wallpaper image to reduce the degree of occlusion of prominent subjects.
[0068] It should be noted that the first element can be the aforementioned salient subject. The display method of the first element can include, but is not limited to, one or more of the following: the element's position, the element's size, and the element's completeness. The element's position can refer to the location of the element (also called a compositional element) within the wallpaper image. The first electronic device can change the position of the first element in the wallpaper image by shifting it, thereby highlighting the first element in the wallpaper image. For example, as shown in Figures 2A-2B, the first element is a girl. The first electronic device can change the position of the first element in the wallpaper image by shifting it. The position of the first element after the change is more centered than its original position, and the first element is highlighted in the wallpaper image. It should be noted that the highlighted position of the first element in the wallpaper image can also be other positions within the wallpaper image, and this application embodiment does not limit this. As shown in Figure 2A, the position of the first element in the wallpaper image is far from the center of the wallpaper image. As shown in Figure 2B, the position of the first element in the wallpaper image is closer to the center of the wallpaper image than the position shown in Figure 2A. For example, the distance between the position of the first element in the wallpaper image shown in Figure 2B and the center of the wallpaper image is less than the distance between the position of the first element in the wallpaper image and the center of the wallpaper image shown in Figure 2A. Here, the size of the element refers to the size occupied by the element (also called a compositional element) in the wallpaper image; this size can be understood as the area occupied by the element. The first electronic device can change the size of the first element in the wallpaper image by scaling (i.e., shrinking or enlarging) to highlight the first element in the wallpaper image. For example, as shown in Figures 2C-2D, the first element is a girl. The first electronic device can change the size of the first element in the wallpaper image by enlarging it. The enlarged size of the first element in the wallpaper image is more suitable for the screen size of the first electronic device compared to its original size. The screen size can be measured by the screen's aspect ratio, and the first element is thus highlighted in the wallpaper image. It can be understood that the aspect ratio of the first element can be the same as or similar to the screen's aspect ratio to improve the aesthetics of the composition. As shown in Figure 2C, the fit between the size of the first element in the wallpaper image and the screen size of the first electronic device is relatively low. As shown in Figure 2D, the size of the first element in the wallpaper image is better adapted to the screen size of the first electronic device than the size of the first element in the wallpaper image shown in Figure 2C.For example, as shown in Figures 2E-2F, the first element is a girl. The first electronic device can change the size of the first element in the wallpaper image by shrinking it. The shrunk size of the first element in the wallpaper image is more suitable for the screen size of the first electronic device than its original size. The screen size can be measured by the screen's aspect ratio. The first element is then highlighted in the wallpaper image. It can be understood that the aspect ratio of the first element can be the same as or similar to the screen's aspect ratio to improve the aesthetics of the composition. As shown in Figure 2E, the fit between the size of the first element in the wallpaper image and the screen size of the first electronic device is relatively low. As shown in Figure 2F, the fit between the size of the first element in the wallpaper image and the screen size of the first electronic device is higher than that shown in Figure 2E. Here, the completeness of the element can refer to the degree to which the element (also called the composition element) is displayed in the wallpaper image after the display method is changed, compared to the element (also called the composition element) before the display method is changed. The first electronic device can alter the completeness of a first element displayed in a wallpaper image through cropping to highlight certain features of the first element. These features may include, but are not limited to, facial and limb features of a person or animal, morphological features of plants, and visual features of food / city / landscape. For example, as shown in Figures 2G-2H, the first element is a girl. The first electronic device can alter the completeness of the first element displayed in the wallpaper image through cropping. The completeness of the first element after the alteration is lower than the completeness before the alteration, and certain features of the first element (e.g., the girl's face) are highlighted in the wallpaper image. As shown in Figure 2G, the first element is displayed with a higher degree of completeness in the wallpaper image. As shown in Figure 2H, the completeness of the first element is lower than that shown in Figure 2G, and the facial features of the first element are highlighted in the wallpaper image.
[0069] As described above, the first element in the second display mode is more prominent in the wallpaper image than the first element in the first display mode; that is, the first element in the second wallpaper image is more prominent than the first element in the first wallpaper image. The first wallpaper image can be the wallpaper image before the first electronic device processes the wallpaper image, and the second wallpaper image can be the wallpaper image after the first electronic device processes the wallpaper image.
[0070] It should be noted that the display methods of the first component may include, but are not limited to, one or more of the following: the position of the component, the brightness of the component, the color of the component, the transparency of the component, the depth-of-field relationship between the component and the prominent subject, the degree of occlusion of the component to the first element, and the size of the component. Among them, the position of the component may refer to the position where the component is located in the first interface. When the first electronic device arranges components according to the preset positions of the corresponding components, and the degree of occlusion of the prominent subject in the second wallpaper image by the component is higher than the preset threshold (for example, 30%), the first electronic device may change the position where the corresponding component is arranged, and the changed position is different from the preset position, so as to reduce the degree of occlusion of the prominent subject by the component in the second wallpaper image. Among them, the brightness of the component may refer to the brightness of the component in the first interface. In some embodiments, arranging the first electronic device according to the preset appearance (such as brightness) of the corresponding component may cause the brightness of the component to be close to that of the second wallpaper image. For example, the brightness variance between the component and the second wallpaper image is less than the preset threshold (for example, 6000), resulting in the user being difficult to distinguish the component from the wallpaper image and affecting the user experience. In this case, the first electronic device may change the brightness of the corresponding component arranged, and the changed brightness is different from the preset brightness, so as to increase the distinguishability between the component and the second wallpaper image. Among them, the color of the component may refer to the color of the component in the first interface. In some embodiments, arranging the first electronic device according to the preset appearance (such as color) of the corresponding component may cause the color of the component to be close to that of the second wallpaper image. For example, the color difference between the component and the second wallpaper image is less than the preset threshold, resulting in the user being difficult to distinguish the component from the wallpaper image and affecting the user experience. In this case, the first electronic device may change the color of the corresponding component arranged, and the changed color is different from the preset color, so as to increase the distinguishability between the component and the second wallpaper image. In some other embodiments, arranging the first electronic device according to the preset appearance (such as color) of the corresponding component may be rather boring and affect the user experience. In this case, the first electronic device may change the color of the corresponding component arranged, and the changed color is different from the preset color and is the same as or similar to the main color of the prominent subject in the second wallpaper image. For example, the color difference between the changed color of the component and the main color of the prominent subject is less than the preset threshold, so as to make the color of the component produce a linkage effect with the main color of the prominent subject and improve the interest. Among them, the transparency of the component may refer to the transparency of the component in the first interface. When the first electronic device arranges components according to the preset appearance (such as transparency) of the corresponding component, and the degree of occlusion of the prominent subject in the second wallpaper image by the component is higher than the preset threshold (for example, 30%), the first electronic device may change the transparency of the corresponding component arranged, and the changed transparency may be higher than the preset transparency, so as to reduce the degree of occlusion of the prominent subject by the component in the second wallpaper image.The depth relationship between the component and the prominent subject can refer to the difference between the layer containing the component and the layer containing the prominent subject in the wallpaper image. If the layout of the first electronic device according to the preset appearance (e.g., layer) of the corresponding component results in the component occluding a prominent subject in the second wallpaper image to a degree exceeding a preset threshold (e.g., 30%), the first electronic device can change the depth relationship between the corresponding component and the prominent subject in the second wallpaper image. This changed depth relationship can reduce the occlusion degree of the component on the prominent subject in the second wallpaper image. The size of the component can refer to the size occupied by the component in the first interface. If the layout of the first electronic device according to the preset appearance (e.g., size) of the corresponding component results in the component occluding a prominent subject in the second wallpaper image to a degree exceeding a preset threshold (e.g., 30%), the first electronic device can change the size of the corresponding component in the layout. This changed size differs from the preset size to reduce the occlusion degree of the component on the prominent subject in the second wallpaper image. It is understood that the aspect ratio of the component can be the same as or similar to the aspect ratio of the screen to improve the aesthetics of the composition.
[0071] It is understood that the first interface to which the image processing method provided in this application is applicable may include, but is not limited to, an AOD interface, a lock screen interface, and a desktop. In other embodiments, the aforementioned first interface may also include other user interfaces suitable for adjusting the display mode of the salient subject (first element) and the display mode of the first component using the aforementioned image processing method, and this application does not impose any limitations on this. The first interface can be understood as the user interface after setting the second wallpaper image as wallpaper.
[0072] It is understandable that, for the lock screen, the components that the first electronic device needs to display may include, but are not limited to, a clock widget and lock screen notifications. For the desktop, the components that the first electronic device needs to display may include, but are not limited to, a clock widget, app icons, folder icons, and card components that provide different services, such as suggestion cards, app cards, and weather cards; there are no restrictions on these.
[0073] Figure 3 illustrates an example of displaying a wallpaper image based on an image processing method provided in an embodiment of this application.
[0074] As shown in Figure 3, the first electronic device displays a lock screen interface 120, which is the aforementioned first interface. The lock screen interface 120 may include a clock component 121, a wallpaper image 122, etc. The wallpaper image 112 may include one or more compositional elements (for example, the wallpaper image 122 includes two compositional elements: a girl and a puppy). These one or more compositional elements (also referred to as objects) contain a prominent subject. The type of the prominent subject may include, but is not limited to, people, animals, plants, food, buildings, and landscapes. For example, the prominent subject in the wallpaper image 122 is a girl. The wallpaper image 112 shown in Figure 1 can be the first wallpaper image. The second wallpaper image obtained after highlighting the first element (prominent subject) in the first wallpaper image can be, for example, the wallpaper image 122 shown in Figure 3. In some embodiments, the method of highlighting the first element (prominent subject) in the first wallpaper image may include one or more of the following: shifting, scaling (shrinking or enlarging), and cropping. As can be seen, compared to wallpaper image 112, the display method of the prominent subject in wallpaper image 122 has changed. For example, the position of the prominent subject in wallpaper image 122 is closer to the center of the wallpaper image, and the size of the prominent subject in wallpaper image 122 is more compatible with the screen size of the first electronic device, thus highlighting the prominent subject in wallpaper image 122. Furthermore, the highlighted prominent subject in wallpaper image 122 is not obscured by clock component 121, therefore, there is no need to perform any avoidance processing on clock component 121. Optionally, the first electronic device can change the brightness of the clock component 121 based on the lightness level of wallpaper image 122 (i.e., the contrast with pure white). This changed brightness differs from the preset brightness to increase the distinction between clock component 121 and wallpaper image 122. It should be noted that the higher the lightness level of wallpaper image 122, the lower the brightness of clock component 121 within wallpaper image 122. Optionally, the first electronic device can change the color of the clock component 121 based on the main color of the prominent subject in the wallpaper image 122. This changed color differs from a preset color but is the same as or similar to the main color of the prominent subject in the wallpaper image 122. For example, the color difference between the changed color of the clock component 121 and the main color of the girl (the prominent subject) is less than a preset threshold, so that the color of the clock component 121 interacts with the main color of the prominent subject, enhancing the visual appeal. In this way, the electronic device can highlight the prominent subject in the wallpaper image, improving the aesthetics of the composition formed by the wallpaper image and corresponding components, and enhancing the user's visual experience. After highlighting the prominent subject in the wallpaper image, the electronic device can also process components such as the clock accordingly, increasing the distinction between the components and the wallpaper image, and making the color of the components interact with the main color of the prominent subject, further enhancing the visual appeal.
[0075] The following is a detailed description of the structural schematic diagram of the electronic device 100 provided in the embodiments of this application.
[0076] Figure 4 illustrates an electronic device 100 provided in an embodiment of this application.
[0077] In this embodiment, the first electronic device may be referred to as electronic device 100. Electronic device 100 may be various types of smart terminal devices including a display screen (i.e., a screen), and this embodiment does not limit the specific type of electronic device 100. For example, electronic device 100 may be a mobile phone, or it may be a mobile tablet computer, in-vehicle tablet computer, desktop computer, laptop computer, handheld computer, smartwatch, smart TV, augmented reality (AR) device, virtual reality (VR) device, etc.
[0078] As shown in Figure 4, the electronic device 100 may include a processor 410, an external memory interface 420, an internal memory 421, a sensor module 430, a display screen 440, a camera 441, etc. The sensor module 430 may include, but is not limited to, a pressure sensor 430A and a touch sensor 430B.
[0079] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0080] Processor 410 may include one or more processing units, such as: application processor (AP), modem processor, graphics processing unit (GPU), image signal processor (ISP), controller, memory, video codec, digital signal processor (DSP), baseband processor, and / or neural network processing unit (NPU), etc. The different processing units may be independent devices or integrated into one or more processors.
[0081] The controller can be the nerve center and command center of the electronic device 100. The controller can generate operation control signals according to the instruction opcode and timing signals to complete the control of fetching and executing instructions.
[0082] The processor 410 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 410 is a cache memory. This memory can store instructions or data that the processor 410 has just used or that are used repeatedly. If the processor 410 needs to use the instruction or data again, it can retrieve it directly from the memory. This avoids repeated accesses, reduces the waiting time of the processor 410, and thus improves the efficiency of the system.
[0083] In this embodiment, the processor 410 can be used to highlight the prominent subject in the wallpaper image through one or more methods such as shifting, scaling (i.e., shrinking or enlarging), and cropping, and to perform avoidance processing on components such as clocks, application icons, and application cards in the wallpaper image after highlighting the prominent subject, so as to reduce the degree of occlusion of the prominent subject by the components. Specifically, the processor 410 can be used to acquire a first wallpaper image, the compositional elements of which include one or more objects, the one or more objects including a first element, and the first element in the first wallpaper image is a first display mode. After acquiring the first wallpaper image, the processor 410 can also be used to acquire a second wallpaper image based on the first wallpaper image, the first element in the second wallpaper image being a second display mode, wherein the second display mode is different from the first display mode. In some embodiments, the one or more objects mentioned above also include a second element, and the second element is also a prominent subject in the wallpaper image. Before acquiring the second wallpaper image based on the first wallpaper image, the processor 410 can be used to adjust the first position of the first element in the first display mode to the second position of the first element in the second display mode based on the spacing between the first element and the second element; and / or, the processor 410 can also be used to adjust the first size of the first element in the first display mode to the second size of the first element in the second display mode based on the spacing between the first element and the second element; and / or, the processor 410 can also be used to adjust the first completeness of the first element in the first display mode to the second completeness of the first element in the second display mode based on the spacing between the first element and the second element. In some other embodiments, the influencing factors for adjusting the display mode of the first element include one or more of the following: head information, face information, and skeletal point information. The processor 410 may be used to determine the position of the first element in the second display mode based on one or more of the head information, face information, and skeletal point information of the first element in the first wallpaper image; and / or, the processor 410 may also be used to determine the size of the first element in the second display mode based on one or more of the head information, face information, and skeletal point information of the first element in the first wallpaper image; and / or, the processor 410 may also be used to determine the degree of completeness of the first element in the second display mode based on one or more of the head information, face information, and skeletal point information of the first element in the first wallpaper image.In other embodiments, the third display mode may include the position of the first component, which may be determined based on the position of the first element in the second wallpaper image; and / or, the third display mode may include the brightness of the first component, which may be determined based on the color (e.g., lightness) of the second wallpaper image; and / or, the third display mode may include the color of the first component, which may be determined based on the color of the first element; and / or, the third display mode may include the transparency of the first component, which may be determined based on the degree of occlusion of the first element by the first component; and / or, the third display mode may include the depth relationship between the first component and the first element, which may be determined based on the degree of occlusion of the first element by the first component. In other embodiments, the factors influencing the adjustment of the display mode of the first component include one or more of the following: head information, face information. The processor 410 may be used to determine the position of the first component in the third display mode based on the head information and / or face information of the first element in the first wallpaper image; and / or, the processor 410 may also be used to determine the size of the first component in the third display mode based on the head information and / or face information of the first element in the first wallpaper image.
[0084] The external storage interface 420 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 410 through the external storage interface 420 to perform data storage functions. For example, music, photos, videos, and other data can be stored on the external memory card.
[0085] Internal memory 421 can be used to store one or more computer programs, which include instructions. Processor 410 can execute the instructions stored in internal memory 421, thereby causing electronic device 100 to perform the image processing methods, various functional applications, and data processing provided in some embodiments of this application. Internal memory 421 may include a program storage area and a data storage area. The program storage area may store the operating system; it may also store one or more application programs (such as a gallery, contacts, etc.). The data storage area may store data created during the use of electronic device 100 (such as photos, contacts, etc.). Furthermore, internal memory 421 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc.
[0086] Electronic device 100 can perform display functions, such as displaying wallpaper images and corresponding components on a first interface, through a GPU, display screen 440, and application processor. The GPU is a microprocessor for image processing, connected to the display screen 440 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 410 may include one or more GPUs, which execute instructions to generate or modify display information.
[0087] The display screen 440 is used to display images, videos, etc. The display screen 440 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include one or N display screens 440, where N is a positive integer greater than 1. It should be noted that a display screen can also be referred to as a screen.
[0088] In this embodiment, the electronic device 100 can display a first interface via a GPU, a display screen 440, and an application processor. The first interface includes a second wallpaper image and one or more components. The first interface can be a desktop, lock screen, or AOD (Always-On Display) interface. The one or more components include a first component, which is displayed in a third mode on the first interface. This third display mode differs from the preset display mode of the first component. In some embodiments, before acquiring the first wallpaper image, the electronic device 100 can also display a wallpaper settings interface via the GPU, display screen 440, and application processor. The electronic device 100 can also display the selected first wallpaper image in the wallpaper settings interface via the GPU, display screen 440, and application processor.
[0089] Electronic device 100 can perform shooting functions through ISP, camera 441, video codec, GPU, display 440 and application processor.
[0090] The ISP is used to process data fed back from the camera 441. For example, when taking a picture, the shutter is opened, and light is transmitted through the lens to the camera's photosensitive element. The light signal is converted into an electrical signal, and the camera's photosensitive element transmits the electrical signal to the ISP for processing, converting it into an image visible to the naked eye. The ISP can also perform algorithmic optimization of image noise, brightness, and color. The ISP can also optimize parameters such as exposure and color temperature of the shooting scene. In some embodiments, the ISP can be set in the camera 441.
[0091] Camera 441 is used to capture still images or videos. An object is projected onto a photosensitive element by generating an optical image through the lens. The photosensitive element can be a charge-coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, which is then passed to an ISP for conversion into a digital image signal. The ISP outputs the digital image signal to a DSP for processing. The DSP converts the digital image signal into image signals in standard RGB, YUV, or other formats. In some embodiments, the electronic device 100 may include one or N cameras 441, where N is a positive integer greater than 1.
[0092] Digital signal processors (DSPs) are used to process digital signals. Besides digital image signals, they can also process other digital signals. For example, when electronic device 100 selects a frequency, the DSP performs Fourier transforms on the frequency energy.
[0093] Video codecs are used to compress or decompress digital video. Electronic device 100 may support one or more video codecs. Thus, electronic device 100 can play or record videos in various encoding formats, such as Moving Picture Experts Group (MPEG)-1, MPEG-2, MPEG-3, MPEG-4, etc.
[0094] An NPU (Neural Processing Unit) is a computational processor for neural networks (NNs). By borrowing the structure of biological neural networks, such as the transmission patterns between neurons in the human brain, it can rapidly process input information and continuously learn on its own. NPUs enable intelligent cognitive applications in electronic devices, such as image recognition, facial recognition, speech recognition, and text understanding.
[0095] In this embodiment, the electronic device 100 can highlight prominent subjects in the original camera image captured by the ISP, camera 441, video codec, GPU, display screen 440 and application processor, and avoid components such as clocks, application icons, and application cards in the image after highlighting the prominent subjects, and finally display them on the display screen 440.
[0096] Pressure sensor 430A is used to sense pressure signals and convert them into electrical signals. In some embodiments, pressure sensor 430A can be disposed on display screen 440. There are many types of pressure sensors 430A, such as resistive pressure sensors, inductive pressure sensors, and capacitive pressure sensors. A capacitive pressure sensor may include at least two parallel plates with conductive material. When force is applied to pressure sensor 430A, the capacitance between the electrodes changes. Electronic device 100 determines the pressure intensity based on the change in capacitance. When a touch operation is applied to display screen 440, electronic device 100 detects the intensity of the touch operation based on pressure sensor 430A. Electronic device 100 can also calculate the touch position based on the detection signal from pressure sensor 430A. In some embodiments, touch operations applied to the same touch position but with different touch operation intensities can correspond to different operation commands. For example: when a touch operation with an intensity less than a first pressure threshold is applied to the SMS application icon, a command to view an SMS is executed. When a touch operation with an intensity greater than or equal to the first pressure threshold is applied to the SMS application icon, a command to create a new SMS is executed.
[0097] Touch sensor 430B, also known as a touch panel or touch-sensitive surface, can be located on display screen 440. The touch sensor 430B and display screen 440 together form a touchscreen, also called a "touchscreen." Touch sensor 430B is used to detect touch operations applied to or near it. The touch sensor can transmit the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through display screen 440. In other embodiments, touch sensor 430B may also be located on the surface of electronic device 100, in a different position than display screen 440.
[0098] In this embodiment, the electronic device 100 can detect operations such as the user selecting a first wallpaper image, the user manually processing the first wallpaper image, and the user setting a second wallpaper image as the wallpaper of the first interface through the pressure sensor 430A and the touch sensor 430B.
[0099] The software architecture diagrams provided in the embodiments of this application will be described in detail below.
[0100] Figure 5A illustrates an exemplary software architecture provided by an embodiment of this application.
[0101] The electronic device provided in this application embodiment can run an operating system (OS). This operating system can be various operating systems used in the industry, such as an operating system based on OpenHarmony, like HarmonyOS; or other operating systems such as Android. TM An operating system can refer to the iOS mobile operating system; it can also refer to various open-source operating systems or their derivatives, such as Linux OS, and other embedded operating systems; it can also refer to future new operating systems, such as artificial intelligence (AI) operating systems. An operating system is a set of interconnected system software programs that manage and control the operation of electronic devices, utilize and run hardware and software resources, and provide public services to organize user interactions. In electronic devices, the operating system connects downwards to the physical hardware layer and upwards to provide a runtime environment for application software.
[0102] An operating system typically includes a kernel layer, a middleware layer, and an application layer. The application layer includes applications, which can include system applications and third-party applications. The middleware layer includes a suite of software providing various services to application developers, or frameworks providing services such as databases, multimedia, and graphics, or capabilities such as distributed scheduling and system scaling. For example, the middleware layer may include a framework layer and / or a system service layer. The framework layer provides application programming interfaces (APIs) and programming frameworks for applications in the application layer. The system service layer includes the system's core capabilities, providing services to applications through the framework layer. The kernel layer is the layer between hardware and software. The kernel layer may include hardware drivers and the operating system kernel. In addition to providing hardware drivers, the kernel layer also supports functions such as memory management and system process management.
[0103] The electronic devices we use in our daily lives come in various types and forms, and are applied in a wide range of scenarios. Therefore, based on the different forms and functions of electronic devices, different application scenarios, and different user needs, the operating systems used in these devices may also differ. The basic functions implemented by the electronic device provided in this application can be implemented using a general-purpose operating system or a dedicated operating system. To more clearly illustrate the implementation of the embodiments of this application under a specific operating system, the architecture of HarmonyOS is shown below. Those skilled in the art can deduce the implementation of the embodiments of this application under other specific operating systems, such as Android. TMImplementation under operating systems, etc.
[0104] The software architecture of electronic devices can be divided into several layers. In some embodiments, from bottom to top, these layers are: kernel layer, system service layer, framework layer, and application layer. Layers communicate with each other through software interfaces. System functions can be tailored, added, or combined at the subsystem level depending on the deployment scenario of different device forms. Each subsystem can also be tailored, added, or combined at the functional level.
[0105] Kernel layer:
[0106] The Kernel Abstraction Layer (KAL) provides basic kernel capabilities to upper layers by shielding the differences between multiple kernels, including but not limited to process / thread management, memory management, file system, network management, and peripheral device management.
[0107] Kernel Subsystem: Supports the selection of a suitable OS kernel for different resource-constrained devices, including but not limited to Linux kernel, HarmonyOS kernel, LiteOS (Lite Operating System), etc.
[0108] Driver Subsystem: The driver framework is the foundation for the open system hardware ecosystem, providing unified peripheral access capabilities and a framework for driver development and management. The driver framework includes: display drivers, camera drivers, audio drivers, Bluetooth drivers, sensor drivers, etc.
[0109] System service layer:
[0110] The system service layer comprises the core capabilities of the system, providing services to applications through the framework layer. This layer includes, but is not limited to, the following subsystems:
[0111] The system's basic capability subsystem set provides fundamental capabilities for the operation, scheduling, and migration of distributed applications across multiple devices. This set may include distributed soft bus, distributed data management, distributed task scheduling, and Ark multi-language runtime; it may also include multi-modal input subsystem, graphics subsystem, security subsystem, and AI subsystem.
[0112] Basic software service subsystem set: provides public and general software services; the basic software service subsystem set may include event notification subsystem, telephone service subsystem, multimedia subsystem, etc.
[0113] Enhanced software service subsystem suite: Provides differentiated enhanced software services for different devices; the enhanced software service subsystem suite may include proprietary business subsystems for smart screens, proprietary business subsystems for wearables, proprietary business subsystems for the Internet of Things (IoT), etc.
[0114] Hardware service subsystem set: Provides hardware services; the hardware service subsystem set may include location service subsystem, user IAM (Identity and Access Management) subsystem, wearable proprietary hardware service subsystem, biometric identification, IoT proprietary hardware service subsystem, etc.
[0115] Distributed task scheduling enables distributed service management (discovery, synchronization, registration, and invocation), supporting remote startup, remote invocation, remote connection, and migration of applications across devices.
[0116] Distributed data management enables data synchronization, data storage, data sharing, and data access across all scenarios and devices.
[0117] The distributed soft bus provides communication-related capabilities for seamless interconnection between multiple devices, including: WLAN service capabilities, Bluetooth service capabilities, soft bus, inter-process communication RPC (Remote Procedure Call), and StarFlash communication capabilities.
[0118] Ark Multilingual Runtime is a unified compilation runtime platform designed to support the joint compilation and execution of multiple programming languages and multiple chip platforms.
[0119] Framework layer:
[0120] The framework layer provides application programming interfaces (APIs) and programming frameworks for applications in the application layer. The framework layer includes: the ArkUI framework (which provides a complete infrastructure for UI development of system applications, including UI functions such as components, layouts, animations, and interactive events, as well as a real-time interface preview tool), the user application framework, and the Ability framework (an Ability is a lightweight application; the Ability framework schedules and manages the operation and lifecycle of Abilities). Different devices may have different operating systems, and the APIs they support may also differ.
[0121] The HarmonyOS API is a series of open capabilities provided to support HarmonyOS application development. The HarmonyOS API can be set at the framework layer or independently of the framework layer. The HarmonyOS API includes the Audio API (audio service), Push API (push service), and Account API (account service), among others.
[0122] Application layer:
[0123] Applications can include system apps and extended / third-party apps. System apps can include the desktop, control bar, settings, contacts, phone, camera, etc., while extended / third-party apps can include social networking, travel, etc.
[0124] Figure 5B illustrates, exemplarily, the software architecture of an image processing method provided in an embodiment of this application.
[0125] As shown in Figure 5B, the application layer may include, but is not limited to, settings application, theme application, and gallery application; the framework layer may include, but is not limited to, composition engine, unified editor, and theme engine; and the system service layer may include, but is not limited to, theme management service.
[0126] The application layer may include, but is not limited to, settings applications, theme applications, and gallery applications. Settings applications may include desktop and personalization settings, which can be used to provide an interactive entry point between the electronic device 100 and the user when executing the image processing method provided in this embodiment. Theme applications may include wallpaper preview and wallpaper download. Wallpaper preview can provide a wallpaper preview function for the user to preview wallpapers provided in the theme application; wallpaper download can provide a wallpaper download function for the user to download wallpapers provided in the theme application. Gallery applications may include an image selector. The image selector can provide an image selection function for the user to select an image from the gallery as wallpaper. The application layer can be used to receive the user's selection of a first wallpaper image. After receiving the user's selection of the first wallpaper image, the application layer can send the user-selected first wallpaper image to the composition engine in the framework layer, so that the composition engine can process the first wallpaper image. For example, as shown in Figures 7A-7B, the user's selection of the first wallpaper image may be, for example, the user selecting a wallpaper image from the gallery application in the settings application or theme application. As shown in Figures 8A and 8B, the user's operation of selecting the first wallpaper image can also be, for example, the user selecting an image resource as the wallpaper image from the gallery.
[0127] The frame layer may include, but is not limited to, a composition engine, a unified editor, and a theme engine. The composition engine can receive a user-selected first wallpaper image sent by the application layer. After receiving the first wallpaper image, the composition engine can also change the display method of prominent subjects in the first wallpaper image to highlight them. After highlighting the prominent subjects in the wallpaper image, the composition engine can also send the processed parameters of a second wallpaper image to the unified editor in the frame layer, so that the unified editor can draw the second wallpaper image based on the parameters. The unified editor can receive the processed parameters of the second wallpaper image sent by the composition engine and draw the second wallpaper image based on these parameters, which can be displayed in the wallpaper preview interface. The unified editor can also perform obstacle avoidance processing on components such as clocks, application icons, and application cards in the first interface to reduce the degree to which these components obscure prominent subjects in the second wallpaper image. The unified editor can also send the drawn second wallpaper image and the corresponding components in the first interface to the theme engine in the frame layer after detecting that the user has saved the second wallpaper image (i.e., set the second wallpaper image as the wallpaper of the first interface). The theme engine can receive a second wallpaper image and corresponding components from the first interface sent by the unified editor, and then send the second wallpaper image and corresponding components from the first interface to the application layer. For example, the theme engine can send the second wallpaper image and corresponding components from the first interface to a theme application in the application layer. As another example, the theme engine can send the second wallpaper image and corresponding components from the first interface to a settings application in the application layer.
[0128] The system service layer may include, but is not limited to, theme management services. The theme management service may include: theme package verification, theme enabling, currently enabled theme data storage, and theme switching event notification. Theme package verification can be used to verify the data packets of theme resources. Theme enabling can provide the functionality to enable (i.e., apply) the theme selected by the user. Currently enabled theme data storage can store the data of the currently enabled theme. It is easy to understand that since the wallpaper is part of the theme, the data of the currently enabled theme may include the data of the currently enabled wallpaper. Theme switching event notification can provide the ability to detect theme switching events. In this embodiment, the system service layer can interact with the framework layer. For example, the theme management service of the system service layer can provide the theme engine of the framework layer with capabilities such as theme package verification, theme enabling, currently enabled theme data storage, and theme switching event notification.
[0129] The following is a detailed flowchart illustrating an image processing method provided in an embodiment of this application.
[0130] Figure 6A illustrates, by way of example, a specific flow of an image processing method provided in an embodiment of this application. This method can be applied to the electronic device 100 shown in Figure 4.
[0131] As shown in Figure 6A, the method may include:
[0132] S101, Electronic device 100 receives the wallpaper image selected by the user.
[0133] S102, Electronic device 100 determines the salient subject in the wallpaper image.
[0134] In some embodiments, the electronic device 100 may display a wallpaper settings interface before acquiring the first wallpaper image. Then, the electronic device 100 may receive the wallpaper image selected by the user and display the selected first wallpaper image in the wallpaper settings interface.
[0135] The wallpaper image selected by the user can be of a type including, but not limited to, single-frame wallpaper images, multi-frame wallpaper images, and text wallpaper images. Single-frame wallpaper images can be, but are not limited to, static images; multi-frame wallpaper images can be, but are not limited to, animated images and videos; and text wallpaper images can contain text content, which can be in the form of, for example, HyperText Markup Language (HTML), a text file (TXT), or other formats. This embodiment of the application does not impose any limitations on these formats. It should be noted that different types of wallpaper images can be converted to each other. For example, a static image can be converted to an animated image or video by adding frames. Similarly, a video can be converted to an animated image or a static image by deleting frames.
[0136] It should be noted that the electronic device 100 can receive the wallpaper image selected by the user in two ways. In some embodiments, as shown in Figures 7A-7B, the electronic device 100 can receive the user's operation of selecting a wallpaper image from a wallpaper resource library. For example, as shown in Figure 7A, the electronic device 100 can display a wallpaper settings interface 130, which may include a selection control 131. This selection control 131 can be used to trigger access to the wallpaper resource library, which can be any application storing image resources, such as a gallery, file manager, etc. In some embodiments, the electronic device 100 can receive the operation of accessing the wallpaper resource library, such as a user input operation (e.g., a click) on the selection control 131. In response to this operation, the electronic device 100 can display a user interface 140 as shown in Figure 7B, which can be the user interface of a gallery application. The user interface 140 can display image resources that can be selected by the user as wallpaper images. After receiving the user's operation of selecting a first wallpaper image to be processed from the image resources, the electronic device 100 can display the selected first wallpaper image in the wallpaper settings interface. In other embodiments, as shown in Figures 8A-8B, the electronic device 100 can receive an operation from a user selecting an image resource as a wallpaper image. Exemplarily, as shown in Figure 8A, the electronic device 100 can display an image resource display interface 150, which may include an image resource 151. Below the image resource 151, one or more controls may be displayed, such as a "share" control, a "favorite" control, an "edit" control, a "delete" control, a "more" control 152, etc. The "more" control 152 can be used to trigger the display of more options for the image resource. In some embodiments, the electronic device 100 may receive an operation that triggers the display of more options for the image resource, such as a user input operation (e.g., a click) on the "More" control 152. In response to this operation, the electronic device 100 may display a user interface 160 as shown in FIG8B. The user interface 160 may include one or more options for the image resource, such as "Move to Album," "Copy to Album," "Copy to Clipboard," "Add Note," "Hide," "Slideshow," "Print or Generate PDF," "Document Scan," "Rename," "Cast," "Set as," "Rotate," etc. The "Set as" option 161 can be used to select the image resource 151 as a wallpaper image. It is understood that the wallpaper image selected by the user can be the aforementioned first wallpaper image, i.e., the wallpaper image to be processed.
[0137] In some embodiments, after receiving a wallpaper image selected by the user, as shown in FIG6B, the electronic device 100 can determine the salient subject from the wallpaper image using a target detection algorithm and extract the salient subject from the wallpaper image (i.e., image cutout). The type of the salient subject can include, but is not limited to, people, animals, plants, food, buildings, and landscapes. For example, the salient subject in the wallpaper image 112 shown in FIG1 is a girl. It should be noted that the salient subject can be one or more compositional elements of the wallpaper image whose representativeness is higher than a preset threshold. There can be multiple salient subjects in the wallpaper image, or there may be no salient subject in the wallpaper image. This application embodiment does not limit the number of salient subjects in the wallpaper image. The above-mentioned representativeness can be obtained by processing the wallpaper image through salientity detection algorithms, etc., which will not be elaborated here.
[0138] S103, Electronic device 100 acquires metadata of salient subjects.
[0139] Specifically, after identifying the salient subject in the wallpaper image, the electronic device 100 can obtain the metadata of the salient subject from a media database. This media database can be used to store metadata of image resources processed by image processing methods, and it can be located in the memory of the electronic device 100. If the media database does not contain the metadata of the salient subject in the wallpaper image selected by the user, the electronic device 100 can obtain the metadata of the salient subject through a pre-trained machine learning model or neural network model, etc., without limitation. As shown in Figure 6B, the electronic device 100 can detect head information, face information, etc. in the metadata through a head detection algorithm, and can also detect skeletal point information in the metadata through a skeletal point detection algorithm. Furthermore, after detecting the metadata of the salient subject, the electronic device 100 can determine the type of the salient subject based on the type of metadata. It should be noted that the metadata of the salient subject can be used to describe the components of the salient subject and the attributes of the components, and the type of metadata is related to the type of the salient subject. For example, if the salient subject is a person or an animal, its metadata may include, but is not limited to, one or more of the following: facial information, head information, and skeletal point information. The attributes of the facial information may include, but are not limited to, one or more of the following: face bounding box, face orientation, and eye position. The attributes of the head information may include, but are not limited to, the head bounding box. The attributes of the skeletal point information may include, but are not limited to, one or more of the following: human or animal frame, and skeletal detection points (which can be understood as the various skeletal points of the salient subject). That is to say, the face bounding box, face orientation, eye position, head bounding box, human or animal frame, and skeletal detection points all belong to metadata. If the salient subject is a landscape, its metadata can be determined based on the scene of the salient subject. For example, if the scene of the salient subject is a seaside, its metadata may include, but is not limited to, one or more of the following: seawater, sand, seagulls, etc.
[0140] Specifically, the algorithm model used to obtain metadata of salient subjects can be trained on a first training set with a confidence level higher than a specific confidence value, such as 90%. The first training set includes a large number of training samples, one of which can include an input and its corresponding output sample. The input can include salient subjects in a user-selected wallpaper image, and the output sample can be the metadata of the salient subjects. Understandably, as the number of training samples increases, the types of metadata for salient subjects output by the algorithm model will also increase. For example, if the type of salient subject is a person or an animal, the facial information attributes can also include facial feature information; furthermore, the metadata of the salient subject can also include facial feature information.
[0141] It should be noted that the metadata of salient subjects can be acquired in parallel using algorithmic models on both the device side and the cloud side. The metadata acquired on the device side is primarily real-time data, such as the metadata of salient subjects in an image being captured by the user. The metadata acquired on the cloud side is used by the electronic device 100 to complete the metadata of salient subjects when the metadata acquired on the device side is incomplete.
[0142] S104. Electronic device 100 changes the way a salient subject is displayed in a wallpaper image based on the metadata of the salient subject.
[0143] It should be noted that the metadata of the salient subject can be used to provide feedback on how the salient subject is displayed in the wallpaper image. Before the electronic device 100 changes the display mode of the salient subject in the wallpaper image, the salient subject is in a first display mode in the first wallpaper image (i.e., the wallpaper image before the change in display mode), and this first display mode can be fed back through the metadata of the salient subject acquired by the electronic device 100. After the electronic device 100 changes the display mode of the salient subject in the wallpaper image, the salient subject is in a second display mode in the second wallpaper image (i.e., the wallpaper image after the change in display mode), and the second display mode is different from the first display mode. It can be understood that the second display mode is related to the first display mode, that is, the second display mode is related to the metadata of the salient subject acquired by the electronic device 100 in the first wallpaper image, or in other words, the factors influencing the change in the display mode of the salient subject may include, but are not limited to, the metadata of the salient subject in the first wallpaper image, which may include, but are not limited to, one or more of the following: head information, face information, and skeletal point information.
[0144] In some embodiments, after obtaining the metadata of a salient subject, the electronic device 100 can change the display mode of the salient subject in the first wallpaper image from a first display mode to a second display mode based on the metadata of the salient subject, thereby obtaining a second wallpaper image, wherein the second display mode is different from the first display mode. Specifically, the electronic device 100 can determine the position of the first element in the second display mode based on one or more of the head information, face information, and skeletal point information of the first element in the first wallpaper image; and / or, the electronic device 100 can also determine the size of the first element in the second display mode based on one or more of the head information, face information, and skeletal point information of the first element in the first wallpaper image; and / or, the electronic device 100 can also determine the completeness of the first element in the second display mode based on one or more of the head information, face information, and skeletal point information of the first element in the first wallpaper image. In this way, the electronic device 100 can highlight the salient subject in the wallpaper image by shifting, scaling (i.e., shrinking or enlarging), and cropping. It should be noted that, as mentioned above, the type of metadata is related to the type of salient subject, and the influencing factors of changing the display mode of the salient subject may include, but are not limited to, the metadata of the salient subject. Therefore, optionally, the factors influencing the change in the display mode of a prominent subject may also include the type of the prominent subject. As shown in Figure 6B, after determining the type of the prominent subject, the electronic device 100 can further determine the number of prominent subjects. Optionally, the factors influencing the change in the display mode of a prominent subject may also include the number of prominent subjects. For example, when the background of the first wallpaper image (i.e., the part of the first wallpaper image excluding the prominent subject) is the same, the display modes of different types of prominent subjects in the same display mode can be different after the change. For example, the display modes of prominent subjects of type "human", "animal", and "non-human or non-animal" are all different. Furthermore, the display mode of the prominent subject after the change (i.e., the second display mode) can change with the change in the number of prominent subjects. For example, if the type of the prominent subject is "human" and the number of prominent subjects is 1, the electronic device 100 can change the display mode of the prominent subject according to the first rule. If the type of the prominent subject is "human" and the number of prominent subjects is greater than 1, the electronic device 100 can change the display mode of the prominent subject according to the second rule. If the type of the salient subject is animal and the number of salient subjects is 1, then the electronic device 100 may change the display mode of the salient subject according to the third rule. If the type of the salient subject is animal and the number of salient subjects is greater than 1, then the electronic device 100 may change the display mode of the salient subject according to the fourth rule.For example, if the salient subject is not a person or an animal, the electronic device 100 can change the display method of the salient subject according to the fifth rule. If there is no salient subject in the first wallpaper image, the electronic device 100 can change the display method of the salient subject according to the sixth rule, for example, by generating a second wallpaper image through a pre-trained machine learning model or neural network model, etc., without any restrictions.
[0145] For example, the type of salient subject is person, and the number of salient subjects is 1.
[0146] If the metadata of the salient subject does not contain facial information, the electronic device 100 can first take the following scaling measures for the salient subject: stop zooming in on the salient subject. Secondly, it can take the following shifting measures for the salient subject: place the head frame or portrait frame as close as possible to the center of the wallpaper image, with the head frame having a higher priority than the portrait frame.
[0147] If the metadata of the salient subject does not contain a face frame, then the metadata of the salient subject will also not contain skeletal point information. In this case, the electronic device 100 can first stop scaling the salient subject, and then apply different displacement measures depending on whether the metadata of the salient subject contains a face frame. Further, if the metadata of the salient subject contains a face frame, the electronic device 100 can position the face in the wallpaper image according to the face's orientation. For example, if the face is facing left, the electronic device 100 can place the center of the eyes as close as possible to the two-thirds line of the wallpaper image; if the face is facing right, the electronic device 100 can place the center of the eyes as close as possible to the one-third line of the wallpaper image; if the face is facing center, the electronic device 100 can place the center of the eyes as close as possible to the half-line of the wallpaper image. If the metadata of the salient subject does not contain a face frame, the electronic device 100 can place the head frame as close as possible to the center of the wallpaper image.
[0148] If the metadata of a salient subject does not contain skeletal point information and facial information, the electronic device 100 can process the salient subject according to the case where the metadata of the salient subject does not contain facial information; if the metadata of a salient subject does not contain skeletal point information and a human frame, the electronic device 100 can process the salient subject according to the case where the metadata of the salient subject does not contain a human frame; if the metadata of a salient subject does not contain skeletal point information but contains facial information and a human frame, the electronic device 100 can process the salient subject according to the case where the skeletal point information of the salient subject is localized.
[0149] When the metadata of a salient subject includes facial information, a portrait frame, and skeletal point information:
[0150] If the skeletal information of the prominent subject is complete, for example, the skeletal information includes foot information, or the skeletal information includes hip information and the distance between the bottom of the portrait frame and the bottom of the wallpaper image is greater than a preset distance (e.g., 1 cm), then the electronic device 100 can first take the following displacement measures for the prominent subject: place the top of the prominent subject's head at one-sixth of the height from the top of the wallpaper image, and place the center of the eyes at the corresponding position according to the direction of the face. For example, if the face is facing left, the electronic device 100 can place the center of the eyes as close as possible to the two-thirds line of the wallpaper image; if the face is facing right, the electronic device 100 can place the center of the eyes as close as possible to the one-third line of the wallpaper image; if the face is facing the middle, the electronic device 100 can place the center of the eyes as close as possible to the half-line of the wallpaper image. Secondly, the electronic device 100 can take the following scaling measures for the prominent subject: control the size of the prominent subject to not exceed the wallpaper image as much as possible, and control the height of the prominent subject to be approximately three-quarters of the height of the wallpaper image. Next, the electronic device 100 can take scaling and shifting measures on the prominent subject by controlling the distance between the bottom of the prominent subject and the bottom of the wallpaper image to be no more than one-twelfth of the height of the wallpaper image, and placing the head or face between the one-third line and the two-thirds line of the wallpaper image.
[0151] If the skeletal information of the salient subject is close-up, for example, the skeletal information does not include hip information, and the height of the person is less than twice the height of the head / face, then the electronic device 100 can first take the following displacement measures for the salient subject: place the eyes at one-third of the height of the wallpaper image, and place the center of the eyes at the corresponding position according to the direction the face is facing. For example, if the face is facing left, the electronic device 100 can place the center of the eyes as close as possible to the two-thirds line of the wallpaper image; if the face is facing right, the electronic device 100 can place the center of the eyes as close as possible to the one-third line of the wallpaper image; if the face is facing the middle, the electronic device 100 can place the center of the eyes as close as possible to the half line of the wallpaper image. Secondly, the electronic device 100 can take the following cropping measures for the salient subject: try not to crop facial features, and when cropping facial features, crop from the nose to preserve the integrity of the eyes as much as possible.
[0152] When the skeletal point information of a salient subject has a local feature, for example, the skeletal point information includes hip information and the distance between the bottom of the portrait frame and the bottom of the wallpaper image is less than a preset distance (e.g., 1 cm), or the skeletal point information does not include hip information and the height of the person is greater than twice the height of the head / face, it is further determined whether the skeletal point information has a local special feature, for example, the height of the head is less than half the height of the wallpaper image and the aspect ratio of the portrait frame is less than 1.2:1.
[0153] If the characteristics of the skeletal point information are local special types, the electronic device 100 can take the following displacement and scaling measures for the prominent subject: place the top of the prominent subject's head at half the height from the top of the wallpaper image, control the limbs to keep them as far as possible from exceeding the human image frame, place the head or face between the one-third and two-thirds lines of the wallpaper image, and try not to enlarge the prominent subject.
[0154] If the features of the skeletal point information are not of a local specific type, the electronic device 100 can first take the following displacement measures for the salient subject: place the top of the salient subject's head at a height of one-sixth of the distance from the top of the wallpaper image; place the center of the eyes at the corresponding position according to the direction of the face. For example, if the face is facing left, the electronic device 100 can place the center of the eyes as close as possible to the two-thirds line of the wallpaper image; if the face is facing right, the electronic device 100 can place the center of the eyes as close as possible to the one-third line of the wallpaper image; if the face is facing the middle, the electronic device 100 can place the center of the eyes as close as possible to the half-line of the wallpaper image; place the head or face between the one-third and two-thirds lines of the wallpaper image; secondly, the electronic device 100 can take the following scaling measures for the salient subject: no longer zoom in on the salient subject.
[0155] In some embodiments, one or more objects further include a second element, which is also a prominent subject in the wallpaper image. Before acquiring the second wallpaper image based on the first wallpaper image, the electronic device 100 may adjust the display mode of the first element from a first display mode to a second display mode based on the spacing between the first element and the second element. Specifically, the electronic device 100 may adjust the first position of the first element in the first display mode to the second position of the first element in the second display mode based on the spacing between the first element and the second element; and / or, the electronic device 100 may also adjust the first size of the first element in the first display mode to the second size of the first element in the second display mode based on the spacing between the first element and the second element; and / or, the electronic device 100 may also adjust the first completeness of the first element in the first display mode to the second completeness of the first element in the second display mode based on the spacing between the first element and the second element.
[0156] Figure 8C exemplarily illustrates a rule for changing the display method when the number of prominent subjects is greater than 1, provided by an embodiment of this application.
[0157] As shown in Figure 8C, the electronic device 100 can determine the number of significant subjects.
[0158] With two salient subjects, the electronic device 100 can determine the distance characteristics between the two salient subjects.
[0159] For example, the distance between two salient entities can be characterized as compact, small-spaced, or large-spaced.
[0160] Specifically, when the distance between two prominent subjects is characterized as compact, for example, when the distance between the heads of the two prominent subjects is less than one-third of the distance between the centers of their heads, the electronic device 100 can take the following measures for the two prominent subjects as a first measure: for example, placing the top of the tall person's head at one-sixth of the height from the top of the wallpaper image; displaying the two prominent subjects as completely as possible; not cropping the facial features of the prominent subjects; and controlling the distance between the bottom of the prominent subjects and the bottom of the wallpaper image to be less than one-twelfth of the height of the wallpaper image.
[0161] When the distance between two prominent subjects is characterized by a small gap, for example, the distance between the heads of the two prominent subjects is less than half the distance between the center of their heads and greater than one-third of the distance between the center of their heads, then the electronic device 100 can take the following measures for the two prominent subjects: for example, try to place the top of the head of the prominent subject at one-third of the height from the top of the wallpaper image; if the distance between the top of the head of the prominent subject and the top of the wallpaper image is less than one-third of the height, then the electronic device 100 can crop the bottom of the prominent subject; try not to enlarge the prominent subject; and try to display the limbs of the prominent subject as completely as possible.
[0162] When the distance between two prominent subjects is characterized by a large gap, for example, the distance between the heads of the two prominent subjects is greater than half the distance between the centers of their heads, then the electronic device 100 can take the following measures for the two prominent subjects: for example, placing the top of the head of the prominent subject at one-third of the height from the top of the wallpaper image; if the distance between the top of the head of the prominent subject and the top of the wallpaper image is less than one-third of the height, then the electronic device 100 can crop the bottom of the prominent subject; avoid enlarging the prominent subject as much as possible; display the limbs of the prominent subject as completely as possible; when the main body of one prominent subject is cropped, the electronic device 100 can process the two prominent subjects separately as if the number of prominent subjects were 1.
[0163] It is understandable that if the number of salient subjects is greater than 2, the electronic device 100 can process multiple salient subjects multiple times as if the number of salient subjects were 2.
[0164] S105, Electronic device 100 changes the display method of components in the first interface based on the display method of the prominent subject.
[0165] In some embodiments, after changing the display method of the prominent subject in the wallpaper image, the electronic device 100 can change the display method of the component in the first interface based on the display method of the prominent subject. For example, the third display method may include the position of the component, which may be determined based on the position of the first element in the second wallpaper image. In other words, the electronic device 100 may adjust the display method of the component from a preset display method to a third display method based on the position of the prominent subject in the second wallpaper image. In this way, the electronic device 100 can perform avoidance processing on components such as clocks, application icons, and application cards in the wallpaper image after highlighting the prominent subject, so as to reduce the degree of occlusion of the prominent subject by the component. For example, the degree of occlusion of the prominent subject by the component in the third display method is lower than the degree of occlusion of the first element by the component in the preset display method. As can be seen from the foregoing, the display method of the component may include, but is not limited to, one or more of the following: the position of the component, the brightness of the component, the color of the component, the transparency of the component, the depth relationship between the component and the prominent subject, the degree of occlusion of the component by the prominent subject, and the size of the component.
[0166] It should be noted that the display method of components in a wallpaper image is related to the display method of the salient subject, and the display method of the salient subject is related to the metadata of the salient subject. Therefore, factors influencing the adjustment of the component display method may include, but are not limited to, the metadata of the salient subject, which includes, but is not limited to, one or more of the following: head information, face information. Specifically, the electronic device 100 may determine the position of the component in the third display method based on the head information and / or face information of the first element in the first wallpaper image; and / or, the electronic device 100 may also determine the size of the component in the third display method based on the head information and / or face information of the first element in the first wallpaper image. As can be seen from the foregoing, the type of metadata is related to the type of the salient subject, therefore, factors influencing the change of the component display method may also include the type of the salient subject.
[0167] For example, the salient subject is a person or an animal, and the component is a clock component. As shown in Figure 9A, the size of the clock component can include three types: 4x2, 2x4, and 4x4.
[0168] Figure 9B illustrates, exemplarily, a rule for the placement of a component provided in an embodiment of this application.
[0169] As shown in Figure 9B, the electronic device 100 can determine the type of a significant subject based on the metadata of the significant subject.
[0170] When the salient subject is a person or an animal:
[0171] If the metadata of the salient subject does not contain header information, the electronic device 100 can determine the placement of the component as the first measure. For example, the component's position can be determined according to the case that the type of the salient subject is not a person or animal (e.g., the type of the salient subject is a plant, food, building, scenery, etc.). The component located at this position will obscure the salient subject to a degree lower than a preset threshold. In addition, the electronic device 100 can select a 4x2 type as the size of the component.
[0172] If the metadata of the salient subject includes head information but not facial information, the electronic device 100 can determine that the placement measure of the component is a second measure. For example, the placement measure of the component is to place the component at a position where the degree of occlusion of the salient subject's head is less than a preset threshold. The component at this position can interact with the salient subject's head. For example, if the salient subject's head is above the wallpaper image, the electronic device 100 can place the component below the wallpaper image; if the salient subject's head is below the wallpaper image, the electronic device 100 can place the component above the wallpaper image. In addition, the electronic device 100 can select a 4x2 type as the size of the component.
[0173] If the metadata of the salient subject includes head information and facial information, the electronic device 100 can determine that the placement measure of the component is a third measure. For example, the placement measure of the component is: placing the component at a position where the degree of occlusion of the salient subject's head is less than a preset threshold. The component at this position can be linked with the orientation of the salient subject's face. For example, if the salient subject's head is above the wallpaper image, the electronic device 100 can place the component below the wallpaper image at a position opposite to the orientation of the salient subject's face; if the salient subject's head is below the wallpaper image, the electronic device 100 can place the component above the wallpaper image at a position opposite to the orientation of the salient subject's face. In addition, the electronic device 100 can select a 2x4 type as the size of the component.
[0174] For example, if there is no prominent subject in the wallpaper image and the component is a clock component, the electronic device 100 can determine the component's placement measure as a fourth measure, such as preferentially selecting a 2x4 type as the component's size. Optionally, the electronic device 100 can also randomly select a 4x4 type as the component's size.
[0175] For example, the type of the salient subject is not a person or an animal (e.g., the type of the salient subject is a plant, food, building, landscape, etc.), and the component is a clock component.
[0176] If the prominent subject is fully displayed in the wallpaper image, the electronic device 100 can determine the placement measure of the component as the fifth measure, for example, selecting a 4x2 type as the size of the component, and the position of the component is a position where the degree of occlusion of the prominent subject is less than a preset threshold.
[0177] If the prominent subject is not fully displayed in the wallpaper image, the electronic device 100 can determine the placement measure of the component as the sixth measure, such as placing the component at a position where the degree of occlusion of the prominent subject is less than a preset threshold, and selecting the size of the component according to the range of the component's location, such as a 4x2 type or a 2x4 type.
[0178] It is understandable that the size of the aforementioned components may be the same as or similar to the size of the screen of the electronic device 100 in order to improve the aesthetics of the composition.
[0179] It should be noted that the combined display effect of components and prominent subjects in a wallpaper image is affected by the display mode of the components. In some embodiments, the electronic device 100 may arrange components according to a preset appearance (e.g., brightness) which may result in the brightness of the component being similar to that of the second wallpaper image. For example, the brightness variance between the component and the second wallpaper image may be less than a preset threshold (e.g., 6000), making it difficult for users to distinguish the component from the wallpaper image and affecting the user experience. In this case, the electronic device 100 may adjust the display mode of the component from a preset mode to a third mode based on the color (e.g., lightness) of the second wallpaper image. In the third mode, the brightness of the component changes relative to the brightness of the component in the preset mode, thereby increasing the distinguishability of the component from the second wallpaper image. Alternatively, the third mode may include the brightness of the component, which can be determined based on the color of the second wallpaper image. It should be noted that the higher the lightness of the second wallpaper image, the lower the brightness of the component in the third mode relative to the brightness of the component in the preset mode; conversely, the lower the lightness of the second wallpaper image, the higher the brightness of the component in the third mode relative to the brightness of the component in the preset mode. For example, as shown in FIG9C, the electronic device 100 can first determine whether the brightness variance between the wallpaper image and the component exceeds a first preset threshold (e.g., 6000). If yes, the electronic device 100 can perform a first processing on the brightness of the component, for example, arranging it according to a preset brightness of the component (e.g., brightness of 1). If no, the electronic device 100 can further determine the range of the lightness level (i.e., contrast with pure white) of the wallpaper image. If the lightness level does not exceed the first threshold (e.g., lightness level of 1.5), the electronic device 100 can perform a second processing on the brightness of the component, for example, adjusting the brightness of the component to 3. If the lightness level exceeds the first threshold (e.g., lightness level of 1.5) but does not exceed the second threshold (e.g., lightness level of 1.9), the electronic device 100 can perform a third processing on the brightness of the component, for example, adjusting the brightness of the component to 2.5. If the lightness level exceeds a second threshold (e.g., lightness level of 1.9) but does not exceed a third threshold (e.g., lightness level of 7), the electronic device 100 can perform a fourth processing on the brightness of the component, such as adjusting the brightness of the component to 1.5. If the lightness level exceeds the third threshold (e.g., lightness level of 7), the electronic device 100 can further determine whether the brightness variance between the wallpaper image and the component exceeds a second preset threshold; if so, the electronic device 100 can perform a fifth processing on the brightness of the component, such as adjusting the brightness of the component to 0.9; if not, the electronic device 100 can perform a sixth processing on the brightness of the component, such as adjusting the brightness of the component to 0.5.For example, as shown in FIG9D, if the luminance variance between the wallpaper image and the clock component arranged according to a preset brightness does not exceed a first preset threshold (e.g., 6000), and the lightness of the wallpaper image exceeds a second threshold (e.g., lightness of 1.9) but does not exceed a third threshold (e.g., lightness of 7), then the electronic device 100 can perform a fourth processing on the brightness of the component, for example, adjusting the brightness of the component to 1.5. This changed brightness is higher than the preset brightness (e.g., brightness of 1), thereby increasing the distinguishability between the component and the wallpaper image. As shown in FIG9E, if the luminance variance between the wallpaper image and the clock component arranged according to a preset brightness does not exceed a first preset threshold (e.g., 6000), and the lightness of the wallpaper image exceeds a third threshold (e.g., lightness of 7), then the electronic device 100 can perform a sixth processing on the brightness of the component, for example, adjusting the brightness of the component to 0.5. This changed brightness is lower than the preset brightness (e.g., brightness of 1), thereby increasing the distinguishability between the component and the wallpaper image.
[0180] It should be noted that after the user replaces the wallpaper of the first interface with the second wallpaper image, the color of the component in the second wallpaper image is related to the color of the prominent subject. In some embodiments, arranging the components according to the preset appearance (such as color) of the components may cause the color of the components to be close to the color of the second wallpaper image. For example, the color difference between the components and the second wallpaper image is less than the preset threshold, resulting in the user having difficulty distinguishing the components from the wallpaper image and affecting the user experience. In this case, the electronic device 100 can adjust the display mode of the components from the preset display mode to the third display mode based on the main color of the first element. The color of the components in the third display mode changes relative to the color of the components in the preset display mode to increase the differentiation between the components and the second wallpaper image. Or rather, the third display mode can include the color of the components, and the color of the components can be determined based on the color of the first element. In some other embodiments, arranging the components according to the preset appearance (such as color) of the components may be relatively boring and affect the user experience. In this case, the electronic device 100 can adjust the display mode of the components from the preset display mode to the third display mode based on the main color of the prominent subject. The color of the components in the third display mode changes relative to the color of the components in the preset display mode and is the same as or similar to the main color of the prominent subject in the second wallpaper image. For example, the color difference between the color of the components in the third display mode and the main color of the prominent subject is less than the preset threshold, so that the color of the components and the main color of the prominent subject have a linkage effect and the interest is increased. Or rather, the third display mode can include the color of the components, and the color of the components can be determined based on the color of the first element. For example, the electronic device 100 can color the components in color to increase the interest. When the lightness degree of the second wallpaper image is greater than the preset threshold, the electronic device 100 can lower the brightness of the components in the second wallpaper image to increase the differentiation between the components and the second wallpaper image; when the lightness degree of the second wallpaper image is less than the preset threshold, the electronic device 100 can increase the brightness of the components in the second wallpaper image to increase the differentiation between the components and the second wallpaper image. Also, for example, before the electronic device 100 colors the components black, gray or white, if the main color of the prominent subject is black or gray, the electronic device 100 can choose white to color the components to increase the differentiation between the components and the second wallpaper image; if the main color of the prominent subject is white, the electronic device 100 can choose black or gray to color the components to increase the differentiation between the components and the second wallpaper image; if the main color of the prominent subject is color, the electronic device 100 can choose the same or similar color as the main color of the prominent subject to color the components, so that the color of the components and the main color of the prominent subject have a linkage effect and the interest is increased.For example, as shown in Figure 9F, arranging the electronic device 100 according to the preset color (e.g., white) of the components may be rather boring and affect the user experience. If the salient element is a planet, and the color of the salient element is multicolored, with blue as the primary color, then the electronic device 100 can select blue from the multicolored elements to color the clock component, so that the color of the component interacts with the primary color of the salient element, thus increasing its appeal.
[0181] Optionally, changing the display method of components can not only change the brightness and color of the corresponding components in the layout, but also blur the edges of the components, add shadows and other effects to increase the differentiation between the components and the second wallpaper image and enhance the fun.
[0182] In some embodiments, if the electronic device 100 lays out a component according to a preset appearance (e.g., transparency) such that the component occludes a prominent subject in the second wallpaper image to a degree higher than a preset threshold (e.g., 30%), the electronic device 100 may adjust the display mode of the component from a preset display mode to a third display mode based on the degree of occlusion. In the third display mode, the transparency of the component changes relative to the transparency of the component in the preset display mode, thereby reducing the degree of occlusion of the prominent subject in the second wallpaper image. Alternatively, the third display mode may include the transparency of the component, which may be determined based on the degree of occlusion of the component by the first element. For example, as shown in Figures 10A-10B, the prominent subject is a puppy. The electronic device 100 may change the transparency of a component (e.g., a clock component) in the wallpaper image. This changed transparency may be higher than a preset transparency, thereby reducing the degree of occlusion of the prominent subject in the wallpaper image. As shown in Figure 10A, the electronic device 100 may display a user interface 210, which may include a prominent subject and a component 211 that occludes the prominent subject. The transparency of this component may be a preset transparency. In some embodiments, the electronic device 100 may change the transparency of component 211 in the user interface 210, for example, by increasing the transparency of component 211, and display the user interface 220 as shown in FIG10B. The user interface 220 may include a prominent subject and component 221 with altered transparency, the altered transparency being higher than a preset transparency, so as to reduce the degree to which component 221 obscures the prominent subject in the user interface 220.
[0183] It should be noted that the greater the degree of occlusion of the salient subject by the component, the higher the transparency of the component in the third display mode compared to the preset display mode; conversely, the lower the degree of occlusion, the lower the transparency of the component in the third display mode compared to the preset display mode. Understandably, the degree of occlusion can be measured by the distance between the component and the salient subject. The smaller the distance, the greater the occlusion; the larger the distance, the less occlusion. Therefore, the smaller the distance, the greater the occlusion, and the higher the transparency of the component in the third display mode compared to the preset display mode; conversely, the larger the distance, the less occlusion, and the lower the transparency of the component in the third display mode compared to the preset display mode.
[0184] It should be noted that the distance ΔE between the component and the salient subject can be determined based on the following formula:
[0185] Where L1 and L2 are the layer numbers of the prominent subject and the component in the second wallpaper image, respectively; a1 and a2 are the x-coordinates of the center of the prominent subject and the center of the component in the second wallpaper image, respectively; and b1 and b2 are the y-coordinates of the center of the prominent subject and the center of the component in the second wallpaper image, respectively.
[0186] In some embodiments, if the electronic device 100 lays out a component in a preset layer of a wallpaper image, causing the component to occlude a prominent subject in the wallpaper image to a degree exceeding a preset threshold (e.g., 30%), the electronic device 100 may adjust the display mode of the component from a preset display mode to a third display mode based on the degree of occlusion. In the third display mode, the depth relationship between the component and the prominent subject changes compared to the depth relationship between the component and the prominent subject in the preset display mode. This changed depth relationship between the component and the prominent subject can reduce the degree of occlusion of the component on the prominent subject in the second wallpaper image. Alternatively, the third display mode may include the depth relationship between the component and a first element, which can be determined based on the degree of occlusion of the component on the first element. For example, as shown in Figures 11A-11B, the prominent subject is a puppy, and the layer of the component in the wallpaper image is located above the layer of the prominent subject, causing part of the prominent subject to be occluded by the component. In this case, the electronic device 100 can change the depth-of-field relationship between the component and the prominent subject in the wallpaper image. This changed depth-of-field relationship can reduce the degree to which the component occludes the prominent subject in the wallpaper image. As shown in FIG11A, the electronic device 100 can display a user interface 230, which can include the prominent subject and a component 231 that occludes the prominent subject. The layer of the component 231 in the wallpaper image can be a preset layer. It is understood that if the preset layer and the layer containing the prominent subject are not the same, the component 231 will have a depth-of-field effect in the wallpaper image. In some embodiments, the electronic device 100 can change the depth-of-field relationship between the component 231 and the prominent subject, for example, by placing the component 231 below the layer containing the prominent subject and displaying the user interface 240 as shown in FIG11B. User interface 240 may include a component 241 with a changed depth-of-field relationship to a salient subject. For example, the depth-of-field relationship between component 241 and the salient subject may be such that component 241 is partially obscured by the salient subject, thereby reducing the degree of occlusion by component 241. For instance, as shown in Figures 11C-11D, the salient subject is a puppy, and the component's layer in the wallpaper image is above the salient subject's layer, causing partial occlusion of the salient subject by the component. In this case, electronic device 100 can change the depth-of-field relationship between the component and the salient subject in the wallpaper image, thereby reducing the degree of occlusion by the component in the wallpaper image. As shown in Figure 11C, electronic device 100 may display user interface 230, which may include a salient subject and a component 231 that obscures the salient subject. The layer of component 231 in the wallpaper image may be a preset layer.In some embodiments, the electronic device 100 can change the depth relationship between component 231 and a prominent subject, for example, by creating a cutout effect on the portion of component 231 that obscures the prominent subject, and displaying the user interface 250 as shown in FIG11D. It should be noted that creating a cutout effect on the portion of component 231 that obscures the prominent subject specifically refers to adjusting the transparency of that portion, for example, reducing its transparency. The user interface 250 may include component 251 after the depth relationship between the prominent subject and the subject has been changed. This depth relationship can be, for example, by displaying component 251 with a cutout effect on the prominent subject, thereby reducing the degree of obstruction of the prominent subject by component 251. It is understood that the depth relationship between the component and the prominent subject can also be other, and this embodiment does not limit this.
[0187] In some embodiments, as shown in FIG11E, the electronic device 100 may change the depth relationship between the component and the prominent subject according to the following rules: When the wallpaper image type is a single-frame wallpaper image and the prominent subject type is a person or animal, if the occlusion degree of the prominent subject on the date in the time component is higher than a preset threshold (e.g., 30%), the electronic device 100 may not change the depth relationship between the component and the prominent subject; if the occlusion degree of the prominent subject on the time in the time component is higher than a preset threshold (e.g., 30%), the electronic device 100 may change the depth relationship between the component and the prominent subject to reduce the occlusion degree of the prominent subject on the component. When the wallpaper image type is a single-frame wallpaper image and the prominent subject type is neither a person nor an animal, the electronic device 100 may not change the depth relationship between the component and the prominent subject. When the wallpaper image type is a multi-frame wallpaper image, the electronic device 100 may not change the depth relationship between the component and the prominent subject during the playback of the wallpaper image, but may change the depth relationship after the wallpaper image playback ends, according to the case where the wallpaper image type is a single-frame wallpaper image. When the wallpaper image is blurry, the depth relationship between the component and the salient subject does not take effect.
[0188] In some embodiments, when the occlusion degree of compositional elements other than the salient subject in the wallpaper image of the salient subject (i.e., the first element) exceeds a preset threshold (e.g., 30%), the electronic device 100 can change the depth-of-field relationship between the corresponding compositional elements and the salient subject. This changed depth-of-field relationship can reduce the occlusion degree of the compositional elements on the salient subject in the second wallpaper image. For example, as shown in Figures 12A-12B, the first element is a man, and the second element is a puppy. The layer of the second element in the wallpaper image is located above the layer of the first element, causing part of the first element to be occluded by the second element. In this case, the electronic device 100 can change the depth-of-field relationship between the second element and the first element in the wallpaper image. This changed depth-of-field relationship can reduce the occlusion degree of the second element on the first element in the wallpaper image. As shown in Figure 12A, the electronic device 100 can display a user interface 260, which can include the first element and the second element that occludes the first element. The layer of the second element can be located above the layer of the first element. In some embodiments, the electronic device 100 can change the depth relationship between the second element and the first element, for example, by placing the second element below the layer containing the first element and displaying the user interface 270 as shown in FIG12B. The user interface 270 may include the second element after the change in the depth relationship between the first element and the first element. For example, the depth relationship between the second element and the first element may be such that the second element is partially obscured by the first element, thereby reducing the degree of occlusion of the first element by the second element. It is understood that the depth relationship between the second element and the first element can also be other, and this embodiment does not limit this.
[0189] The above embodiments describe the relevant content of highlighting the prominent subject in the wallpaper processing steps of the wallpaper setting method. The following is a flowchart of a wallpaper setting method provided by an embodiment of this application.
[0190] Figure 13A illustrates the specific flow of a wallpaper setting method provided in an embodiment of this application.
[0191] As shown in Figure 13A, the method may include:
[0192] S201, Electronic device 100 detects the operation of selecting the first wallpaper image.
[0193] It is understood that step S201 is similar to step S101 shown in Figure 6A above. For a detailed explanation of step S201, please refer to the relevant textual description in step S101 shown in Figure 6A above, and it will not be repeated here.
[0194] S202, Electronic device 100 processes the first wallpaper image selected by the user.
[0195] Specifically, after detecting a user's selection of a first wallpaper image, the electronic device 100 can process the selected first wallpaper image. It should be noted that the electronic device 100's processing of the wallpaper image can include, but is not limited to, one or more of the following methods: highlighting salient subjects, removing imperfections, stabilizing frames, and supplementing frames as described in the foregoing embodiments.
[0196] Impurity removal is a method of processing impurities in wallpaper images according to user preferences. These impurities can be defined based on user preferences or evaluated by an algorithm model; this embodiment does not impose such limitations. As shown in Figure 13B, different types of wallpaper images can correspond to different impurity removal methods. For example, as shown in Figures 14A-14F, the impurity removal methods corresponding to a single frame wallpaper image can include, but are not limited to, eliminating impurities, replacing impurities, and beautifying impurities. Eliminating impurities refers to removing impurities from the wallpaper image. For example, as shown in Figures 14A-14B, the salient subject is a girl, and the impurity is a puppy. The wallpaper image shown in Figure 14B after impurity removal processing has fewer impurities compared to the wallpaper image shown in Figure 14A before impurity removal processing. Replacing impurities refers to replacing the impurities in the wallpaper image with other compositional elements besides the impurities. The compositional elements combined with the salient subject form a more aesthetically pleasing composition; for example, the aesthetic score of the composition formed by the combination of the aforementioned compositional elements and the salient subject is higher than a preset threshold. For example, as shown in Figures 14C-14D, the salient subject is a girl, the impurity is a puppy, and the compositional element replacing the impurity is a panda. Compared to the wallpaper image shown in Figure 14C before impurity removal, the impurity in the wallpaper image shown in Figure 14D after impurity removal has been replaced with other compositional elements besides the impurity. Here, "beautifying the impurity" refers to performing one or more of the following processing on the impurity in the wallpaper image: shifting, scaling (reducing or enlarging), or cropping, to improve the aesthetic appeal of the composition formed by the combination of the impurity and the salient subject. For example, the aesthetic score of the composition formed by the combination of the impurity and the salient subject after beautification is higher than that before beautification. For example, as shown in Figures 14E-14F, the salient subject is a girl, the impurity is a puppy. Compared to the wallpaper image shown in Figure 14E before impurity removal, the impurity in the wallpaper image shown in Figure 14F after impurity removal is enlarged, improving the aesthetic appeal of the composition formed by the combination of the impurity and the salient subject. In addition to methods for removing impurities from single-frame wallpaper images, such as eliminating impurities, replacing impurities, and enhancing impurities, methods for removing impurities from multi-frame wallpaper images can also include deleting impurity frames and replacing impurity frames.
[0197] Among them, stable frames are a method of displaying a continuous segment of frames from multiple wallpaper images whose stability level is higher than a preset threshold, so as to present a better dynamic display effect of wallpapers. It is mainly used for processing multiple wallpaper images.
[0198] Supplementary frames are a method of adding frames to the wallpaper image received by the electronic device 100 to make the display of multi-frame wallpaper images more vivid and smooth, reducing abrupt changes. Supplementary frames can be applied to multi-frame wallpaper images or single-frame wallpaper images.
[0199] It should be noted that users can manually select one or more of the above methods to process the wallpaper image, or they can choose the system's default recommended method to process the wallpaper image.
[0200] For example, as shown in FIG15A, during the process of the electronic device 100 processing the first wallpaper image selected by the user, the electronic device 100 can display a wallpaper processing interface 310, which can display the first wallpaper image being processed. A waiting control 311 can be displayed on the first wallpaper image, which can be used to prompt the user that the electronic device 100 is processing the wallpaper image and ask the user to wait. It is understood that the processing time of the wallpaper image by the electronic device 100 is related to the complexity of the wallpaper image, and the complexity of the wallpaper image is related to the types and number of compositional elements in the wallpaper image. The more types and number of compositional elements in the wallpaper image, the higher the complexity of the wallpaper image, and consequently, the longer the processing time of the electronic device 100.
[0201] S203, Electronic device 100 displays the processed second wallpaper image on the wallpaper preview interface.
[0202] S204. An operation to set a wallpaper is detected, and the electronic device 100 sets the second wallpaper image as the wallpaper of the first interface.
[0203] After processing the user-selected first wallpaper image, the electronic device 100 can display the processed second wallpaper image on the wallpaper preview interface. For example, as shown in FIG15B, the electronic device 100 can display a wallpaper preview interface 320, which can display the processed second wallpaper image. If the second wallpaper image is a multi-frame wallpaper image, a dynamic effect control 321 in an on state can be displayed on the second wallpaper image. This on-state dynamic effect control 321 can be used to indicate to the user that the currently displayed second wallpaper image is a multi-frame wallpaper image, and can also be used to trigger a dynamic effect to close the second wallpaper image. In some embodiments, the electronic device 100 can receive an operation to turn off the dynamic effect of the second wallpaper image, such as a user input operation (e.g., clicking) on the dynamic effect control 321 that is in the on state. In response to this operation, the electronic device 100 can display a wallpaper preview interface 330 as shown in FIG. 15C. The wallpaper preview interface 330 may include a dynamic effect control 331 in the off state. The dynamic effect control 331 in the off state can be used to prompt the user that the type of the currently displayed second wallpaper image is a multi-frame wallpaper image, and can also be used to trigger the dynamic effect of the second wallpaper image to be turned on. It should be noted that, since the type of the second wallpaper image is a multi-frame wallpaper image, the wallpaper preview interface 330 may display one frame of the second wallpaper image, which is the frame with the best display effect in the second wallpaper image. In some embodiments, the electronic device 100 can receive an operation to turn on the dynamic effect of the second wallpaper image, such as a user input operation (e.g., clicking) on the dynamic effect control 331 that is in the off state.
[0204] Furthermore, the wallpaper preview interface 320 may also include an "apply" control 322, which can be used to set the second wallpaper image as the wallpaper of the first interface. In some embodiments, after the processed second wallpaper image is displayed in the wallpaper preview interface, if an operation to set the second wallpaper image as the wallpaper of the first interface is detected, such as a user input operation (e.g., a click) on the "apply" control 322, the electronic device 100 can set the second wallpaper image as the wallpaper of the first interface and display the wallpaper setting interface 340 as shown in FIG15D. The wallpaper setting interface 340 may include the second wallpaper image 341 that has been set as wallpaper, and the second wallpaper image 341 that has been set as wallpaper may display indication information 342 indicating the type of the second wallpaper image. The indication information 342 can be used to indicate that the type of the second wallpaper image is a multi-frame wallpaper image. In some examples, the above-mentioned indication information may not be presented in the form of a superscript, but in other forms, such as text, which is not limited here. In other embodiments, after the processed second wallpaper image is displayed in the wallpaper preview interface, if an operation to return to the wallpaper processing interface is detected, the electronic device 100 can continue to process the second wallpaper image.
[0205] Figure 16 illustrates, exemplarily, the software architecture of a wallpaper setting method provided in an embodiment of this application.
[0206] It should be noted that the wallpaper setting method provided in this application embodiment can be a system capability, a software development kit (SDK) tool, a resident service, or an underlying shared object (SO) capability. This application embodiment does not limit the implementation of the wallpaper setting method in the electronic device 100.
[0207] Application layer:
[0208] The application may include system applications and third-party applications. System applications may include settings applications, theme applications, gallery applications, etc. Settings applications may include desktop and personalization settings, which can be used to provide an interactive entry point between the electronic device 100 and the user when executing the wallpaper setting method provided in this embodiment. Theme applications may include wallpaper preview and wallpaper download. The wallpaper preview function can be used to provide a wallpaper preview function for the user to preview wallpapers provided in the theme application; the wallpaper download function can be used to provide a wallpaper download function for the user to download wallpapers provided in the theme application. Gallery applications may include an image selector. The image selector can be used to provide an image selection function for the user to select an image provided in the gallery as wallpaper.
[0209] Framework layer:
[0210] The frame layer may include a wallpaper selection module, a wallpaper processing module, a wallpaper preview module, and a wallpaper setting module. The wallpaper selection module can receive a first wallpaper image selected by the user. The type of the first wallpaper image may include, but is not limited to, a single-frame wallpaper image, a multi-frame wallpaper image, or a text wallpaper image. The type of a single-frame wallpaper image may include, but is not limited to, a static image; the type of a multi-frame wallpaper image may include, but is not limited to, dynamic images or videos; and the text wallpaper image may contain text content. The wallpaper processing module can process the first wallpaper image selected by the user after the wallpaper selection module receives it. The processing methods may include, but are not limited to, one or more of the following: highlighting prominent subjects, removing imperfections, stabilizing frames, and supplementing frames. The wallpaper preview module can display the second wallpaper image after the wallpaper processing module has processed the first wallpaper image and obtained a second wallpaper image. In some embodiments, after the wallpaper preview module displays the second wallpaper image, the electronic device 100 can return to the wallpaper processing module to continue processing the second wallpaper image. In other embodiments, after the wallpaper preview module displays the second wallpaper image, the electronic device 100 can set the second wallpaper image as the wallpaper through the wallpaper setting module.
[0211] System service layer:
[0212] The system service layer may include selection capabilities, processing capabilities, preview capabilities, setting capabilities, and basic capabilities. Among these, the selection, processing, preview, and setting capabilities can provide implementation capabilities for the wallpaper selection module, wallpaper processing module, wallpaper preview module, and wallpaper setting module of the framework layer, respectively. Basic capabilities may include, but are not limited to, one or more of the following: wallpaper changing capabilities and wallpaper display capabilities.
[0213] Kernel layer:
[0214] The kernel layer can include image processing capabilities and low-level algorithm processing. Image processing capabilities can handle different types of wallpaper images, while low-level algorithm processing can include saliency detection algorithms, head detection algorithms, skeletal point detection algorithms, object detection algorithms, composition generation network algorithms, and pixel-level matting algorithms.
[0215] It should be noted that the wallpaper selection module may include a wallpaper recommendation module. For example, as shown in FIG17A, before entering the wallpaper settings interface, the electronic device 100 may display a user interface 350. This user interface 350 may include a questionnaire 351 for collecting user information. The questionnaire 351 may include one or more of the following: the user's gender, the user's age, and the user's preferred wallpaper style. This embodiment does not limit the types of user information included in the questionnaire for wallpaper settings. Furthermore, the user interface 350 may also include an "OK" control 352, which can be used to trigger the electronic device 100 to receive user information input by the user through the questionnaire. In some embodiments, the electronic device 100 may receive an operation to enter the wallpaper settings interface, such as a user input operation (e.g., a click) on the "OK" control 352. In response to this operation, the electronic device 100 may display the wallpaper settings interface 130 as shown in FIG17B. As shown in FIG17B, the wallpaper settings interface 130 may also include a recommended wallpaper section 132, which displays wallpapers recommended by the electronic device 100 based on the collected user information. For example, if the user enters "female" as their gender, "19-35 years old" as their age, and "dynamic" as their style, then the wallpapers recommended by Electronic Device 100 can include 3D static luxury style dynamic wallpapers; if the user enters "male" as their gender, "12-18 years old" as their age, and "dynamic" as their style, then the wallpapers recommended by Electronic Device 100 can include 2.5-dimensional dynamic wallpapers; if the user enters "female" as their gender, "60 years old and above" as their age, and "static" as their style, then the wallpapers recommended by Electronic Device 100 can include 2D Chinese style static wallpapers.
[0216] For example, the recommended wallpaper section can display wallpapers according to the following rules: Regarding the number of wallpapers displayed, the recommended wallpaper section can categorize and display recommended wallpapers based on the type of prominent subject in the wallpaper image, with limitations on the number of recommended wallpapers in different categories. For example, the recommended wallpaper section can categorize and display recommended wallpapers containing people and animals, where the number of person wallpapers displayed is limited to 2, with single-person wallpapers given priority; the number of animal wallpapers displayed is limited to 2, with wallpapers featuring cats taking priority over wallpapers featuring dogs. The priority of categorizing and displaying recommended wallpapers can be determined based on the number of wallpapers contained in different categories; for example, categories with more wallpapers are displayed priority over categories with fewer wallpapers. Regarding wallpaper selection, the recommended wallpaper section can filter wallpaper images with aesthetic scores higher than a preset threshold based on the above categorization. If the number of wallpaper images with aesthetic scores higher than the preset threshold in the wallpaper resource library cannot meet the required number of wallpapers in different categories for the recommended wallpaper section, then the recommended wallpaper section can prioritize selecting wallpaper images from the wallpaper resource library with aesthetic scores higher than the preset threshold to meet the required number of categories for display. These wallpaper images are deduplicated based on the time period in which the images were acquired. For example, the above-mentioned rating filtering conditions may include filtering for the highest rating in the aesthetic rating ranking, or filtering for aesthetic ratings higher than a preset rating threshold. The preset rating threshold may include a single score or multiple score levels, etc., without limitation. Based on the preset rating filtering conditions, the electronic device 100 can filter wallpaper images that meet the aesthetic rating filtering conditions, which are then designated as recommended wallpapers. Regarding wallpaper refresh, the recommended wallpaper section may no longer recommend wallpaper images deleted from the wallpaper library. Furthermore, after a user selects a recommended wallpaper, if the recommended wallpaper section has not completely traversed the wallpaper library, it may not repeatedly display previously recommended wallpapers; otherwise, it may repeatedly display previously recommended wallpapers.
[0217] It should be noted that the wallpapers displayed in the recommended wallpaper section may or may not include components such as clocks, and this application embodiment does not impose any restrictions on this.
[0218] It should be noted that the electronic device 100 can recommend wallpapers in two ways. In some embodiments, the electronic device 100 can display recommended wallpapers based on the aesthetic rating of the original images in the wallpaper library, for example, displaying recommended wallpapers from high to low based on the aesthetic rating of the original images. In other embodiments, the electronic device 100 can first process the original image, and the processing of the original image can include one or more of the following: highlighting salient subjects, removing imperfections, stabilizing frames, and supplementing frames; then, the electronic device 100 can perform an aesthetic rating on the processed wallpaper image; subsequently, the electronic device 100 can display recommended wallpapers based on the aesthetic rating of the processed wallpaper image, for example, displaying recommended wallpapers from high to low based on the aesthetic rating of the processed wallpaper image. It should be noted that if the electronic device 100 recommends wallpapers in this way, after detecting the operation of selecting a recommended wallpaper, the electronic device 100 may no longer process the recommended wallpaper selected by the user, but directly display the recommended wallpaper on the wallpaper preview interface.
[0219] Figure 18 illustrates, by way of example, the specific flow of a wallpaper recommendation method provided in an embodiment of this application.
[0220] As shown in Figure 18, the method may include:
[0221] S301. Determine if recommended wallpapers exist in the data cache.
[0222] S302a. Retrieve recommended wallpapers from the data cache.
[0223] S302b: Return recommended wallpapers to the wallpaper recommendation module.
[0224] Specifically, the wallpaper recommendation module (i.e. the aforementioned recommended wallpaper section) can determine whether there are recommended wallpapers in the data cache. If so, the wallpaper recommendation module can directly retrieve the recommended wallpapers from the data cache for display.
[0225] S303a: Obtain original images from the media database whose aesthetic scores are higher than a preset threshold.
[0226] Specifically, if no recommended wallpapers are found in the data cache, the wallpaper recommendation module can retrieve original images with aesthetic scores higher than a preset threshold from the media database. Optionally, after retrieving original images with aesthetic scores higher than the preset threshold, the wallpaper recommendation module can display recommended wallpapers based on the aesthetic scores of the original images, for example, displaying recommended wallpapers from high to low aesthetic scores. After displaying recommended wallpapers, the wallpaper recommendation module can store the recommended original images in the data cache for use the next time wallpapers are recommended.
[0227] S303b: Notify the composition engine to process the acquired raw image.
[0228] S303c: Process the original image and return recommended wallpapers to the wallpaper recommendation module.
[0229] S304, Show recommended wallpapers.
[0230] S305. Store the recommended wallpapers in the data cache.
[0231] In some embodiments, after acquiring an original image with an aesthetic score higher than a preset threshold, the wallpaper recommendation module can notify the composition engine to process the acquired original image. The composition engine can then process the original image and return the processed recommended wallpaper to the wallpaper recommendation module. The processing of the original image can include one or more of the following: highlighting salient subjects, removing imperfections, stabilizing frames, and supplementing frames. Optionally, after acquiring the processed recommended wallpaper, the wallpaper recommendation module can perform an aesthetic score on the processed recommended wallpaper. The wallpaper recommendation module can then display recommended wallpapers based on their aesthetic scores, for example, displaying recommended wallpapers from high to low aesthetic scores. After displaying the recommended wallpaper, the wallpaper recommendation module can store the processed recommended wallpaper in a data cache for use the next time wallpaper is recommended.
[0232] It should be noted that the algorithm model used to obtain the metadata of salient subjects comes from the AI engine. This AI engine encapsulates head (human or animal head) detection and skeletal point detection capabilities. The AI engine can provide corresponding interfaces for the application-side graphing engine to call in real time, enabling the graphing engine to obtain the metadata of salient subjects (such as head information, facial information, skeletal point information, etc.). It is understandable that the interface in the AI engine for external application-side graphing engines to call can be different from the interface for internal calls within the AI engine.
[0233] The AI engine's interface for head (human or animal head) detection is `int detect(PixelMap image, int ListheadResult)`. The `PixelMap image` parameter can be the image data input by the user, and the `ListheadResult` parameter can be a list of head information. The interface returns an integer value representing the number of heads (human or animal heads), which can be interpreted as the number of salient subjects. This number can be used by electronic devices to change how salient subjects are displayed in wallpaper images. Furthermore, the `detect` method calls the `int init()` method to initialize the engine when head detection begins and calls the `int release()` method to release resources after head detection ends.
[0234] Table 1
[0235] In this example, Table 1 shows the field descriptions for headResult.
[0236] The interface for skeletal point detection in the AI engine can be set to int detect(PixelMap image, int List). <keypoint>(keypointResult), where the parameter PixelMap image can be the image data input by the user, and the parameter List <keypoint>`keypointResult` can be a list of skeletal point information, and the integer value returned by this interface can be the number of skeletal points. Since the skeletal point information includes head skeletal points, this result can be used by electronic devices 100 to combine the number of heads obtained from head detection to determine metadata such as facial information and facial features, further changing the display method of prominent subjects in the wallpaper image. Furthermore, the `detect` method calls the `int init()` method to initialize the engine when skeletal point detection starts, and calls the `int release()` method to release resources after skeletal point detection ends.
[0237] Table 2
[0238] In this example, Table 2 shows the field descriptions for keypointResult.
[0239] After obtaining metadata such as head information and bone point information by calling the above head detection interface and bone point detection interface, the metadata such as head information and bone point information can be stored in the following two media database tables.
[0240] Table 3
[0241] In this example, Table 3 is named tab_analysis_head, and it stores the header information obtained after calling the above header detection interface.
[0242] Table 4
[0243] In this example, Table 4 is named tab_analysis_pose, and it stores the skeletal point information obtained after calling the skeletal point detection interface mentioned above.
[0244] It should be noted that in scenarios where wallpaper images are processed in the background, such as during charging or when the screen is off, the composition engine in the electronic device 100 can select and process wallpaper images by calling the AI engine. The results obtained after processing the wallpaper images through target (i.e., salient subject) detection algorithms, recommendation composition algorithms (i.e., composition generation network algorithms, used to determine the display method after changes to salient subjects that are not people or animals), and pixel-level matting algorithms (algorithms used to extract salient subjects from wallpaper images) can be stored in the following three media database tables.
[0245] Table 5
[0246] In this example, Table 5 is named tab_analysis_object, and it stores the results obtained after calling the object detection algorithm described above.
[0247] Table 6
[0248] In this example, Table 6 is named tab_analysis_recommendation, and it stores the results obtained after calling the above-described graph generation network algorithm. The different graph recommendation types mentioned above could be, for example, landscape and portrait modes for tablets, or the merged and unfolded states for foldable screens.
[0249] Table 7
[0250] In this example, Table 7 is named tab_analysis_segmentation, and it stores the results obtained after calling the pixel-level segmentation algorithm described above.
[0251] Based on the embodiments of this application, the composition of wallpaper images containing salient subjects of the type of people or animals changes before and after wallpaper processing, and the factors influencing the change in the composition of the wallpaper image include, but are not limited to, one or more of the following: the type of salient subject, the number of salient subjects, the metadata type of the salient subject, and the distance between multiple salient subjects; the composition of wallpaper images containing salient subjects of the type of non-people or animals (e.g., plants, landscapes, food, buildings) changes before and after wallpaper processing, and the factors influencing the change in the composition of the wallpaper image include, but are not limited to, one or more of the following: the scene of the wallpaper image, the salient subjects in the scene, and compositional elements other than the salient subjects; clock components, application icons, folder icons, as suggested. Components such as cards, application cards, and weather cards will avoid the prominent subject in the wallpaper image, and the display method of the components (such as position, brightness, color, transparency, depth of field effect, blur effect, shadow effect, degree of occlusion of the prominent subject, size, etc.) will change; in the wallpaper image, the prominent subject and components can be located on different layers, and the prominent subject and other compositional elements can be located on different layers; the background of the wallpaper image other than the prominent subject can be changed, and the prominent subject can be extracted from the original wallpaper image and placed into a wallpaper image with a different background for composition; one or more operations such as shifting, scaling (i.e., shrinking or enlarging), and cropping can be performed on the prominent subject to highlight the prominent subject in the wallpaper image.
[0252] This application also provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it can implement the steps performed by the electronic device in the above method embodiments, or the steps performed by the human-computer interaction module and the computing module.
[0253] This application also provides a computer program product that, when run on a terminal device, enables the terminal device to perform the steps executed by the electronic device in the above method embodiments.
[0254] This application also provides a chip system, which includes a processor coupled to a memory. The processor executes a computer program stored in the memory to implement the steps performed by the electronic device in any of the method embodiments of this application. The chip system can be a single chip or a chip module composed of multiple chips.
[0255] The term "user interface (UI)," or simply "interface," used in the specification and accompanying drawings of this application, refers to the medium through which an application or operating system interacts and exchanges information with the user. It facilitates the conversion between the internal form of information and a form acceptable to the user. The user interface of an application is written in source code using specific computer languages such as Java or Extensible Markup Language (XML). This source code is parsed and rendered on the terminal device, ultimately presenting user-recognizable content, such as images, text, and buttons. Controls, also known as widgets, are the basic elements of the user interface. Typical controls include toolbars, menu bars, text boxes, buttons, scroll bars, images, and text. The attributes and content of controls in the interface are defined using tags or nodes, such as XML tags. <textview> 、 <imgview> 、 <videoview>Nodes define the controls contained in the interface. A node corresponds to a control or property in the interface, and after parsing and rendering, the node is presented as the content visible to the user. In addition, many applications, such as hybrid applications, often contain web pages within their interfaces. A web page, also known as a webpage, can be understood as a special control embedded in the application interface. Web pages are source code written in a specific computer language, such as Hypertext Markup Language (HTML), Cascading Style Sheets (CSS), JavaScript (JS), etc. Web page source code can be loaded and displayed as user-readable content by a browser or a web page display component with browser-like functionality. The specific content contained in a webpage is also defined through tags or nodes in the webpage source code; for example, HTML uses tags or nodes to define the content. 、 、 <video> 、 <canvas>Used to define the elements and attributes of a webpage.
[0256] The most common form of user interface is the graphical user interface (GUI), which refers to a user interface related to computer operation displayed graphically. It can be an icon, window, control, or other interface element displayed on the screen of an electronic device. Controls can include visual interface elements such as icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, and widgets.
[0257] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit it. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
[0258] It should be understood that in the various embodiments of this application, the order of the above-mentioned processes does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0259] As used in the above embodiments, depending on the context, the term "when..." can be interpreted as meaning "if..." or "after..." or "in response to determining..." or "in response to detecting...". Similarly, depending on the context, the phrase "when determining..." or "if (the stated condition or event) is detected" can be interpreted as meaning "if determining..." or "in response to determining..." or "when (the stated condition or event) is detected" or "in response to detecting (the stated condition or event)".
[0260] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state drive), etc.
[0261] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. This program can be stored in a computer-readable storage medium, and when executed, it can include the processes described in the above method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM or random access memory (RAM), magnetic disks, or optical disks.< / canvas> < / video> < / videoview> < / imgview> < / textview> < / keypoint> < / keypoint>
Claims
1. An image processing method applied to a first electronic device, characterized in that, The method includes: Obtain a first wallpaper image, wherein the compositional elements of the first wallpaper image include one or more objects, the one or more objects include a first element, and the first element in the first wallpaper image is a first display mode; A second wallpaper image is obtained based on the first wallpaper image, wherein the first element in the second wallpaper image is a second display mode, and the second display mode is different from the first display mode; The first interface is displayed, which includes the second wallpaper image and one or more components. The first interface is a desktop, a lock screen, or an Always-On Display (AOD) interface. The one or more components include a first component, which is displayed in a third mode on the first interface. The third display mode is different from the preset display mode of the first component.
2. The method according to claim 1, characterized in that, Before acquiring the first wallpaper image, the method further includes: Display the wallpaper settings interface; The selected first wallpaper image is displayed in the wallpaper settings interface.
3. The method according to claim 1 or 2, characterized in that, The display method of the first element includes one or more of the following: the position of the element, the size of the element, and the completeness of the element.
4. The method according to any one of claims 1-3, characterized in that, The one or more objects further include a second element, and prior to obtaining the second wallpaper image based on the first wallpaper image, the method further includes: Based on the spacing between the first element and the second element, the first position of the first element in the first display mode is adjusted to the second position of the first element in the second display mode; And / or, Based on the spacing between the first element and the second element, the first size of the first element in the first display mode is adjusted to the second size of the first element in the second display mode; And / or, Based on the spacing between the first element and the second element, the first degree of completeness of the first element in the first display mode is adjusted to the second degree of completeness of the first element in the second display mode.
5. The method according to any one of claims 1-4, characterized in that, Factors influencing the adjustment of the display method of the first element include one or more of the following: head information, face information, and skeletal point information. The method further includes: The position of the first element in the second display mode is determined based on one or more of the head information, face information, and skeletal point information of the first element in the first wallpaper image; And / or, The size of the first element in the second display mode is determined based on one or more of the head information, face information, and skeletal point information of the first element in the first wallpaper image; And / or, The completeness of the first element in the second display mode is determined based on one or more of the head information, face information, and skeletal point information of the first element in the first wallpaper image.
6. The method according to any one of claims 1-5, characterized in that, The display method of the first component includes one or more of the following: the position of the component, the brightness of the component, the color of the component, the transparency of the component, the depth relationship between the component and the first element, the degree of occlusion of the component on the first element, and the size of the component.
7. The method according to claim 6, characterized in that, The third display method includes the position of the first component, the position of which is determined based on the position of the first element in the second wallpaper image; and / or, The third display method includes the brightness of the first component, the brightness of the first component being determined based on the color of the second wallpaper image; and / or, The third display method includes the color of the first component, the color of the first component being determined based on the color of the first element; and / or, The third display method includes the transparency of the first component, the transparency of the first component being determined based on the degree to which the first component occludes the first element; and / or, The third display method includes the depth relationship between the first component and the first element, which is determined based on the degree of occlusion of the first component on the first element.
8. The method according to claim 7, characterized in that, In the third display mode, the degree of occlusion of the first element by the first component is lower than that in the preset display mode.
9. The method according to any one of claims 1-8, characterized in that, Factors influencing the adjustment of the display method of the first component include one or more of the following: head information, facial information, and the method further includes: The position of the first component in the third display mode is determined based on the head information and / or face information of the first element in the first wallpaper image; And / or, The size of the first component in the third display mode is determined based on the head information and / or face information of the first element in the first wallpaper image.
10. The method according to any one of claims 1-9, characterized in that, The first wallpaper image is a single-frame wallpaper image or at least one of multiple wallpaper images.
11. An electronic device, characterized in that, The electronic device includes a processor and a memory; wherein the memory is coupled to the processor and is used to store a computer program that, when executed by the processor, causes the electronic device to perform the method as described in any one of claims 1-10.
12. A computer storage medium, characterized in that, The computer storage medium stores a computer program that, when executed by a processor, causes the electronic device to perform the method as described in any one of claims 1-10.
13. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it causes the electronic device to perform the method as described in any one of claims 1-10.
Citation Information
Patent Citations
Desktop application icon display method, electronic equipment and storage medium
CN115079899A
Method for generating theme wallpaper and electronic equipment
CN115658191A
Method for generating theme wallpaper and electronic equipment
CN116627560A
Wallpaper display method and electronic equipment
CN118349153A
Method and device for dynamically displaying icon according to background image
WO2019095392A1