Wallpaper generation method and device, terminal equipment and storage medium
By performing object segmentation processing on images on terminal devices, wallpapers are generated for always-on display, lock screen, and desktop scenarios. This solves the problems of high wallpaper design costs and difficulty in user customization in existing technologies, achieving the effect of low-cost and rapid generation of coherent wallpapers.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-12
- Publication Date
- 2026-03-17
AI Technical Summary
In existing technologies, generating wallpaper designs for different terminal device scenarios is costly and users cannot customize them, resulting in limited choices and a poor user experience.
By acquiring the first and second images, object segmentation is performed to generate wallpapers for always-on screen, lock screen, and desktop scenarios. The image subject segmentation technology is used to separate the object from the background, and a coherent wallpaper is generated based on the segmented images and the original images.
It enables low-cost and rapid generation of wallpapers for different scenarios, meets users' customization needs, and improves user experience.
Smart Images

Figure CN121680985A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of terminal devices, and more particularly to a method, apparatus, terminal device, and storage medium for generating wallpapers. Background Technology
[0002] Different wallpapers can provide users with different experiences when using terminal devices. Users can not only choose wallpapers of different styles and themes from the system, but also customize them by setting their own photos or artwork as wallpapers. This personalized approach makes the user's terminal device interface more unique and interesting.
[0003] Themed wallpapers for mobile devices can be applied to always-on display, lock screen, and desktop scenarios. One possible implementation is to customize the wallpaper for the lock screen and desktop, thus satisfying different users' personalized needs for mobile phone themes. In this process, how to quickly generate wallpapers for different scenarios based on custom images is a pressing issue that needs to be addressed. Summary of the Invention
[0004] This application provides a method, apparatus, terminal device, and storage medium for generating wallpapers, which are used to quickly generate wallpapers for different scenes based on a first image and a second image.
[0005] The first aspect of this application provides a method for generating wallpaper, which may include: acquiring a first image and a second image; performing object segmentation processing on the first image to obtain a first segmented image and a second segmented image, wherein the first image includes an object element display area and a background element display area, the first segmented image includes the content of the object element display area, and the second segmented image includes the content of the background element display area; generating a wallpaper corresponding to a target scene based on at least one of the first segmented image, the second segmented image, and the second image, wherein the target scene includes at least one of a screen-off scene, a lock screen scene, and a desktop scene.
[0006] A second aspect of this application provides an apparatus for generating wallpaper, comprising:
[0007] The acquisition module is used to acquire the first image and the second image;
[0008] The processing module is used to perform object segmentation processing on the first image to obtain a first segmented image and a second segmented image. The first image includes an object element display area and a background element display area. The first segmented image includes the content of the object element display area, and the second segmented image includes the content of the background element display area. Based on the first segmented image, the second segmented image, and at least one of the second image, a wallpaper corresponding to a target scene is generated. The target scene includes at least one of a screen-off scene, a lock screen scene, and a desktop scene.
[0009] A third aspect of this application provides a terminal device including a memory and a processor, wherein the memory stores a computer program executable on the processor, and the terminal device executes the program to implement the method described in the first aspect of this application.
[0010] A fourth aspect of this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described in the first aspect of this application.
[0011] The fifth aspect of this application provides a chip including a computer program that, when executed by a processor, implements the method described in the first aspect of this application.
[0012] Another aspect of this application discloses a computer program product that, when run on a computer, causes the computer to execute the method described in the first aspect of this application.
[0013] Another aspect of this application discloses an application publishing platform for publishing computer program products, wherein when the computer program product is run on a computer, the computer executes the method described in the first aspect of this application.
[0014] As can be seen from the above technical solutions, the embodiments of this application have the following advantages:
[0015] In this embodiment, a first image and a second image are obtained; the first image is segmented to obtain a first segmented image and a second segmented image. The first image includes an object element display area and a background element display area, the first segmented image includes the content of the object element display area, and the second segmented image includes the content of the background element display area. Based on the first segmented image, the second segmented image, and at least one of the second images, a wallpaper corresponding to a target scene is generated. The target scene includes at least one of a screen-off scene, a lock screen scene, and a desktop scene. Because the wallpaper corresponding to the target scene is generated based on the first segmented image, the second segmented image, and at least one of the second images, and the first and second segmented images are obtained by segmenting the obtained first image, this embodiment can quickly generate wallpapers for different scenes based on user-defined first and second images. Attached Figure Description
[0016] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments and the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application, and other drawings can be obtained based on these drawings.
[0017] Figure 1 This is a schematic diagram of one embodiment of the method for generating wallpapers in this application.
[0018] Figure 2A This is a schematic diagram of the first image obtained in an embodiment of this application;
[0019] Figure 2B This is a schematic diagram of a second image obtained in an embodiment of this application;
[0020] Figure 2C This is a schematic diagram illustrating the object segmentation process performed on the first image in this embodiment of the application to obtain the first segmented image;
[0021] Figure 2D This is a schematic diagram illustrating the object segmentation process performed on the first image in this embodiment of the application to obtain the second segmented image;
[0022] Figure 2E This is a schematic diagram of the overlay display of the second segmented image in an embodiment of this application;
[0023] Figure 2F This is a schematic diagram of the overlay display of the second segmented image in an embodiment of this application;
[0024] Figure 3A This is a schematic diagram showing the default sequential order of wallpaper scenes in an embodiment of this application;
[0025] Figure 3B This is a schematic diagram illustrating the user's selection of a sequential order of wallpaper scenes in an embodiment of this application.
[0026] Figure 3C This is a schematic diagram illustrating a user's target option for selecting a sequential order of wallpaper scenes in an embodiment of this application.
[0027] Figure 3D This is a schematic diagram showing the default sequential order of wallpaper scenes in an embodiment of this application;
[0028] Figure 3E This is a schematic diagram illustrating the user's selection of a sequential order of wallpaper scenes in an embodiment of this application.
[0029] Figure 3F This is a schematic diagram illustrating a user's target option for selecting a sequential order of wallpaper scenes in an embodiment of this application.
[0030] Figure 3G This is a schematic diagram of the wallpaper corresponding to the screen-off scene in the embodiments of this application;
[0031] Figure 3H This is a schematic diagram of the wallpaper corresponding to the lock screen scene in this application embodiment;
[0032] Figure 4 This is a schematic diagram of another embodiment of the method for generating wallpapers in this application;
[0033] Figure 5A This is a schematic diagram of the continuous wallpaper from the always-on screen scene, the lock screen scene to the desktop scene in the embodiments of this application;
[0034] Figure 5B This is a schematic diagram of the continuous wallpaper from the desktop scene, lock screen scene to the screen-off scene in the embodiments of this application;
[0035] Figure 5C This is a schematic diagram of the continuous wallpaper displayed from the always-on display scene to the lock screen scene in the embodiments of this application;
[0036] Figure 5D This is a schematic diagram of the continuous wallpaper displayed from the always-on display scene to the lock screen scene in the embodiments of this application;
[0037] Figure 6 This is a schematic diagram of one embodiment of a wallpaper generation apparatus according to the present application.
[0038] Figure 7A This is a schematic diagram of one embodiment of the terminal device in this application;
[0039] Figure 7B This is a schematic diagram of another embodiment of the terminal device in this application. Detailed Implementation
[0040] This application provides a method, apparatus, terminal device, and storage medium for generating wallpapers, which are used to quickly generate wallpapers for different scenes based on a first image and a second image.
[0041] To enable those skilled in the art to better understand the present application, the technical solutions of the embodiments of the present application will be described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. All embodiments based on the present application should fall within the scope of protection of the present application.
[0042] The following is a brief explanation of some of the terms used in this application:
[0043] 1. Image Subject Segmentation: Image subject segmentation refers to the technical ability to separate the main object in an image from the background or other objects. This technique is widely used in the field of computer vision and can be implemented through various algorithms, such as SAM (Segment Anything Model) and U-Net. These algorithms can identify and generate masks of specific objects from an image, thereby achieving high-precision segmentation of the main object in the image.
[0044] 2. Turn-off screen scenario:
[0045] Normally, screen-off mode refers to completely turning off the display screen of a terminal device to save power and reduce screen wear. In screen-off mode, the terminal device does not display any content, but background programs and processes may still be running. Users can turn off the screen by pressing the power button or waiting for the terminal device to automatically enter screen-off mode. In screen-off mode, the terminal device typically does not respond to touch or button operations, except for the power button or specific wake-up functions. However, with the continuous improvement and development of terminal device functions, some terminal devices now support screen-on display in screen-off mode. For example, in screen-off mode, the time, date, remaining battery percentage, or other images and text can be displayed, although the brightness may not be very high. The embodiments of this application described below are based on scenarios where screen-on display is supported in screen-off mode.
[0046] 3. Lock Screen Scenario:
[0047] Locking the screen refers to locking a device to prevent unauthorized users from accessing its functions and data. The lock screen typically displays basic information such as the time, date, and notification icons, but does not show the content of the home screen. Users can protect the lock screen by setting security measures such as passwords, patterns, facial recognition, or fingerprints. In a locked screen scenario, the device responds to touch input, but the user needs to unlock it to access the home screen and other functions. Locking the screen can be triggered by pressing the power button, pressing the home button, or removing the device from a pocket.
[0048] 4. Desktop (Home Screen / Home Page) scenario:
[0049] The desktop refers to the main screen of a terminal device, displaying application icons, widgets, and shortcuts. Users can access and manage applications and perform daily operations and tasks through the desktop. The desktop interface can be personalized according to user preferences and settings, such as changing the wallpaper, adding or deleting icons, etc. The desktop is the main interface for users to interact with the terminal device, and it is usually displayed after the terminal device is unlocked.
[0050] 5. Single Take: In film or video production, a "single take" refers to shooting an entire scene or video in one continuous shot, without editing or segmentation. This technique creates a smooth and coherent visual effect, providing the audience with an immersive experience. In cinematography, a "single take" might refer to shooting an entire scene or a series of shots using a single lens, without changing lenses or adjusting the composition. Both techniques emphasize continuity and integrity, creating a smooth and seamless experience.
[0051] 6. Seamless wallpaper transition from always-on display to lock screen to desktop: In each transition from always-on display to lock screen to desktop, the same visual elements are transformed using animation effects to create a smooth and continuous live wallpaper.
[0052] In some technical solutions, continuous wallpapers are designed with three different effects for a specific element across three scenes: desktop, lock screen, and always-on display. For example, the always-on display might show a close-up of the soil on a planet, the lock screen wallpaper might show a zoomed-out photo of the planet, and the desktop display might show a rotated version of the planet. By transitioning from always-on to lock screen, the soil close-up animation shrinks to the planet, and the planet rotates to the other side, a continuous display effect of the same element is created, presented seamlessly across all three interfaces. However, designing such a wallpaper is extremely costly. A complete set of wallpapers needs to be designed separately, including the always-on display, lock screen, and desktop effects, as well as the animation transitions between each interface. Each wallpaper set requires a completely new design, which is expensive, complex, and time-consuming. Furthermore, almost all the presentation effects are determined by the designer during the design phase, preventing users from customizing the displayed wallpaper and style. Moreover, due to the high cost, the quantity of these wallpapers is limited, offering users fewer choices.
[0053] In this embodiment, users can customize and select their favorite photos to quickly generate wallpapers for different scenarios. This not only reduces costs but also meets users' preferences and improves their experience.
[0054] In the embodiments of this application, the terminal device may be a mobile phone, a tablet computer, a computer with wireless transceiver capabilities, a virtual reality (VR) terminal device, an augmented reality (AR) terminal device, a wireless terminal device in industrial control, a wireless terminal device in self-driving, a wireless terminal device in remote medical care, a wireless terminal device in a smart grid, a wireless terminal device in transportation safety, a wireless terminal device in a smart city, or a wireless terminal device in a smart home, etc.
[0055] By way of example and not limitation, in this embodiment, the terminal device can also be a wearable device. Wearable devices, also known as wearable smart devices, are a general term for devices that utilize wearable technology to intelligently design and develop everyday wearables, such as glasses, gloves, watches, clothing, and shoes. Wearable devices are portable devices that are worn directly on the body or integrated into the user's clothing or accessories. Wearable devices are not merely hardware devices, but also achieve powerful functions through software support, data interaction, and cloud interaction. Broadly speaking, wearable smart devices include those that are feature-rich, large in size, and can achieve complete or partial functions without relying on a smartphone, such as smartwatches or smart glasses, as well as those that focus on a specific type of application function and require the use of other devices such as smartphones, such as various smart bracelets and smart jewelry for vital sign monitoring.
[0056] The technical solution of this application will be further described below by way of embodiments, such as... Figure 1 The diagram shown is a schematic representation of an embodiment of the method for generating wallpapers in this application, which may include:
[0057] 101. Obtain the first image and the second image.
[0058] In one optional implementation, obtaining the first image and the second image may include, but is not limited to, the following implementation methods:
[0059] Receive a first and a second image sent by another electronic device; or,
[0060] Trigger the photo-taking action, activate the camera, and take a picture to obtain the first and second images; or...
[0061] The download operation is triggered to download the first and second images from the server.
[0062] If no photos are saved on the current terminal device, or if the user is not satisfied with the photos saved on the current terminal device, the user can receive a first image and a second image sent by other electronic devices (such as other mobile phones, cameras, computers, etc.), or the first image and second image can be obtained by taking a picture through a camera, or the first image and second image can be downloaded from a server, or other acquisition methods can be used. This application embodiment does not limit the methods. For example, as shown... Figure 2A The image shown is a schematic diagram of a first image obtained in an embodiment of this application. Figure 2B The image shown is a schematic diagram of a second image obtained according to an embodiment of this application. This technical solution provides several methods for obtaining the first and second images, improving the feasibility of the solution.
[0063] In one alternative implementation, if the user is not satisfied with the photo currently saved on the terminal device, they may need to edit it to obtain a first image and / or a second image. Therefore, obtaining the first and second images may include: in the image library, responding to the user's first selection operation, obtaining a selected third image; responding to the user's first editing operation, editing the selected third image to obtain the first image; and / or, in the image library, responding to the user's second selection operation, obtaining a selected fourth image; responding to the user's second editing operation, editing the selected fourth image to obtain the second image.
[0064] For example, the first and second editing operations here may include cropping, rotating and flipping, resizing, color adjustment, exposure adjustment, white balance, sharpening and blurring, filter application, blemish removal, red-eye correction, adding text and graphics, layers and masks, compositing, perspective and deformation, high dynamic range (HDR) imaging, noise reduction, portrait retouching, creative effects, etc., and this application embodiment does not limit these.
[0065] Cropping: Used to adjust the composition of a photo and remove unwanted edges.
[0066] Rotate and Flip: Used to rotate photos to correct the horizon or change the perspective, or to flip photos horizontally / vertically.
[0067] Resize: Used to change the resolution and size of a photo.
[0068] Color adjustment: Used to adjust brightness, contrast, saturation, hue, and color temperature, etc.
[0069] Exposure adjustment: Used to correct overexposed or underexposed photos and improve details in highlights and shadows.
[0070] White balance: Used to adjust the color temperature of a photo to correct or simulate different lighting conditions.
[0071] Sharpening and blurring: Used to enhance the details of a photo or apply blur effects, such as depth of field.
[0072] Filter Application: Used to apply different filter effects, such as black and white, retro, cool / warm tones, etc.
[0073] Remove blemishes: Used to remove smudges, blemishes, or unwanted objects from photos using the repair tool.
[0074] Red-eye correction: Used to correct red-eye caused by flash during shooting.
[0075] Add text and graphics: Used to add text descriptions, titles, or graphic elements to photos.
[0076] Layers and Masks: Used for complex editing operations with layers, and masks to hide or show specific areas.
[0077] Perspective and Distortion: Used to adjust the perspective of a photograph, straightening or distorting elements.
[0078] High dynamic range: Used to merge photos with different exposures to obtain a wider dynamic range.
[0079] Noise reduction: Used to reduce noise generated when shooting in low-light environments.
[0080] Portrait retouching: Used to enhance portrait photos by smoothing skin, slimming faces, brightening eyes, and other beautifying effects.
[0081] Creative effects: Used to apply various creative effects, such as painting effects, sketching, oil painting, etc.
[0082] In this technical solution, if a user is not satisfied with an existing photo, they can edit it to obtain a first image and / or a second image, thereby obtaining a photo that satisfies the user and improving the user experience; and the editing operation may include, but is not limited to, the editing operations described above, and this application embodiment does not make specific limitations.
[0083] In one alternative implementation, the first image is an image whose area, including the display area of the object elements, is greater than an area threshold.
[0084] In this technical solution, if the area of the object element display region in the first image is greater than the area threshold, segmentation processing is performed, resulting in a first segmented image and a second segmented image with a visually clear contrast. This is because the second wallpaper is generated based on the second segmented image and the second image. When the area of the object element display region is greater than or equal to the area threshold, the silhouette effect of the generated second wallpaper is very good. Therefore, the final effect of generating a continuous wallpaper is better.
[0085] Image content can be of, but is not limited to, some of the following common image content types:
[0086] Natural Scenery: Images showcasing natural landscapes such as mountains, forests, rivers, and beaches.
[0087] Cityscape: Images containing city skylines, streets, buildings, and scenes of urban life.
[0088] Portrait: A picture that focuses on showing a person's facial features and expressions; it can be formal or casual.
[0089] Object photography: Images that are close-ups or showcase specific objects, such as cars, electronic products, food, etc.
[0090] Animal photography: Showcasing images of wild animals, pets, farm animals, and more.
[0091] Abstract art: Images that express concepts through color, shape, and texture, rather than relying on real-world objects.
[0092] Textures and Patterns: Displays images with repeating patterns, texture effects, or geometric shapes.
[0093] Still life: A carefully arranged composition of static objects, often used in art and commercial photography.
[0094] Sports and Events: Capture moments from sporting events, dance performances, or other activities.
[0095] Night Scenes: Images showcasing city lights, starry skies, or other nighttime scenes.
[0096] Underwater photography: Images taken in underwater environments, showcasing marine life, divers, and more.
[0097] Aerial photography: Images of the ground or buildings taken from an aircraft or drone.
[0098] Documents and text: Images containing text, charts, tables, and other information, such as scanned documents or book pages.
[0099] Comics and illustrations: hand-drawn or digitally drawn images, often used to tell a story or express humor.
[0100] Infographics: Images and text combined to explain complex information or data.
[0101] 3D rendering: Images created using 3D modeling software to showcase fictional objects or scenes.
[0102] User interface design: Images showcasing websites, applications, or other digital interfaces.
[0103] Medical images, such as X-rays, nuclear magnetic resonance (MRI) images, and computed tomography (CT) scans, are used for medical diagnosis.
[0104] Satellite imagery: Images of the Earth's surface taken from space, used for Geographic Information Systems (GIS) and other scientific analyses.
[0105] Artworks: Images showcasing paintings, sculptures, or other art forms.
[0106] Daily Life: Photos that record everyday scenes and activities, such as family gatherings and trips.
[0107] Each type of image has its specific purpose and audience, ranging from artistic expression to scientific research, from commercial advertising to personal memory recording. With the development of digital photography and image editing technologies, image types and styles have become increasingly diverse.
[0108] 102. Perform object segmentation processing on the first image to obtain a first segmented image and a second segmented image. The first image includes an object element display area and a background element display area. The first segmented image includes the content of the object element display area, and the second segmented image includes the content of the background element display area.
[0109] Object segmentation here refers to subject segmentation in images. Subject segmentation is an important task in computer vision and image processing, involving separating a specific object (the subject) from its background in an image. This technology has applications in various fields, including photography, video editing, augmented reality, and autonomous driving. Below are some techniques and methods for achieving subject segmentation in images:
[0110] Threshold-based segmentation: Using pixel intensity or color value as a threshold, the subject is distinguished from the background.
[0111] Edge detection: Finds the outline of an object by identifying significant changes in pixel intensity in an image.
[0112] Region growing: Starting from the seed point, pixels with similar attributes are merged and gradually expanded to the entire subject.
[0113] Watershed algorithm: Treats the image as a topographic map and segments different regions of the image by simulating water flow.
[0114] Graph-based segmentation: Transforms an image into a graph structure, where pixels are nodes, and segments it using minimum cut or maximum flow algorithms.
[0115] Machine learning and deep learning: These methods train models using training datasets to automatically identify and segment subjects in images. Deep learning methods, such as Convolutional Neural Networks (CNNs), excel in image segmentation tasks.
[0116] GrabCut algorithm: A graph cut-based segmentation method that distinguishes foreground and background by iteratively optimizing the energy function.
[0117] Superpixel segmentation: Dividing an image into superpixels, which are larger units than pixels and have similar colors and textures.
[0118] Conditional random field (CRF): A probabilistic model that considers the relationships between pixels to segment images in a consistent manner.
[0119] U-Net and Mask R-CNN (Mask Region-based Convolutional Neural Network, a deep learning model for object detection and instance segmentation): These are deep learning models, particularly suitable for medical image segmentation and instance segmentation, capable of recognizing and segmenting multiple objects simultaneously.
[0120] Interactive segmentation: Combines automated tools with user input to accurately segment images, allowing users to manually adjust the segmentation results.
[0121] Semantic segmentation: It not only identifies and segments the main subject, but also identifies all objects and scene elements in an image.
[0122] Instance segmentation: Identify each individual object instance in an image and segment it from other objects and the background.
[0123] The challenge of image subject segmentation lies in handling varying lighting conditions, occlusion, object shape variations, and background complexity. With technological advancements, particularly the application of deep learning in image segmentation, both accuracy and efficiency have significantly improved. The methods described above for image subject segmentation can meet diverse user needs in various scenarios.
[0124] It is understood that in the first segmented image, the transparency of the object element display area is 1, and the transparency of the background element display area is 0; in the second segmented image, the transparency of the background element display area is 1, and the transparency of the object element display area is 0.
[0125] In this technical solution, the transparency of the display areas of object elements and background elements in the first and second segmented images is specifically explained, which can more intuitively demonstrate the effect of object segmentation processing.
[0126] For example, a user provides two images, and the terminal device performs object segmentation processing on them. One image is image A, containing a large area of object elements (also called the main subject); the other image is another image selected by the user, called image B. After segmenting image A, image C (e.g., the object elements segmented from image A, with transparent background elements, i.e., the background element opacity is 0) and image D (e.g., after segmenting the object elements from image A, only the background remains, with transparent object elements, i.e., the object element opacity is 0). Figure 2C The diagram shown illustrates the process of segmenting a first image into a first segmented image, as described in an embodiment of this application. The first segmented image is an image where the target object is opaque and the background is transparent. Figure 2D The diagram shown illustrates the process of segmenting a first image into a second segmented image, as described in an embodiment of this application. The second segmented image is an image where the target object is transparent and the background is opaque.
[0127] In one optional implementation, the method further includes: responding to a user's adjustment operation on the transparency of the display area of object elements in the first segmented image, obtaining the adjusted transparency of the display area of object elements in the first segmented image, such that the adjusted transparency of the display area of object elements in the first segmented image is greater than 0 and less than 1.
[0128] In this technical solution, the transparency of the display area of the object element in the first segmented image can also be adjusted according to the user's actual needs, so that the adjusted first segmented image can be superimposed on the second segmented image and the second image to obtain a better superimposed silhouette effect.
[0129] In one optional implementation, the method further includes: responding to a user's adjustment operation on the transparency of the display area of object elements in the second segmented image, obtaining the adjusted transparency of the display area of object elements in the second segmented image, such that the adjusted transparency of the display area of object elements in the second segmented image is greater than 0 and less than 1.
[0130] In this technical solution, the transparency of the display area of the object element in the second segmented image can also be adjusted according to the user's actual needs, so that the adjusted second segmented image can be superimposed on the second image to obtain a better superimposed silhouette effect.
[0131] In one optional implementation, the display parameters of the object element display area and the background element display area are different in the first segmented image; the display parameters of the object element display area and the background element display area are different in the second segmented image; wherein, the display parameters include at least one of brightness, color, white balance, and filter.
[0132] For example, after segmenting the first image to obtain a first segmented image and a second segmented image, parameters such as brightness, color, white balance, and filters of the first and second segmented images can be adjusted. In this technical solution, the effect of object segmentation can be highlighted by using different display parameters for the object element display area and the background element display area.
[0133] In some optional implementations, performing object segmentation on the first image to obtain a first segmented image and a second segmented image may include: responding to a user's selection operation on the first image, performing object segmentation on the first image to obtain a first segmented image and a second segmented image.
[0134] In this technical solution, the user can decide which of the two acquired images to perform object segmentation processing, thus meeting different user needs.
[0135] In some optional implementations, performing object segmentation on the first image to obtain a first segmented image and a second segmented image may include: performing object segmentation on the first image to obtain a first segmented image and a second segmented image when the area of the display region of an object element in the first image is found to be greater than an area threshold.
[0136] In this technical solution, the two acquired images can be intelligently identified by the terminal device. If the area of the object element display region in the identified image is greater than the area threshold, the image is segmented to obtain the first segmented image and the second segmented image, which is more intelligent and improves the efficiency of wallpaper generation.
[0137] 103. Generate a wallpaper corresponding to a target scene based on the first segmented image, the second segmented image, and at least one of the second images, wherein the target scene includes at least one of a screen-off scene, a lock screen scene, and a desktop scene.
[0138] In one possible implementation, the target scenario can be selected by the user or set by default; this embodiment does not limit this. The following descriptions illustrate three scenarios (screen-off, lock screen, and desktop) and two scenarios (desktop, desktop, and desktop) respectively:
[0139] 1. Target scenarios include always-on screen, lock screen, and desktop scenarios.
[0140] In one possible implementation, the method may further include: determining that the sequential order of wallpaper scenes among the always-on display scene, the lock screen scene, and the desktop scene is: first target scene—second target scene—third target scene. For example, the sequence of first target scene—second target scene—third target scene could be: from always-on display scene—lock screen scene—desktop scene, or from desktop scene—lock screen scene—always-on display scene.
[0141] The sequential wallpaper scene order can be the default sequential wallpaper scene order. Assuming the user selects an always-on display scene, lock screen scene, and desktop scene, the default sequential wallpaper scene order can be automatically displayed. For example: from always-on display scene—lock screen scene—desktop scene, or from desktop scene—lock screen scene—always-on display scene.
[0142] The sequential wallpaper scene order can also be a custom option displayed, allowing the user to select the desired order. That is, in response to the user's selection of the scene order, a sequential wallpaper scene order is obtained across the always-on display, lock screen, and home screen. For example... Figure 3A The image shown is a schematic diagram illustrating the default sequential order of wallpaper scenes in an embodiment of this application.
[0143] Alternatively, it can respond to user modifications and generate a new sequence of wallpaper scenes across the always-on display, lock screen, and home screen. For example, the default sequence is always-on display—lock screen—home screen; a user-modified sequence is always-on display—lock screen—always-on display. Figure 3B The image shown is a schematic diagram illustrating the user's selection of a sequential wallpaper scene order in an embodiment of this application.
[0144] Furthermore, in an alternative implementation, when the default sequential wallpaper scene order includes at least two options, such as: Option 1: from always-on display scene—lock screen scene—desktop scene, Option 2: from desktop scene—lock screen scene—always-on display scene, the sequential wallpaper scene order in the always-on display scene, lock screen scene, and desktop scene is obtained in response to the user's selection of the target option. Figure 3C The image shown is a schematic diagram illustrating a user's selection of a sequential order of wallpaper scenes in an embodiment of this application.
[0145] This technical solution provides a detailed explanation of the sequential wallpaper scene order in the always-on display, lock screen, and desktop scenarios. Users can directly use the default sequential wallpaper scene order, or select their own order from among several default options. This approach can meet different user needs and improve the feasibility of the solution.
[0146] In one possible implementation, generating a wallpaper corresponding to a target scene based on at least one of the first segmented image, the second segmented image, and the second image may include: generating a first wallpaper corresponding to a first target scene based on the first segmented image or the second segmented image; generating a second wallpaper corresponding to a second target scene based on the second segmented image and the second image; and generating a third wallpaper corresponding to a third target scene based on the second image.
[0147] Wherein, the first target scene, the second target scene, and the third target scene are respectively the always-on screen scene, the lock screen scene, and the desktop scene, or respectively the desktop scene, the lock screen scene, and the always-on screen scene.
[0148] For example, based on image C or image D above, a first wallpaper corresponding to the always-on display scene is generated; based on image D and image B, a second wallpaper corresponding to the lock screen scene is generated; and based on image B, a third wallpaper corresponding to the desktop scene is generated.
[0149] Alternatively, based on image C or image D above, generate the first wallpaper corresponding to the desktop scene; based on image D and image B, generate the second wallpaper corresponding to the lock screen scene; and based on image B, generate the third wallpaper corresponding to the always-on display scene.
[0150] like Figure 2E The image shown is a schematic diagram illustrating the overlay display of a second image onto a second segmented image in an embodiment of this application. Figure 2E In the second segmented image, the background display area has an opacity of 1, while the object element display area has an opacity of 0. Since the second segmented image includes the content of the background element display area, and the object element display area is transparent, the object element display area in the second segmented image can fill with the corresponding portion of the content in the second image, thus creating a silhouette effect.
[0151] In this technical solution, if a first wallpaper corresponding to a first target scene is generated based on a first segmented image, and a second wallpaper corresponding to a second target scene is generated based on a second segmented image and a second image; since the first segmented image includes the content of the object element display area of the first image, and the second wallpaper is generated from the second segmented image and the second image, the second wallpaper includes the content of the background element display area of the first image in the second segmented image, and the object element display area of the second wallpaper is filled with the corresponding part of the content of the second image, a smooth wallpaper display effect can be achieved when transitioning from the first target scene to the second target scene.
[0152] If the first wallpaper corresponding to the first target scene is generated based on the second segmented image, and the second wallpaper corresponding to the second target scene is generated based on the second segmented image and the second image; because the second segmented image includes the content of the background element display area of the first image, and the second wallpaper is generated from the second segmented image and the second image, the second segmented image includes the content of the background element display area of the first image, and the object element display area of the second segmented image in the second wallpaper is filled with the corresponding part of the content of the second image, therefore, when transitioning from the first target scene to the second target scene, the first wallpaper and the second wallpaper include some of the same content (the content of the background element display area of the first image), which can achieve a continuous wallpaper display effect.
[0153] Based on the second segmented image and the second image, a second wallpaper corresponding to the second target scene is generated; based on the second image, a third wallpaper corresponding to the third target scene is generated. Therefore, when transitioning from the second target scene to the third target scene, the second and third wallpapers include some identical content (part of the content of the second image), achieving a seamless wallpaper display effect.
[0154] Optionally, generating a wallpaper corresponding to the target scene based on the first segmented image, the second segmented image, and at least one of the second images may include: generating a second wallpaper corresponding to the second target scene based on the second image and a second segmented image with adjusted transparency of the object element display area, wherein the transparency of the object element display area in the second segmented image with adjusted transparency is greater than 0 and less than 1; or,
[0155] Based on the second segmented image, the second image, and the first segmented image with adjusted transparency of the object element display area, a second wallpaper corresponding to the second target scene is generated. In the first segmented image with adjusted transparency of the object element display area, the transparency of the object element display area is greater than 0 and less than 1.
[0156] For example, such as Figure 2F The image shown is a schematic diagram illustrating the overlay display of a second image onto a second segmented image in an embodiment of this application. Figure 2F In this process, the second segmented image is the second segmented image after adjusting the transparency of the object element display area. That is, the second wallpaper corresponding to the second target scene is generated by superimposing the second image and the second segmented image after adjusting the transparency of the object element display area. In the second segmented image after adjusting the transparency of the object element display area, the transparency of the background display area is 1, and the transparency of the object element display area is greater than 0 and less than 1.
[0157] It should be noted that, Figure 2FThis can also be understood as the superposition of the first segmented image, the second segmented image, and the second image. Figure 2F In this process, the first segmented image is the first segmented image after adjusting the transparency of the object element display area. That is, based on the second segmented image, the second image, and the first segmented image after adjusting the transparency of the object element display area, the second wallpaper corresponding to the second target scene is generated. Specifically, in the first segmented image after adjusting the transparency of the object element display area, the transparency of the object element display area is greater than 0 and less than 1.
[0158] This technical solution also provides two implementation methods for generating a second wallpaper corresponding to a second target scene, which can meet different user needs and improve the feasibility of the solution.
[0159] It should be noted that the order of determining the continuous wallpaper scenes mentioned above can be before or after the generation of the wallpaper corresponding to the target scene. This application embodiment does not make a specific limitation.
[0160] Optionally, in some possible implementations, generating the first wallpaper corresponding to the first target scene based on the first segmented image or the second segmented image may include:
[0161] In response to the user's selection of a first segmented image, generate a first wallpaper corresponding to the first target scene based on the first segmented image; or,
[0162] In response to the user's selection of a second segmented image, a first wallpaper corresponding to the first target scene is generated based on the second segmented image; or,
[0163] With the default settings selecting the first segmented image, a first wallpaper corresponding to the first target scene is generated based on the first segmented image; or...
[0164] In response to a user changing the default setting from the first segmented image to the second segmented image, generate a first wallpaper corresponding to the first target scene based on the second segmented image; or,
[0165] With the second segmented image selected by default, a first wallpaper corresponding to the first target scene is generated based on the second segmented image; or...
[0166] In response to the user's action of changing the default setting from the second segmented image to the first segmented image, a first wallpaper corresponding to the first target scene is generated based on the first segmented image.
[0167] This technical solution provides several implementation methods for generating the first wallpaper corresponding to the first target scene, improving the feasibility of the solution. In the solution where the user selects either the first or second segmented image to generate the first wallpaper corresponding to the first target scene, user engagement is enhanced, and different user needs are met. In the solution where the first wallpaper is generated by selecting either the first or second segmented image using default settings, the default settings can be modified, and the wallpaper corresponding to the first target scene is generated based on the modified default settings, which can meet different user needs and improve the user experience.
[0168] In one possible implementation, the method may further include: previewing the wallpaper corresponding to the target scene, responding to the user's modification operation, and modifying the wallpaper corresponding to the target scene.
[0169] In this technical solution, after generating the wallpaper corresponding to the target scene, it can be previewed. If the user is not satisfied, it can be modified to obtain a wallpaper corresponding to the target scene that satisfies the user.
[0170] In one possible implementation, previewing the wallpaper corresponding to the target scene includes: previewing the wallpapers corresponding to the first target scene, the second target scene, and the third target scene respectively on the same display interface.
[0171] In this technical solution, wallpapers corresponding to three different scenes can be previewed simultaneously on the same display interface. This allows users to see the effects of the wallpapers for the three scenes very intuitively and quickly decide whether the wallpaper needs to be modified, thus improving the efficiency of wallpaper generation.
[0172] In one possible implementation, previewing the wallpaper corresponding to the target scene and responding to the user's modification operation to modify the wallpaper corresponding to the target scene may include: previewing the first wallpaper corresponding to the first target scene; and responding to the user's first modification operation to modify the first wallpaper corresponding to the first target scene.
[0173] In this technical solution, after generating the first wallpaper corresponding to the first target scene, it can be previewed. If the user is not satisfied, it can be modified to obtain the first wallpaper corresponding to the first target scene that satisfies the user.
[0174] In one possible implementation, the step of previewing the wallpaper corresponding to the target scene and responding to the user's modification operation to modify the wallpaper corresponding to the target scene may include: previewing the second wallpaper corresponding to the second target scene; and responding to the user's second modification operation to modify the second wallpaper corresponding to the second target scene.
[0175] In this technical solution, after generating the second wallpaper corresponding to the second target scene, it can be previewed. If the user is not satisfied, it can be modified to obtain a second wallpaper corresponding to the second target scene that satisfies the user. It should be noted that modifying the second wallpaper corresponding to the second target scene may also modify the first wallpaper corresponding to the first target scene. This is because if the user is not satisfied with the overlay effect of the second segmented image, which is derived from the first image, then modifying the first image will definitely modify the first wallpaper corresponding to the first target scene. If the user is not satisfied with the overlay effect of the second image, then the second image can be modified or replaced without affecting the modification of the first wallpaper corresponding to the first target scene.
[0176] In one possible implementation, the process of previewing the wallpaper corresponding to the target scene and responding to the user's modification operation to modify the wallpaper corresponding to the target scene may include: previewing the third wallpaper corresponding to the third target scene; and responding to the user's third modification operation to modify the third wallpaper corresponding to the third target scene.
[0177] In this technical solution, after generating the third wallpaper corresponding to the third target scene, it can be previewed. If the user is not satisfied, it can be modified to obtain a third wallpaper corresponding to the third target scene that satisfies the user. It should be noted that modifying the third wallpaper corresponding to the third target scene will also modify the second wallpaper corresponding to the second target scene, because the third wallpaper is generated based on the second image, and the second wallpaper is generated based on the second segmented image and the second image.
[0178] In one possible implementation, generating the first wallpaper corresponding to the first target scene based on the first segmented image or the second segmented image may include: drawing a first layer based on the first segmented image or drawing a second layer based on the second segmented image, and generating the first wallpaper corresponding to the first target scene based on the first layer or the second layer.
[0179] The step of generating a second wallpaper corresponding to a second target scene based on the second segmented image and the second image may include: drawing a third layer based on the second image, and superimposing the second layer and the third layer to generate a second wallpaper corresponding to the second target scene;
[0180] The step of generating a third wallpaper corresponding to a third target scene based on the second image may include: generating a third wallpaper corresponding to the third target scene based on the third layer.
[0181] In this technical solution, the first segmented image can be drawn as the first layer, serving as the wallpaper corresponding to the first target scene (which can be understood as binding the first layer to the first target scene). Then, when the terminal device is in the first target scene, the first layer will be displayed. Alternatively, the second segmented image can be drawn as the second layer, serving as the first wallpaper corresponding to the first target scene (which can be understood as binding the second layer to the first target scene). Then, when the terminal device is in the first target scene, the second layer will be displayed. This provides two implementation methods for generating the first wallpaper corresponding to the first target scene, improving the feasibility of the solution and providing users with different choices to meet their diverse needs.
[0182] Alternatively, the second image can be drawn as a third layer, and this third layer can be superimposed on the second layer drawn from the second segmented image to serve as the second wallpaper corresponding to the second target scene (which can be understood as binding the second and third layers to the second target scene). Then, when the terminal device is in the second target scene, the superimposed effect of the second and third layers will be displayed. This provides a specific implementation method for generating the second wallpaper corresponding to the second target scene, improving the feasibility of the solution.
[0183] Alternatively, the third layer can be used as the third wallpaper corresponding to the third target scene (which can be understood as binding the third layer to the third target scene). Then, when the terminal device is in the third target scene, the third layer will be displayed. This provides a specific implementation method for generating the third wallpaper corresponding to the third target scene and improves the feasibility of the solution.
[0184] Therefore, when transitioning from the first target scene to the second target scene, and then from the second target scene to the third target scene, because the wallpapers corresponding to each pair of target scenes contain the same visual elements, a seamless, one-shot wallpaper effect can be achieved when transitioning between different target scenes.
[0185] 2. The target scenarios include any two of the following scenarios: screen-off scenario, lock screen scenario, and desktop scenario.
[0186] In one possible implementation, the method may further include: determining that, in the always-on display scenario, the lock screen scenario, and the desktop scenario, the sequential order of the consecutive wallpaper scenarios is: the first target scenario and the second target scenario, or the second target scenario and the third target scenario.
[0187] For example, the first target scenario is a screen-off scenario, and the second target scenario is a screen-locked scenario; or, the first target scenario is a screen-locked scenario, and the second target scenario is a screen-off scenario; or, the first target scenario is a screen-locked scenario, and the second target scenario is a desktop scenario; or, the first target scenario is a desktop scenario, and the second target scenario is a screen-off scenario. Alternatively, in some cases, the user of the terminal device has not set a screen-locked password, so there will be no screen-locked scenario. In this case, the first target scenario can be a screen-off scenario, and the second target scenario can be a desktop scenario; or, the first target scenario can be a desktop scenario, and the second target scenario can be a screen-off scenario.
[0188] Alternatively, the second target scenario can be a screen-off scenario and the third target scenario can be a screen-locked scenario; or, the second target scenario can be a screen-locked scenario and the third target scenario can be a screen-off scenario; or, the second target scenario can be a screen-locked scenario and the third target scenario can be a desktop scenario; or, the second target scenario can be a desktop scenario and the third target scenario can be a screen-off scenario. Alternatively, in some cases, the user of the terminal device may not have set a screen-lock password, in which case there will be no screen-locked scenario. In this case, the second target scenario can be a screen-off scenario and the third target scenario can be a desktop scenario; or, the second target scenario can be a desktop scenario and the third target scenario can be a screen-off scenario.
[0189] The sequential wallpaper scene order can be the default sequential wallpaper scene order. Assuming the user selects an always-on display scene, lock screen scene, and desktop scene, the default sequential wallpaper scene order can be automatically displayed. For example: from always-on display scene to lock screen scene, or from lock screen scene to always-on display scene, or from lock screen scene to desktop scene, or from desktop scene to lock screen scene. Figure 3D The image shown is a schematic diagram illustrating the default sequential order of wallpaper scenes in an embodiment of this application.
[0190] The scene order in a single continuous shot can also be customized by the user, resulting in a coherent wallpaper scene order. Specifically, in response to the user's selection of the scene order, a coherent wallpaper scene order is achieved between two scenes: the always-on display scene, the lock screen scene, and the desktop scene.
[0191] Alternatively, it can respond to user modifications and generate a sequential wallpaper scene order for the always-on display, lock screen, and home screen. For example, the default sequential wallpaper scene order is: always-on display – lock screen; the user modifies the sequential wallpaper scene order to: lock screen – home screen. Figure 3E The image shown is a schematic diagram illustrating the user's selection of a sequential wallpaper scene order in an embodiment of this application.
[0192] Furthermore, in one optional implementation, if the default sequential wallpaper scene order includes at least two options, such as: Option 1: From always-on display scene to lock screen scene, Option 2: From lock screen scene to always-on display scene, Option 3: From lock screen scene to desktop scene, Option 4: From desktop scene to lock screen scene, Option 5: From always-on display scene to desktop scene, Option 6: From desktop scene to always-on display scene. Responding to the user's selection of the target option, the sequential wallpaper scene order of two scenes from the always-on display scene, lock screen scene, and desktop scene is obtained. Figure 3F The image shown is a schematic diagram illustrating a user's selection of a sequential order of wallpaper scenes in an embodiment of this application.
[0193] This technical solution provides a detailed explanation of the sequential wallpaper scene order for two scenarios: always-on display, lock screen, and desktop. Users can directly use the default sequential wallpaper scene order, or they can choose their own, or they can select from multiple default options to obtain the sequential wallpaper scene order. This can meet different user needs and improve the feasibility of the solution.
[0194] Method 1:
[0195] In one possible implementation, generating a wallpaper corresponding to a target scene based on at least one of the first segmented image, the second segmented image, and the second image may include: generating a first wallpaper corresponding to a first target scene based on the first segmented image or the second segmented image; and generating a second wallpaper corresponding to a second target scene based on the second segmented image and the second image.
[0196] For example, a first wallpaper corresponding to the first target scene is generated based on image C or image D mentioned above, and a second wallpaper corresponding to the second target scene is generated based on image D and image B.
[0197] In this technical solution, if a first wallpaper corresponding to a first target scene is generated based on a first segmented image, and a second wallpaper corresponding to a second target scene is generated based on a second segmented image and a second image; since the first segmented image includes the content of the object element display area of the first image, and the second wallpaper is generated from the second segmented image and the second image, the second wallpaper includes the content of the background element display area of the first image in the second segmented image, and the object element display area of the second wallpaper is filled with the corresponding part of the content of the second image, a smooth wallpaper display effect can be achieved when transitioning from the first target scene to the second target scene.
[0198] If the first wallpaper corresponding to the first target scene is generated based on the second segmented image, and the second wallpaper corresponding to the second target scene is generated based on the second segmented image and the second image; because the second segmented image includes the content of the background element display area of the first image, and the second wallpaper is generated from the second segmented image and the second image, the second segmented image includes the content of the background element display area of the first image, and the object element display area of the second segmented image in the second wallpaper is filled with the corresponding part of the content of the second image, therefore, when transitioning from the first target scene to the second target scene, the first wallpaper and the second wallpaper include some of the same content (the content of the background element display area of the first image), which can achieve a continuous wallpaper display effect.
[0199] In one possible implementation, generating the first wallpaper corresponding to the first target scene based on the first segmented image or the second segmented image may include: drawing a first layer based on the first segmented image or drawing a second layer based on the second segmented image; generating the first wallpaper corresponding to the first target scene based on the first layer or the second layer.
[0200] The step of generating a second wallpaper corresponding to a second target scene based on the second segmented image and the second image may include: generating a third wallpaper corresponding to a third target scene based on the third layer.
[0201] In this technical solution, the first segmented image can be drawn as a first layer, serving as the wallpaper corresponding to the first target scene (which can be understood as binding the first layer to the first target scene). Then, when the terminal device is in the first target scene, the first layer will be displayed. Alternatively, the second segmented image can be drawn as a second layer, serving as the first wallpaper corresponding to the first target scene (which can be understood as binding the second layer to the first target scene). Then, when the terminal device is in the first target scene, the second layer will be displayed. This provides two implementation methods for generating the first wallpaper corresponding to the first target scene, improving the feasibility of the solution and providing users with different choices to meet their different needs. Furthermore, the second image can be drawn as a third layer, and this third layer is superimposed on the second layer drawn from the second segmented image, serving as the second wallpaper corresponding to the second target scene (which can be understood as binding the second and third layers to the second target scene). Then, when the terminal device is in the second target scene, the superimposed effect of the second and third layers will be displayed. This provides a specific implementation method for generating the second wallpaper corresponding to the second target scene, improving the feasibility of the solution.
[0202] Method 2:
[0203] In one possible implementation, generating a wallpaper corresponding to a target scene based on the first segmented image, the second segmented image, and at least one of the second images may include: generating a second wallpaper corresponding to a second target scene based on the second segmented image and the second image; and generating a third wallpaper corresponding to a third target scene based on the second image.
[0204] In this technical solution, a second wallpaper corresponding to the second target scene is generated based on the second segmented image and the second image; a third wallpaper corresponding to the third target scene is generated based on the second image. Therefore, when transitioning from the second target scene to the third target scene, the second wallpaper and the third wallpaper include some identical content (part of the content of the second image), achieving a seamless wallpaper display effect.
[0205] In one possible implementation, generating the second wallpaper corresponding to the second target scene based on the second segmented image and the second image may include: drawing a second layer based on the second segmented image, drawing a third layer based on the second image, and superimposing the second layer and the third layer to generate the second wallpaper corresponding to the second target scene;
[0206] The step of generating a third wallpaper corresponding to a third target scene based on the second image may include: generating a third wallpaper corresponding to the third target scene based on the third layer.
[0207] In this technical solution, the second segmented image can be drawn as a second layer, and the second image can be drawn as a third layer. The third layer is superimposed on the second layer drawn from the second segmented image to serve as the second wallpaper corresponding to the second target scene (which can be understood as binding the second and third layers to the second target scene). Then, when the terminal device is in the second target scene, the superimposed effect of the second and third layers will be displayed. This provides a specific implementation method for generating the second wallpaper corresponding to the second target scene, improving the feasibility of the solution. Alternatively, the third layer can be used as the third wallpaper corresponding to the third target scene (which can be understood as binding the third layer to the third target scene). Then, when the terminal device is in the third target scene, the third layer will be displayed. This provides a specific implementation method for generating the third wallpaper corresponding to the third target scene, improving the feasibility of the solution.
[0208] In one possible implementation, either method 1 or method 2 described above can be used to generate wallpapers for any two of the following scenarios: always-on display, lock screen, and desktop. Alternatively, the user can choose the appropriate method. This application embodiment does not impose any specific limitations on this method.
[0209] It should be noted that the order of determining the continuous wallpaper scenes mentioned above can be either before or after generating the wallpaper corresponding to the target scene; this application embodiment does not impose a specific limitation. Regarding whether to generate the first wallpaper corresponding to the first target scene based on the first segmented image or the second segmented image, and previewing the corresponding wallpapers under different target scenes, users can modify them if they are not satisfied. This can be done by referring to the descriptions of the target scenes, including the always-on display scene, the lock screen scene, and the desktop scene, which will not be repeated here.
[0210] 3. The target scenarios include any one of the following scenarios: always-on display, lock screen, and desktop.
[0211] In one possible implementation, the method further includes: in a screen-off scene, a lock screen scene, and a desktop scene, responding to the user's selection operation to obtain a target scene, wherein the target scene is a screen-off scene, or a lock screen scene, or a desktop scene.
[0212] In this technical solution, users can select the target scene before generating the wallpaper corresponding to the target scene, which improves the feasibility of the solution.
[0213] In one possible implementation, generating a wallpaper corresponding to the target scene based on the first segmented image, the second segmented image, and at least one of the second images may include:
[0214] Based on the first segmented image, generate a wallpaper corresponding to the target scene; or,
[0215] Based on the second segmented image, generate a wallpaper corresponding to the target scene; or,
[0216] Based on the second segmented image and the second image, generate a wallpaper corresponding to the target scene; or,
[0217] Based on the second image, generate a wallpaper corresponding to the target scene; or,
[0218] Based on the second image and the second segmented image with adjusted transparency of the object element display area, a wallpaper corresponding to the target scene is generated. In the second segmented image with adjusted transparency of the object element display area, the transparency of the object element display area is greater than 0 and less than 1; or...
[0219] Based on the second segmented image, the second image, and the first segmented image with adjusted transparency of the object element display area, a wallpaper corresponding to the target scene is generated. In the first segmented image with adjusted transparency of the object element display area, the transparency of the object element display area is greater than 0 and less than 1.
[0220] This technical solution provides multiple ways to generate wallpapers corresponding to the target scene, offering various options for different user needs and improving the feasibility of the solution.
[0221] In one alternative implementation, the user can be given a choice of which method to use to generate the wallpaper corresponding to the target scene before generating the wallpaper for the target scene. Alternatively, after generating multiple wallpapers using these multiple generation methods, the user can choose the target wallpaper and use it as the wallpaper corresponding to the target scene. This application embodiment does not make any specific limitations.
[0222] In one alternative implementation, the layer in the wallpaper corresponding to the always-on display scene and the lock screen scene is a layer that has been darkened by overlay processing.
[0223] For example, assuming the wallpaper for the always-on display scene is generated based on the first or second layer, then the first or second layer (corresponding to image C or image D) has been darkened using a mask. If the wallpaper for the always-on display scene is generated by overlaying the second layer (corresponding to image D) and the third layer (corresponding to image B), then both the second and third layers can be darkened, or only the second layer or only the third layer can be darkened. For example, adding a mask to darken the second layer (image D) and then overlaying it with the third layer (image B) can create a silhouette lock screen effect. If the wallpaper for the always-on display scene is generated based on the third layer (corresponding to image B), then the third layer has been darkened using a mask. The layers in the wallpaper for the lock screen scene can be referenced in the example explanation of the layers in the wallpaper for the always-on display scene; they will not be repeated here.
[0224] Darkening overlay (sometimes called "mask darkening" or "overlay darkening") is a common user interface and visual design technique used to add a semi-transparent overlay to an image or screen content to reduce the visibility of the content underneath, often to guide the user's attention or provide additional information. Darkening overlay can be tailored to different needs and scenarios.
[0225] In this technical solution, when using a mask, its impact on user experience needs to be considered to ensure that the mask can achieve the expected effect without interfering with the user's understanding and operation of the main content.
[0226] In one implementation, the screen-off scene interface also includes the date and time. Furthermore, it may also include information such as the day of the week. Figure 3G The image shown is a schematic diagram of the wallpaper corresponding to the screen-off scene in an embodiment of this application.
[0227] In one implementation, the lock screen interface further includes: a lock screen icon, date, and time. Furthermore, it may also include information such as the day of the week. Figure 3H The image shown is a schematic diagram of a wallpaper corresponding to a lock screen scene in an embodiment of this application.
[0228] In this technical solution, although users will see the wallpaper corresponding to the always-on or locked screen scene on the interface, information such as date and time will also be displayed on the always-on or locked screen scene interface. Therefore, after the layers in the wallpaper are darkened by masking, the user's attention can be guided to focus on information such as date and time, making it easier for the user to quickly obtain effective information.
[0229] In this embodiment, a first image and a second image are obtained; the first image is segmented to obtain a first segmented image and a second segmented image. The first image includes an object element display area and a background element display area, the first segmented image includes the content of the object element display area, and the second segmented image includes the content of the background element display area. Based on the first segmented image, the second segmented image, and at least one of the second images, a wallpaper corresponding to a target scene is generated. The target scene includes at least one of a screen-off scene, a lock screen scene, and a desktop scene. Because the wallpaper corresponding to the target scene is generated based on the first segmented image, the second segmented image, and at least one of the second images, and the first and second segmented images are obtained by segmenting the obtained first image, this embodiment can quickly generate wallpapers for different scenes based on user-defined first and second images.
[0230] like Figure 4 The diagram shown is a schematic representation of another embodiment of the method for generating wallpapers in this application, which may include:
[0231] 401. Obtain the first image and the second image.
[0232] 402. Perform object segmentation processing on the first image to obtain a first segmented image and a second segmented image. The first image includes an object element display area and a background element display area. The first segmented image includes the content of the object element display area, and the second segmented image includes the content of the background element display area.
[0233] 403. Generate a wallpaper corresponding to a target scene based on the first segmented image, the second segmented image, and at least one of the second images, wherein the target scene includes at least one of a screen-off scene, a lock screen scene, and a desktop scene.
[0234] It should be noted that steps 401-403 in the embodiments of this application are different from those in the present application. Figure 1 Steps 101-103 in the illustrated embodiment are similar and will not be described again here.
[0235] 404. Display the wallpaper corresponding to the different target scenes when the terminal device is in different target scenes.
[0236] In one possible implementation, displaying wallpapers corresponding to different target scenarios when the terminal device is in different target scenarios may include: displaying a first wallpaper corresponding to the first target scenario when the terminal device is in a first target scenario; displaying a second wallpaper corresponding to the second target scenario when the terminal device is in a second target scenario; and displaying a third wallpaper corresponding to the third target scenario when the terminal device is in a third target scenario.
[0237] In this technical solution, if the target scene includes an always-on scene, a lock screen scene, and a desktop scene, then after generating the wallpaper corresponding to the target scene, the corresponding wallpaper will be displayed when the terminal device is in the first target scene, the second target scene, and the third target scene, respectively, thereby improving the user's visual experience.
[0238] In one possible implementation, displaying wallpapers corresponding to different target scenarios when the terminal device is in different target scenarios may include: displaying a first wallpaper corresponding to the first target scenario when the terminal device is in a first target scenario; and displaying a second wallpaper corresponding to the second target scenario when the terminal device is in a second target scenario.
[0239] In one possible implementation, displaying wallpapers corresponding to different target scenarios when the terminal device is in different target scenarios may include: displaying a second wallpaper corresponding to the second target scenario when the terminal device is in a second target scenario; and displaying a third wallpaper corresponding to the third target scenario when the terminal device is in a third target scenario.
[0240] In this technical solution, if the target scene includes any two of the following scenes: screen-off scene, lock screen scene, and desktop scene, then after generating the wallpaper corresponding to the target scene, the corresponding wallpaper is displayed when the terminal device is in the first target scene and the second target scene, respectively; or, the corresponding wallpaper is displayed when the terminal device is in the second target scene and the third target scene, respectively, thereby improving the user's visual experience.
[0241] In one possible implementation, displaying wallpapers corresponding to different target scenarios when the terminal device is in different target scenarios may include: displaying a first wallpaper corresponding to the first target scenario when the terminal device is in a first target scenario; or displaying a second wallpaper corresponding to the second target scenario when the terminal device is in a second target scenario; or displaying a third wallpaper corresponding to the third target scenario when the terminal device is in a third target scenario.
[0242] In this technical solution, if the target scene includes any one of the following scenes: screen-off scene, lock screen scene, and desktop scene, then after generating the wallpaper corresponding to the target scene, the corresponding wallpaper will be displayed when the terminal device is in the first target scene, the second target scene, or the third target scene, thereby improving the user's visual experience.
[0243] 405. During the transition between different target scenes, use animation effects to display the wallpaper corresponding to the transition between target scenes.
[0244] In this technical solution, the wallpaper corresponding to the target scene transition can be displayed using animation effects, which can improve the continuity of displaying the corresponding wallpaper when different target scenes are transitioned, that is, to create a smooth transition effect between various target scenes, which is beautiful and personalized, thereby improving the effect of the one-shot wallpaper.
[0245] Among some possible implementations, motion effects can include fade-in / fade-out motion effects, ripple motion effects, scanning motion effects, rotation entry motion effects, flip motion effects, scaling pop-up motion effects, blinking motion effects, liquid or fluid animation motion effects, scene transition motion effects, dynamic background motion effects, etc.
[0246] In this technical solution, the animation effects are briefly explained. Different animation effects can create a smooth visual effect for the wallpaper during the transition between different target scenes.
[0247] In some possible implementations, the animation effect includes a fade-in / fade-out animation effect; the use of animation effect to display the wallpaper corresponding to the target scene transition during the transition between different target scenes may include: during the transition from the previous target scene to the next target scene, fading out the wallpaper corresponding to the previous target scene and fading in the wallpaper corresponding to the next target scene.
[0248] For example, if the animation effect of the transition between different target scenes is a fade-in / fade-out animation, such as when the first target scene enters the second target scene, the first wallpaper corresponding to the first target scene fades out, while the second wallpaper corresponding to the second target scene fades in, a smooth transition effect is achieved.
[0249] In this technical solution, when switching between different target scenes, a continuous wallpaper effect can be created by using fixed fade-in and fade-out animations on different wallpapers.
[0250] 1. Target scenarios include always-on screen, lock screen, and desktop scenarios.
[0251] In one optional implementation, the step of using animation effects to display the wallpaper corresponding to the target scene transition during the transition between different target scenes may include: during the transition from the first target scene to the second target scene, using a first animation effect to switch from displaying the first wallpaper corresponding to the first target scene to displaying the second wallpaper corresponding to the second target scene; during the transition from the second target scene to the third target scene, using a second animation effect to switch from displaying the second wallpaper corresponding to the second target scene to displaying the third wallpaper corresponding to the third target scene, wherein the first animation effect and the second animation effect may be the same or different.
[0252] For example, in the always-on display scenario, the first wallpaper (corresponding to the first or second layer) is displayed; during the transition from the always-on display scenario to the lock screen scenario, a first animation effect can be used to switch from displaying the first wallpaper to displaying the second wallpaper (corresponding to the second layer overlaid with the third layer), and the second wallpaper is displayed in the lock screen scenario; during the transition from the lock screen scenario to the desktop scenario, a second animation effect can be used to switch from displaying the second wallpaper (corresponding to the second layer overlaid with the third layer) to displaying the third wallpaper (corresponding to the third layer), and the third wallpaper is displayed in the desktop scenario. Figure 5A The image shown is a schematic diagram of the continuous wallpaper from the always-on screen scene, the lock screen scene to the desktop scene in an embodiment of this application.
[0253] Alternatively, in the desktop scene, the first wallpaper (corresponding to the first or second layer) is displayed; during the transition from the desktop scene to the lock screen scene, the first animation effect can be used to switch from displaying the first wallpaper to displaying the second wallpaper (corresponding to the second layer overlaid with the third layer), and in the lock screen scene, the second wallpaper is displayed; during the transition from the lock screen scene to the always-on display scene, the second animation effect can be used to switch from displaying the second wallpaper (corresponding to the second layer overlaid with the third layer) to displaying the third wallpaper (corresponding to the third layer), and in the always-on display scene, the third wallpaper is displayed. For example... Figure 5B The image shown is a schematic diagram of the continuous wallpaper from the desktop scene, lock screen scene to the always-on scene in an embodiment of this application.
[0254] In this technical solution, the use of the first and second animation effects can improve the continuity of wallpaper display during the transition from the first target scene to the second target scene, and from the second target scene to the third target scene, thus creating a seamless wallpaper transition effect between various target scenes, which is both aesthetically pleasing and personalized.
[0255] In one optional implementation, the first animation effect and the second animation effect include a fade-in / fade-out animation effect; the step of using the first animation effect to switch from displaying the first wallpaper corresponding to the first target scene to displaying the second wallpaper corresponding to the second target scene during the transition from the first target scene to the second target scene may include: during the transition from the first target scene to the second scene, fading out the first wallpaper and fading out the second wallpaper;
[0256] The step of using a second animation effect to switch from displaying the second wallpaper corresponding to the second target scene to displaying the third wallpaper corresponding to the third target scene during the transition from the second target scene to the third target scene may include: fading out the second wallpaper and fading out the third wallpaper during the transition from the second target scene to the third target scene.
[0257] For example, if the animation effect for the transition between different target scenes is a fade-in / fade-out animation, such as when the screen-off scene transitions to the lock screen scene, the first wallpaper fades in while the second wallpaper fades in; when the lock screen scene transitions to the desktop scene, the second wallpaper fades in while the third wallpaper fades in, a smooth transition effect is achieved.
[0258] In this technical solution, when switching between different target scenes, a continuous wallpaper effect can be created by using fixed fade-in and fade-out animations on different wallpapers.
[0259] 2. The target scenarios include any two of the following scenarios: screen-off scenario, lock screen scenario, and desktop scenario.
[0260] In one optional implementation, the step of using animation to display the wallpaper corresponding to the target scene transition during the transition between different target scenes may include: during the transition from the first target scene to the second target scene, using a first animation to switch from displaying the first wallpaper corresponding to the first target scene to displaying the second wallpaper corresponding to the second target scene; or,
[0261] During the transition from the second target scene to the third target scene, a second animation effect is used to switch from displaying the second wallpaper corresponding to the second target scene to displaying the third wallpaper corresponding to the third target scene.
[0262] Example 1: In the always-on display scene, the first wallpaper (corresponding to the first or second layer) is displayed; during the transition from the always-on display scene to the lock screen scene, a first animation effect can be used to switch from displaying the first wallpaper to displaying the second wallpaper (corresponding to the second layer overlaid with the third layer), and in the lock screen scene, the second wallpaper is displayed. For example... Figure 5C and Figure 5DThe image shown is a schematic diagram of the continuous wallpaper display from the always-on display scene to the lock screen scene in an embodiment of this application.
[0263] Alternatively, in Example 2, in the lock screen scene, the first wallpaper (corresponding to the first or second layer) is displayed; during the transition from the lock screen scene to the desktop scene, the first animation effect can be used to switch from displaying the first wallpaper to displaying the second wallpaper (corresponding to the second layer overlaid with the third layer), and the second wallpaper is displayed in the desktop scene.
[0264] Alternatively, in Example 3, in the always-on display scenario, the second wallpaper (corresponding to the third layer overlaid on the second layer) is displayed; during the transition from the always-on display scenario to the lock screen scenario, the second animation effect can be used to switch from displaying the second wallpaper (corresponding to the third layer overlaid on the second layer) to displaying the third wallpaper (corresponding to the third layer), and in the lock screen scenario, the third wallpaper is displayed.
[0265] Alternatively, in Example 4, in the lock screen scene, the second wallpaper (corresponding to the third layer superimposed on the second layer) is displayed; during the transition from the lock screen scene to the desktop scene, the second animation effect can be used to switch from displaying the second wallpaper (corresponding to the third layer superimposed on the second layer) to displaying the third wallpaper (corresponding to the third layer), and then the third wallpaper is displayed in the desktop scene.
[0266] Alternatively, in Example 5, in the screen-off scene, the first wallpaper (corresponding to the first or second layer) is displayed; during the transition from the screen-off scene to the desktop scene, the first animation effect can be used to switch from displaying the first wallpaper to displaying the second wallpaper (corresponding to the second layer overlaying the third layer), and the second wallpaper is displayed in the desktop scene.
[0267] Alternatively, in Example 6, the first wallpaper (corresponding to the first or second layer) is displayed in the desktop scene; during the transition from the desktop scene to the screen-off scene, the first animation effect can be used to switch from displaying the first wallpaper to displaying the second wallpaper (corresponding to the second layer overlaying the third layer), and the second wallpaper is displayed in the screen-off scene.
[0268] Alternatively, in Example 7, in the screen-off scene, the second wallpaper (corresponding to the third layer overlaid on the second layer) is displayed; during the transition from the screen-off scene to the desktop scene, the second animation effect can be used to switch from displaying the second wallpaper (corresponding to the third layer overlaid on the second layer) to displaying the third wallpaper (corresponding to the third layer), and then display the third wallpaper in the desktop scene.
[0269] Alternatively, in Example 8, in the desktop scene, the second wallpaper (corresponding to the third layer overlaid on the second layer) is displayed; during the transition from the desktop scene to the screen-off scene, the second animation effect can be used to switch from displaying the second wallpaper (corresponding to the third layer overlaid on the second layer) to displaying the third wallpaper (corresponding to the third layer), and then display the third wallpaper in the screen-off scene.
[0270] It should be noted that in Examples 5 to 8 above, the user did not set a lock screen password, so there is no lock screen scenario. Therefore, a smooth wallpaper transition effect can be created between the screen-off scenario and the desktop scenario.
[0271] In this technical solution, the use of animation can improve the continuity of wallpaper display during the transition from the first target scene to the second target scene, or from the second target scene to the third target scene, thus creating a seamless wallpaper transition effect between various target scenes, which is both aesthetically pleasing and personalized.
[0272] In this embodiment, a first image and a second image are obtained; the first image is segmented to obtain a first segmented image and a second segmented image. The first image includes an object element display area and a background element display area, the first segmented image includes the content of the object element display area, and the second segmented image includes the content of the background element display area. Based on the first segmented image, the second segmented image, and at least one of the second images, a wallpaper corresponding to a target scene is generated. The target scene includes at least one of a screen-off scene, a lock screen scene, and a desktop scene. Because the wallpaper corresponding to the target scene is generated based on the first segmented image, the second segmented image, and at least one of the second images, and the first and second segmented images are obtained by segmenting the obtained first image, this embodiment can quickly generate wallpapers for different scenes based on user-defined first and second images. Furthermore, wallpapers corresponding to different target scenes can be displayed when the terminal device is in different target scenes; during the transition between different target scenes, animation effects are used to display the wallpaper corresponding to the target scene transition. The use of animation effects can improve the continuity of wallpaper display during the transition between different target scenes, creating a seamless wallpaper transition effect between various target scenes, which is both aesthetically pleasing and personalized.
[0273] In the above Figure 1 and Figure 4In the illustrated embodiments, the design cost of one-shot wallpapers can be reduced, and a unified system processing method is provided, eliminating the need for designers to design and adjust for each target scene individually. Users also have more choices and definitions, creating their own personalized effects using two selected images. These effects are unique and aesthetically pleasing, and the wallpaper can be directly set for at least one of the following scenes: always-on display, lock screen, and desktop. Even when there are at least two target scenes, the displayed wallpaper maintains a smooth and natural transition between them.
[0274] like Figure 6 The diagram shown is a schematic representation of an embodiment of a wallpaper generation apparatus according to this application, which may include:
[0275] Module 601 is used to acquire the first image and the second image;
[0276] Processing module 602 is used to perform object segmentation processing on the first image to obtain a first segmented image and a second segmented image. The first image includes an object element display area and a background element display area. The first segmented image includes the content of the object element display area, and the second segmented image includes the content of the background element display area. Based on the first segmented image, the second segmented image, and at least one of the second image, a wallpaper corresponding to a target scene is generated. The target scene includes at least one of a screen-off scene, a lock screen scene, and a desktop scene.
[0277] Optionally, in some possible implementations, the processing module 602 is specifically used to generate a first wallpaper corresponding to a first target scene based on the first segmented image or the second segmented image; generate a second wallpaper corresponding to a second target scene based on the second segmented image and the second image; and generate a third wallpaper corresponding to a third target scene based on the second image; wherein the first target scene, the second target scene, and the third target scene are respectively the always-on screen scene, the lock screen scene, and the desktop scene, or respectively the desktop scene, the lock screen scene, and the always-on screen scene.
[0278] Optionally, in some possible implementations, the processing module 602 is specifically used to generate a first wallpaper corresponding to a first target scene based on the first segmented image or the second segmented image; and to generate a second wallpaper corresponding to a second target scene based on the second segmented image and the second image.
[0279] Optionally, in some possible implementations, the processing module 602 is specifically used to generate a second wallpaper corresponding to a second target scene based on the second segmented image and the second image; and to generate a third wallpaper corresponding to a third target scene based on the second image.
[0280] Optionally, in some possible implementations, the device for generating wallpaper also includes a display module 603;
[0281] Display module 603 is used to display wallpapers corresponding to different target scenes when the terminal device is in different target scenes.
[0282] Optionally, in some possible implementations, the display module 603 is specifically used to display the wallpaper corresponding to the target scene transition using animation during the transition between different target scenes.
[0283] Optionally, in some possible implementations, the animation effect includes a fade-in / fade-out animation effect;
[0284] The display module 603 is specifically used to fade out the wallpaper corresponding to the previous target scene and gradually reveal the wallpaper corresponding to the next target scene during the transition from the previous target scene to the next target scene.
[0285] Optionally, in some possible implementations, the processing module 602 is specifically used to draw a first layer based on the first segmented image, or draw a second layer based on the second segmented image; generate a first wallpaper corresponding to the first target scene based on the first layer, or the second layer; draw a third layer based on the second image; superimpose the second layer and the third layer to generate a second wallpaper corresponding to the second target scene; and generate a third wallpaper corresponding to the third target scene based on the third layer.
[0286] Optionally, in some possible implementations, the layer in the wallpaper corresponding to the always-on display scene and the lock screen scene is a layer that has been darkened by overlay processing.
[0287] like Figure 7A The diagram shown is a schematic representation of an embodiment of the terminal device described in this application, which may include, for example: Figure 6 The apparatus shown is for generating wallpapers.
[0288] like Figure 7B The diagram shown is a schematic diagram of another embodiment of the terminal device in this application. The following is in conjunction with... Figure 7B A detailed introduction to the various components of a mobile phone in a terminal device:
[0289] RF circuit 710 can be used for receiving and transmitting signals during information transmission or calls. Specifically, it receives downlink information from the base station and processes it with processor 780; additionally, it transmits uplink data to the base station. Typically, RF circuit 710 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low-noise amplifier (LNA), a duplexer, etc. Furthermore, RF circuit 710 can also communicate wirelessly with networks and other devices. The aforementioned wireless communication can use any communication standard or protocol, including but not limited to Global System for Mobile Communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, Short Messaging Service (SMS), etc.
[0290] The memory 720 can be used to store software programs and modules. The processor 780 executes various mobile phone functions and data processing by running the software programs and modules stored in the memory 720. The memory 720 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, applications required for at least one function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the mobile phone (such as audio data, phonebook, etc.). In addition, the memory 720 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, or other volatile solid-state storage device.
[0291] The input unit 730 can be used to receive input numerical or character information, and to generate key signal inputs related to user settings and function control of the mobile phone. Specifically, the input unit 730 may include a touch panel 731 and other input devices 732. The touch panel 731, also known as a touch screen, can collect touch operations performed by the user on or near it (such as operations performed by the user using a finger, stylus, or any suitable object or accessory on or near the touch panel 731), and drive the corresponding connected devices according to a pre-set program. Optionally, the touch panel 731 may include two parts: a touch detection device and a touch controller. The touch detection device detects the user's touch position and the signal generated by the touch operation, and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device, converts it into touch point coordinates, and sends it to the processor 780, and can also receive and execute commands sent by the processor 780. In addition, the touch panel 731 can be implemented using various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch panel 731, the input unit 730 may also include other input devices 732. Specifically, other input devices 732 may include, but are not limited to, one or more of the following: physical keyboard, function keys (such as volume control buttons, power buttons, etc.), trackball, mouse, joystick, etc.
[0292] The display unit 740 can be used to display information input by the user or information provided to the user, as well as various menus of the mobile phone. The display unit 740 may include a display panel 741, which may optionally be configured as a liquid crystal display (LCD), organic light-emitting diode (OLED), or similar display. Further, a touch panel 731 may cover the display panel 741. When the touch panel 731 detects a touch operation on or near it, it transmits the information to the processor 780 to determine the type of touch event. Subsequently, the processor 780 provides corresponding visual output on the display panel 741 based on the type of touch event. Although in Figure 7B In this embodiment, the touch panel 731 and the display panel 741 are two separate components to realize the input and output functions of the mobile phone. However, in some embodiments, the touch panel 731 and the display panel 741 can be integrated to realize the input and output functions of the mobile phone.
[0293] The mobile phone may also include at least one sensor 750, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor. The ambient light sensor can adjust the brightness of the display panel 741 according to the ambient light level, and the proximity sensor can turn off the display panel 741 and / or backlight when the phone is moved to the ear. As a type of motion sensor, an accelerometer sensor can detect the magnitude of acceleration in various directions (generally three axes). When stationary, it can detect the magnitude and direction of gravity and can be used for applications that recognize the phone's posture (such as landscape / portrait switching, related games, magnetometer posture calibration), vibration recognition-related functions (such as pedometer, taps), etc. Other sensors that may be configured in the mobile phone, such as gyroscopes, barometers, hygrometers, thermometers, and infrared sensors, will not be described in detail here.
[0294] Audio circuit 760, speaker 761, and microphone 762 provide an audio interface between the user and the mobile phone. Audio circuit 760 converts received audio data into electrical signals and transmits them to speaker 761, where speaker 761 converts them into sound signals for output. On the other hand, microphone 762 converts collected sound signals into electrical signals, which are received by audio circuit 760, converted into audio data, and then processed by processor 780 before being transmitted via RF circuit 710 to, for example, another mobile phone, or the audio data can be output to memory 720 for further processing.
[0295] Wi-Fi is a short-range wireless transmission technology. Through the Wi-Fi module 770, mobile phones can help users send and receive emails, browse web pages, and access streaming media, providing users with wireless broadband internet access. Although Figure 7B The Wi-Fi module 770 is shown, but it is understood that it is not an essential component of the mobile phone and can be omitted as needed without changing the essence of the invention.
[0296] The processor 780 is the control center of the mobile phone, connecting various parts of the phone through various interfaces and lines. It executes software programs and / or modules stored in the memory 720, and calls data stored in the memory 720 to perform various functions and process data, thereby providing overall monitoring of the phone. Optionally, the processor 780 may include one or more processing units; preferably, the processor 780 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into the processor 780.
[0297] The mobile phone also includes a power supply 790 (such as a battery) that supplies power to various components. Preferably, the power supply can be logically connected to the processor 780 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system.
[0298] Although not shown, mobile phones may also include a camera, Bluetooth module, etc., which will not be described in detail here.
[0299] In this embodiment, the processor 780 is configured to acquire a first image and a second image; perform object segmentation processing on the first image to obtain a first segmented image and a second segmented image, wherein the first image includes an object element display area and a background element display area, the first segmented image includes the content of the object element display area, and the second segmented image includes the content of the background element display area; and generate a wallpaper corresponding to a target scene based on at least one of the first segmented image, the second segmented image, and the second image, wherein the target scene includes at least one of a screen-off scene, a lock screen scene, and a desktop scene.
[0300] Optionally, in some possible implementations, the processor 780 is specifically configured to generate a first wallpaper corresponding to a first target scene based on the first segmented image, or the second segmented image; generate a second wallpaper corresponding to a second target scene based on the second segmented image and the second image; and generate a third wallpaper corresponding to a third target scene based on the second image; wherein the first target scene, the second target scene, and the third target scene are respectively the always-on screen scene, the lock screen scene, and the desktop scene, or respectively the desktop scene, the lock screen scene, and the always-on screen scene.
[0301] Optionally, in some possible implementations, the processor 780 is specifically configured to generate a first wallpaper corresponding to a first target scene based on the first segmented image or the second segmented image; and to generate a second wallpaper corresponding to a second target scene based on the second segmented image and the second image.
[0302] Optionally, in some possible implementations, the processor 780 is specifically configured to generate a second wallpaper corresponding to a second target scene based on the second segmented image and the second image; and to generate a third wallpaper corresponding to a third target scene based on the second image.
[0303] Optionally, in some possible implementations, the display unit 740 is used to display wallpapers corresponding to different target scenes when the terminal device is in different target scenes.
[0304] Optionally, in some possible implementations, the display unit 740 is specifically used to display the wallpaper corresponding to the target scene transition using animation during the transition between different target scenes.
[0305] Optionally, in some possible implementations, the animation effect includes a fade-in / fade-out animation effect;
[0306] The display unit 740 is specifically used to fade out the wallpaper corresponding to the previous target scene and gradually reveal the wallpaper corresponding to the next target scene during the transition from the previous target scene to the next target scene.
[0307] Optionally, in some possible implementations, the processor 780 is specifically configured to: draw a first layer based on the first segmented image, or draw a second layer based on the second segmented image; generate a first wallpaper corresponding to the first target scene based on the first layer, or the second layer; draw a third layer based on the second image; superimpose the second layer and the third layer to generate a second wallpaper corresponding to the second target scene; and generate a third wallpaper corresponding to the third target scene based on the third layer.
[0308] Optionally, in some possible implementations, the layer in the wallpaper corresponding to the always-on display scene and the lock screen scene is a layer that has been darkened by overlay processing.
[0309] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as 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 (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can store or a data storage device such as a server or data center that integrates one or more available media. The available media may be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid-state drives (SSDs)).
[0310] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0311] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection between apparatuses or units through some interfaces, and may be electrical, mechanical, or other forms.
[0312] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0313] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0314] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0315] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. 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 spirit and scope of the technical solutions of the embodiments of this application.
Claims
1. A method of generating a wallpaper, characterized by, The method comprises: acquiring a first picture and a second picture; performing object segmentation processing on the first picture to obtain a first segmented picture and a second segmented picture, the first picture comprising an object element display area and a background element display area, the first segmented picture comprising the content of the object element display area, and the second segmented picture comprising the content of the background element display area; generating a wallpaper corresponding to a target scene according to at least one of the first segmented picture, the second segmented picture, and the second picture, the target scene comprising at least one of an off-screen scene, a lock screen scene, and a desktop scene.
2. The method of claim 1, wherein, The method further comprises: generating a first wallpaper corresponding to a first target scene according to the first segmented picture or the second segmented picture; generating a second wallpaper corresponding to a second target scene according to the second segmented picture and the second picture; and generating a third wallpaper corresponding to a third target scene according to the second picture. The first target scene, the second target scene, and the third target scene are the off-screen scene, the lock screen scene, and the desktop scene, or the desktop scene, the lock screen scene, and the off-screen scene, respectively.
3. The method of claim 1, wherein, The method further comprises: generating a first wallpaper corresponding to a first target scene according to the first segmented picture or the second segmented picture; generating a second wallpaper corresponding to a second target scene according to the second segmented picture and the second picture.
4. The method of claim 1, wherein, The method further comprises: generating a second wallpaper corresponding to a second target scene according to the second segmented picture and the second picture; generating a third wallpaper corresponding to a third target scene according to the second picture.
5. The method according to any one of claims 1-4, characterized in that, The method further comprises: displaying a wallpaper corresponding to a different target scene when the terminal device is in the different target scene.
6. The method according to any one of claims 1-4, characterized in that, The method further comprises: displaying a wallpaper corresponding to a target scene transition using a dynamic effect during the target scene transition.
7. The method of claim 6, wherein, The dynamic effect comprises a fade-in and fade-out dynamic effect. The method further comprises: fading out a wallpaper corresponding to a previous target scene and fading in a wallpaper corresponding to a next target scene during a transition from the previous target scene to the next target scene.
8. The method of claim 2, wherein, The method further comprises: drawing a first layer according to the first segmented picture or drawing a second layer according to the second segmented picture, and generating the first wallpaper corresponding to the first target scene according to the first layer or the second layer; The method further comprises: drawing a first layer according to the first segmented picture or drawing a second layer according to the second segmented picture, and generating the first wallpaper corresponding to the first target scene according to the first layer or the second layer; According to the second picture, a third layer is drawn, the second layer and the third layer are superimposed, and a second wallpaper corresponding to the second target scene is generated; The generating of the third wallpaper corresponding to the third target scene according to the second picture comprises: According to the third layer, the third wallpaper corresponding to the third target scene is generated.
9. The method of claim 8, wherein, In the wallpaper corresponding to the screen-off scene and the lock screen scene, the layer is a darkened layer after a mask layer.
10. An apparatus for generating wallpaper, characterized by Comprise: The acquisition module is used for acquiring a first picture and a second picture; The processing module is used for performing object segmentation processing on the first picture to obtain a first segmented picture and a second segmented picture, the first picture comprises an object element display area and a background element display area, the first segmented picture comprises the content of the object element display area, and the second segmented picture comprises the content of the background element display area; According to at least one of the first segmented picture, the second segmented picture and the second picture, a wallpaper corresponding to a target scene is generated, the target scene comprises at least one of a screen-off scene, a lock screen scene and a desktop scene.
11. A terminal device, comprising: The terminal device comprises a memory and a processor, the memory stores a computer program capable of running on the processor, and the terminal device implements the method in any one of claims 1-9 when executing the program.
12. A computer readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the method in any one of claims 1-9.