Image processing method, electronic device, chip system, and storage medium
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HONOR DEVICE CO LTD
- Filing Date
- 2024-05-29
- Publication Date
- 2026-08-07
AI Technical Summary
所配置的模糊半径越大,模糊程度越高,模糊效果越明显,然而,模糊半径越大,计算量也越大
[0025] Fifthly, this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, causes the processor to perform the above-described method.
Smart Images

Figure CN121095094B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image processing technology, and in particular to an image processing method, electronic device, chip system, and storage medium. Background Technology
[0002] With technological advancements, electronic devices are constantly exploring ways to enhance the display effects of user interfaces (UIs), and image blurring is one such approach. In existing image blurring applications, electronic devices pre-configure a uniform blur radius. During image blurring, the image to be blurred is processed based on this pre-configured blur radius. A larger blur radius results in a higher degree of blurring and a more pronounced blurring effect; however, a larger blur radius also increases the computational load. Summary of the Invention
[0003] This application provides an image processing method, electronic device, chip system, and storage medium that can provide corresponding blur effects according to the scene and reduce the amount of computation.
[0004] In a first aspect, this application provides an image processing method applied to an electronic device. The method includes: when the electronic device is in a first scene, performing image blurring processing on an image to be processed to obtain and display a first blurred image after processing; when the electronic device is in a second scene, performing image blurring processing on the image to be processed to obtain and display a second blurred image after processing. The blurring degree of the first blurred image and the second blurred image is different. The influencing factors of the difference between the first scene and the second scene include at least one of the following: a first factor, a second factor, and a third factor. The first factor is related to the user information of the current user of the electronic device, the second factor is related to the operating state of the electronic device, and the third factor is related to the light source in the environment where the electronic device is located.
[0005] In this embodiment, the difference between the first and second scenarios lies in the following: when one or more of the following factors—a first factor related to the user information of the current user of the electronic device, a second factor related to the operating state of the electronic device, and a third factor related to the light source in the environment where the electronic device is located—are different, the blurring degree of the first blurred image processed in the first scenario differs from that of the second blurred image processed in the second scenario. The user information of the current user in the first factor indicates the user's identity to determine the user's group category. The operating state of the electronic device in the second factor indicates the performance and power consumption of the electronic device. The light source in the environment where the electronic device is located in the third factor indicates the ambient light conditions of the electronic device's environment. During the image blurring process of the electronic device, the blurring degree can be dynamically adjusted according to the first, second, and third factors, thereby balancing the demand for blurring effect and the performance and power consumption of the electronic device based on the first, second, and third factors, maximizing the benefits of both blurring effect and performance / power consumption.
[0006] In one possible implementation, the first blurred image corresponds to a first blurred radius, and the second blurred image corresponds to a second blurred radius, wherein the first blurred radius is different from the second blurred radius; the first factor includes the age group of the current user; the second factor includes the workload of the processor in the electronic device and / or the battery level in the electronic device, wherein the workload of the processor includes the load of the central processing unit and / or the load of the graphics processing unit; and the third factor includes the ambient light intensity collected by the electronic device and / or the display brightness of the electronic device.
[0007] In the embodiments of this application, during the image blurring process of the electronic device, the blur radius can be dynamically adjusted according to the first factor, the second factor and the third factor, thereby balancing the demand for blurring effect and the performance and power consumption of the electronic device according to the first factor, the second factor and the third factor, and maximizing the benefits of both blurring effect and performance and power consumption.
[0008] In one possible implementation, the age range of the current user in the first scene is greater than that of the current user in the second scene, the first blur radius is smaller than the second blur radius, and the blur degree of the first blurred image is lower than that of the second blurred image.
[0009] In this embodiment, since the older the age group, the less demand they have for image blurring effect than for performance and power consumption, a more suitable image blurring processing solution can be provided based on the user's actual needs.
[0010] In one possible implementation, the processor is busier in the first scene than in the second scene, the first blur radius is smaller than the second blur radius, and the blur degree of the first blurred image is lower than that of the second blurred image; and / or, the battery power in the first scene is lower than that in the second scene, the first blur radius is smaller than the second blur radius, and the blur degree of the first blurred image is lower than that of the second blurred image.
[0011] In this embodiment, the higher the processor's workload, the lower the blur level can be to ensure the battery life of the electronic device, thus providing users with a more suitable image blur processing solution.
[0012] In one possible implementation, the ambient light intensity in the first scene is less than the ambient light intensity in the second scene, the first blur radius is less than the second blur radius, and the blur degree of the first blurred image is lower than the blur degree of the second blurred image; and / or, the display brightness in the first scene is lower than the display brightness in the second scene, the first blur radius is less than the second blur radius, and the blur degree of the first blurred image is lower than the blur degree of the second blurred image.
[0013] In this embodiment of the application, since the lower the ambient light intensity or display brightness, the less image detail the user can obtain, the blur level can be appropriately reduced to provide the user with a more suitable image blur processing solution.
[0014] Secondly, this application provides an image processing method applied to an electronic device. The method includes: acquiring influencing factors of the electronic device, the influencing factors including at least one of the following: a first factor, a second factor, and a third factor, wherein the first factor is related to user information of the current user of the electronic device, the second factor is related to the operating status of the electronic device, and the third factor is related to the light source in the environment where the electronic device is located; determining a target blur radius based on the influencing factors; and performing image blur processing on the image to be processed based on the target blur radius to obtain a target blurred image.
[0015] In this embodiment, the user information of the current user in the first factor is used to indicate the user's identity and determine the user's group category. The operating status of the electronic device in the second factor is used to indicate the performance and power consumption of the electronic device. The light source of the environment in which the electronic device is located in the third factor is used to indicate the ambient light conditions of the environment in which the electronic device is located. During the image blurring process of the electronic device, the blur radius can be dynamically adjusted according to the first, second, and third factors, thereby achieving a balance between the demand for blurring effect and the performance and power consumption of the electronic device, maximizing the benefits of both blurring effect and performance and power consumption.
[0016] In one possible implementation, the first factor includes the age group of the current user; the second factor includes the workload of the processor in the electronic device and / or the battery level in the electronic device, the workload of the processor including the load of the central processing unit and / or the load of the graphics processing unit; and the third factor includes the ambient light intensity collected by the electronic device and / or the display brightness of the electronic device.
[0017] In the embodiments of this application, during the image blurring process of the electronic device, the blur radius can be dynamically adjusted according to the first factor, the second factor and the third factor, thereby balancing the demand for blurring effect and the performance and power consumption of the electronic device according to the first factor, the second factor and the third factor, and maximizing the benefits of both blurring effect and performance and power consumption.
[0018] In one possible implementation, determining the target blur radius based on influencing factors includes: obtaining a first correspondence relationship related to the influencing factors; wherein, the first correspondence relationship related to the current user's age group includes a negative correlation between age group and blur radius; the first correspondence relationship related to the processor's workload includes a negative correlation between processor workload and blur radius; the first correspondence relationship related to battery power includes a positive correlation between battery power and blur radius; the first correspondence relationship related to ambient light intensity includes a positive correlation between ambient light intensity and blur radius; and the first correspondence relationship related to display brightness includes a positive correlation between display brightness and blur radius; and determining the target blur radius based on the influencing factors and the first correspondence relationship related to the influencing factors.
[0019] In one possible implementation, when the second factor includes the processor's workload and the battery's charge level, obtaining the first correspondence related to the influencing factors includes: determining a first weight corresponding to the processor's workload and a second weight corresponding to the battery's charge level; and determining the first correspondence related to the second factor based on the first weight, the first correspondence related to the processor's workload, the second weight, and the first correspondence related to the battery's charge level.
[0020] In one possible implementation, the number of influencing factors of the electronic device is N, where N is greater than 1. The method further includes: determining the priority of each influencing factor; then determining the target fuzzy radius based on the influencing factors includes: determining the maximum target radius based on the top N-1 influencing factors with the highest priority; determining the target correspondence relationship related to the target influencing factor based on the maximum target radius, where the target influencing factor is the lowest priority influencing factor among the N influencing factors, and the maximum value of the fuzzy radius in the target correspondence relationship is the maximum target radius; and determining the target fuzzy radius based on the target influencing factor and the target correspondence relationship.
[0021] In one possible implementation, the first factor has a higher priority than the second factor, and the second factor has a higher priority than the third factor.
[0022] In one possible implementation, acquiring the influencing factors of the electronic device includes: acquiring the influencing factors of the electronic device in real time in response to an image blurring instruction, wherein the image blurring instruction is used to instruct image blurring to be performed; determining the target blur radius based on the influencing factors includes: determining the corresponding target blur radius based on the influencing factors of the electronic device acquired in real time.
[0023] Thirdly, this application provides an electronic device including a processor and a memory, the processor and the memory being coupled together, the memory being used to store a computer program, and when the computer program is executed by the processor, causing the electronic device to perform the above-described method.
[0024] Fourthly, this application provides a chip system applied to an electronic device. The chip system includes one or more processors, which are used to invoke computer instructions to cause the electronic device to perform the methods described above.
[0025] Fifthly, this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, causes the processor to perform the above-described method.
[0026] The technical effects brought about by the third to fifth aspects can be found in the descriptions of the methods in the above-mentioned method section, and will not be repeated here. Attached Figure Description
[0027] Figure 1 This is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of this application.
[0028] Figure 2 This is a schematic diagram of the software structure of an electronic device provided in an embodiment of this application.
[0029] Figures 3A to 3B This is a schematic diagram of a user interface provided for an embodiment of this application.
[0030] Figure 4 This is a schematic diagram of a Gaussian blur processing method provided in an embodiment of this application.
[0031] Figure 5 This is a schematic diagram of an image to be processed, provided as an embodiment of this application.
[0032] Figures 6A to 6B The embodiments of this application provide information based on different age groups. Figure 5 A scene diagram showing blurred images of varying degrees of blur obtained by blurring the image to be processed.
[0033] Figures 7A to 7B The embodiments of this application provide a pair based on different battery capacities. Figure 5 A scene diagram showing blurred images of varying degrees of blur obtained by blurring the image to be processed.
[0034] Figures 8A to 8B The embodiment of this application provides a display brightness of 450 nits based on the pair Figure 5 A scene diagram showing the blurred image obtained by blurring the image to be processed.
[0035] Figures 9A to 9B The embodiment of this application provides a display brightness of 90 nits based on the pair Figure 5 A scene diagram showing the blurred image obtained by blurring the image to be processed.
[0036] Figure 10 This is a schematic flowchart of an image processing method provided in an embodiment of this application.
[0037] Figure 11 This is a schematic flowchart of another image processing method provided in an embodiment of this application.
[0038] Figure 12 This is a schematic flowchart of a method for determining the fuzzy radius of a target, provided in an embodiment of this application.
[0039] Figure 13 This is a schematic diagram illustrating a first relationship between age groups, provided as an embodiment of this application.
[0040] Figure 14 This is a schematic diagram illustrating a first correspondence relationship related to CPU utilization, provided in an embodiment of this application.
[0041] Figure 15 This is a schematic diagram illustrating a first correspondence relationship related to GPU utilization, provided in an embodiment of this application.
[0042] Figure 16 This is a schematic diagram illustrating a first correspondence relationship related to battery power level, provided as an embodiment of this application.
[0043] Figure 17 This is a schematic diagram illustrating a first correspondence relationship related to display brightness, provided as an embodiment of this application.
[0044] Figure 18 This is a schematic diagram illustrating a first correspondence relationship related to ambient light intensity, provided as an embodiment of this application.
[0045] Figure 19 This is a schematic flowchart of another image processing method provided in an embodiment of this application.
[0046] Figure 20 This is a schematic diagram illustrating the relationship between battery power and fuzzy radius for a young person, provided as an embodiment of this application.
[0047] Figure 21 This is a schematic diagram illustrating the relationship between CPU usage and fuzzy radius in young people, provided as an embodiment of this application.
[0048] Figure 22 This is a schematic diagram illustrating the relationship between display brightness and blur radius for a young person, provided as an embodiment of this application.
[0049] Figure 23 This is a schematic diagram illustrating the relationship between display brightness and blur radius for a young person with a battery level of 50%, as provided in an embodiment of this application.
[0050] Figure 24 This is a schematic diagram of a chip system module provided in an embodiment of this application. Detailed Implementation
[0051] In this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one" does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0052] In this application, "at least one" means one or more, and "more than one" means two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone, where A and B can be singular or plural. The terms "first," "second," "third," "fourth," etc. (if present) in the specification, claims, and drawings of this application are used to distinguish similar objects, not to describe a specific order or sequence.
[0053] In the embodiments of this application, the terms "exemplary" or "for example" are used to indicate that something is an example, illustration, or description. Any embodiment or design that is described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design. Specifically, the use of the terms "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.
[0054] Where there is no conflict, the following embodiments and features can be combined with each other.
[0055] As mentioned above, when electronic devices perform image blurring, a larger blur radius results in a higher degree of blur and a more pronounced blur effect. However, a larger blur radius also increases the computational resources and power consumption of the electronic device. In implementing the embodiments of this application, the inventors discovered that when electronic devices use existing image blurring methods, a uniform blur radius is pre-configured and used consistently in all scenarios. However, in scenarios where a significant blur effect is not required, this pre-configured blur radius may be relatively large, leading to a waste of computational resources and power consumption. Conversely, in scenarios requiring a significant blur effect, this pre-configured blur radius may be relatively small, resulting in a low degree of blur and failing to achieve the desired blur effect.
[0056] In view of this, embodiments of this application provide an image processing method, an electronic device, a chip system, and a storage medium that can adaptively determine the blur radius. Based on the adaptively determined blur radius, image blurring processing can achieve the corresponding blurring effect to ensure the user's visual experience, while reducing the amount of computation, reducing the power consumption of the electronic device, improving the performance of the electronic device, and thus improving the smoothness of product use and user experience, thereby maximizing the benefits of blurring effect and the performance and power consumption of the electronic device.
[0057] Specifically, considering the blurring effect requirements of the current scene, the performance and power consumption of the electronic devices in the current scene, and the ambient light conditions of the current scene, the corresponding blur radius is adaptively determined. Different scenes have different blurring effect requirements, varying electronic device performance and power consumption, and different ambient light conditions, thus requiring different blur radii, resulting in different blurring effects and computational resource consumption. In scenes with low blurring effect requirements, the blur radius is reduced to avoid wasting performance and power consumption. In scenes requiring a significant blurring effect, the blur radius is increased to improve the blur intensity and ensure the desired effect. In scenes with poor ambient light conditions, fewer image details can be captured by the user, thus reducing the blur radius, power consumption, and extending the usage time of the electronic devices. In scenes with high power consumption and / or low battery levels of the electronic devices, the blur radius is reduced to further reduce power consumption and extend the usage time of the electronic devices.
[0058] In this embodiment, the blur radius is adaptively determined based on factors including user information related to the current user of the electronic device (first factor), the operating state of the electronic device (second factor), and the light source in the environment where the electronic device is located (third factor). The user information in the first factor indicates the user's identity, thus determining the user's group category. The operating state of the electronic device in the second factor indicates its performance and power consumption. The light source in the environment of the electronic device in the third factor indicates the ambient light conditions. During image blurring processing, the blur radius can be dynamically adjusted based on the first, second, and third factors. This balances the requirements for blurring effect with the performance and power consumption of the electronic device, maximizing the benefits of both blurring effect and performance.
[0059] The image processing method provided in this application can be applied to electronic devices, including but not limited to mobile phones, tablets, desktops, laptops, notebook computers, ultra-mobile personal computers (UMPCs), handheld computers, netbooks, personal digital assistants (PDAs), wearable electronic devices, in-vehicle electronic devices, augmented reality (AR) devices, virtual reality (VR) devices, etc. This application does not impose any special limitations on the specific form of the electronic device.
[0060] Please see Figure 1 The present application provides an example of the hardware structure of an electronic device.
[0061] like Figure 1 As shown, the electronic device 100 may include: a processor 110, an external memory interface 120, an internal memory 121, a display screen 130, a camera 140, antenna 1, antenna 2, a mobile communication module 150, a wireless communication module 160, a sensor module 170, a USB interface 180, a charging management module 190, a power management module 191, a battery 192, etc. The sensor module 170 includes, but is not limited to, an ambient light sensor 170A.
[0062] Processor 110 may include one or more processing units, such as: application processor (AP), modem processor, graphics processing unit (GPU), image signal processor (ISP), controller, memory, video codec, digital signal processor (DSP), baseband processor, and / or neural network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
[0063] The controller can be the nerve center and command center of the electronic device 100. The controller can generate operation control signals according to the instruction opcode and timing signals to complete the control of fetching and executing instructions.
[0064] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can retrieve it directly from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0065] In some embodiments, the processor 110 may include one or more interfaces. Interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, and / or a universal serial bus (USB) interface, etc.
[0066] The GPU is a microprocessor for image processing, connected to the display screen 130 and the application processor. The GPU performs mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or modify display information. During the rendering of graphics or images, the GPU performs a series of operations, including but not limited to: vertex processing, primitive processing, rasterization, and fragment processing.
[0067] In electronic devices, the central processing unit (CPU) and graphics processing unit (GPU) can be located on the same chip or on separate chips.
[0068] The display screen 130 is used to display images, videos, etc. The display screen 130 includes a display panel. The display panel can be a Liquid Crystal Display (LCD). The display panel can also be manufactured using Organic Light-Emitting Diode (OLED), Active-Matrix Organic Light-Emitting Diode (AMOLED), Flexible Light-Emitting Diode (FLED), Quantum Dot Light-Emitting Diodes (QLED), etc. In some embodiments, the electronic device 100 may include one or N display screens 130, where N is a positive integer greater than 1.
[0069] The electronic device 100 implements its display function through a GPU, a display screen 130, and an application processor. The display screen 130 can be used for displaying... Figures 3A to 3B , Figures 6A to 9B The user interface shown.
[0070] An ambient light sensor 170A is used to sense the intensity of ambient light. The electronic device 100 can adaptively adjust the display brightness of the display screen 130 according to the sensed ambient light intensity.
[0071] Electronic device 100 can perform shooting functions through ISP, camera 140, video codec, GPU, display 130 and application processor.
[0072] The ISP (Image Signal Processor) is used to process data fed back from the camera 140. For example, when taking a picture, the shutter is opened, and light is transmitted through the lens to the camera's photosensitive element. The light signal is converted into an electrical signal, and the camera's photosensitive element transmits the electrical signal to the ISP for processing, transforming it into an image visible to the naked eye. The ISP can also perform algorithmic optimization of image noise, brightness, and skin tone. The ISP can also optimize parameters such as exposure and color temperature of the shooting scene. In some embodiments, the ISP can be set within the camera 140.
[0073] Camera 140 is used to capture still images or videos. An object is projected onto a photosensitive element by generating an optical image through the lens. The photosensitive element can be a charge-coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, which is then passed to an ISP for conversion into a digital image signal. The ISP outputs the digital image signal to a DSP for processing. The DSP converts the digital image signal into image signals in standard RGB, YUV, or other formats. In some embodiments, the electronic device 100 may include one or N cameras 140, where N is a positive integer greater than 1.
[0074] Digital signal processors (DSPs) are used to process digital signals. Besides digital image signals, they can also process other digital signals. For example, when electronic device 100 selects a frequency, the DSP can perform Fourier transforms on the frequency energy.
[0075] Video codecs are used to compress or decompress digital video. Electronic device 100 may support one or more video codecs. Thus, electronic device 100 can play or record videos in various encoding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
[0076] An NPU (Neural Processing Unit) is a computational processor for neural networks (NNs). By borrowing the structure of biological neural networks, such as the transmission patterns between neurons in the human brain, it can rapidly process input information and continuously learn on its own. NPUs enable intelligent cognitive applications in electronic devices, such as image recognition, facial recognition, speech recognition, and text understanding.
[0077] The external storage interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external storage interface 120 to perform data storage functions. For example, music, video, and other files can be saved on the external memory card.
[0078] Internal memory 121 can be used to store executable program code, which includes instructions. Processor 110 executes various functional applications and data processing of electronic device 100 by running the instructions stored in internal memory 121. Internal memory 121 may include a program storage area and a data storage area.
[0079] USB port 180 is a USB standard compliant interface, specifically a Mini USB port, Micro USB port, USB Type-C port, etc. USB port 180 can be used to connect a charger to charge electronic device 100, and can also be used for data transfer between electronic device 100 and peripheral devices. It can also be used to connect headphones for audio playback. This interface can also be used to connect other electronic devices, such as AR devices.
[0080] The charging management module 190 receives charging input from a charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 190 receives charging input from the wired charger via a USB interface 180. In some wireless charging embodiments, the charging management module 190 receives wireless charging input via the wireless charging coil of the electronic device 100. While charging the battery 192, the charging management module 190 can also supply power to the electronic device via the power management module 191.
[0081] The power management module 191 connects the battery 192, the charging management module 190, and the processor 110. The power management module 191 receives input from the battery 192 and / or the charging management module 190, providing power to the processor 110, internal memory 121, display screen 130, camera 140, and wireless communication module 160, etc. The power management module 191 can also monitor parameters such as battery capacity, battery cycle count, and battery health status (leakage current, impedance). In some other embodiments, the power management module 191 may also be located within the processor 110. In other embodiments, the power management module 191 and the charging management module 190 may be located in the same device.
[0082] In some embodiments, the electronic device 100 may further include an audio module, a speaker, a receiver, a microphone, a headphone jack, etc., to implement audio functions.
[0083] It should be understood that, Figure 1 The electronic device 100 shown is merely an example, and the electronic device 100 may have more than Figure 1 The more or fewer components shown can be combined into two or more components, or they can have different component configurations. The various components shown in the figure can be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and / or application-specific integrated circuits.
[0084] The software system of the aforementioned electronic device 100 can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture. Please refer to... Figure 2 This document exemplifies the software structure of the electronic device provided in the embodiments of this application. Of course, the embodiments of this application can also be implemented in other operating systems, provided that the functions implemented by each functional module are similar to those in the embodiments of this application.
[0085] like Figure 2 As shown, a layered architecture divides the software into several layers, each with a clear role and function. Layers communicate with each other through software interfaces. In some embodiments, the software system is divided into four layers, from top to bottom: the application layer, the application framework layer, the system library, the hardware abstraction layer, and the hardware layer.
[0086] The application layer may include a series of application packages. Application packages may include system applications. System applications are those pre-installed on an electronic device before it leaves the factory. For example, system applications may include programs such as a desktop, camera, and gallery. In some embodiments, application packages may also include third-party applications. Third-party applications are those downloaded and installed by the user from an app store (or app market). Examples include image processing applications (such as photo editing and video editing software).
[0087] The application framework layer provides application programming interfaces (APIs) and a programming framework for applications in the application layer. The application framework layer includes a set of predefined functions.
[0088] For example, the application framework layer may include a window manager, content providers, a view system, a resource manager, an activity manager, and an input manager. The window manager provides a window management service (WMS), which can be used for window management, window animation management, surface management, and as a relay station for the input system. The content provider stores and retrieves data, making this data accessible to the application. This data may include video, images, audio, etc. The view system includes visual controls, such as controls for displaying text and controls for displaying images. The view system can be used to build applications. The display interface can consist of one or more views. For example, a display interface including a text notification icon may include a view for displaying text and a view for displaying images. The resource manager provides various resources to the application, such as localized strings, icons, images, layout files, video files, etc. The activity manager provides an activity manager service (AMS) for managing the lifecycle of various applications and navigation / back functionality. AMS can be used for starting, switching, and scheduling system components (such as activities, services, content providers, and broadcast receivers), as well as managing and scheduling application processes. The Input Manager Service (IMS) provides input management services, which can be used to manage system inputs such as touchscreen input, keypad input, and sensor input. IMS retrieves events from input device nodes and, through interaction with the WMS (Windows Management System), distributes these events to appropriate windows.
[0089] In this embodiment of the application, one or more functional modules can be set in the application framework layer to implement the image processing method provided in this embodiment. For example, an adaptive blur radius module is set in the application framework layer. The adaptive blur radius module is used to acquire the influencing factors of the electronic device when the electronic device needs to perform image blurring processing, and adaptively determine the corresponding blur radius based on the influencing factors.
[0090] In some embodiments, the adaptive fuzzy radius module can be divided into two sub-functional modules: an acquisition module (not shown) and a radius determination module (not shown). The acquisition module is used to acquire the influencing factors of the electronic device. The radius determination module is used to determine the target fuzzy radius based on the influencing factors of the electronic device.
[0091] The system library can include multiple functional modules. For example, graphics library, graphics compositor (Surface Flinger, SF), surface manager, etc.
[0092] A graphics library, also known as a graphics processing library, defines cross-programming language, cross-platform application programming interfaces (APIs), which include functions for processing graphics (images). Its core function is to provide functions to perform common rendering tasks. Graphics libraries can also support various graphics effects and features, such as image blurring, color management, texture mapping, lighting, and shadows.
[0093] In this embodiment of the application, the graphics library may include blurring algorithms. These blurring algorithms include, but are not limited to: Gaussian Blur, Kawase Blur, Dual Kawase Blur, and Grainy Blur.
[0094] The graphics libraries include, but are not limited to: Open Graphics Library for Embedded System (OpenGL ES), Kronos Platform Graphics Interface, or Vulkan (a cross-platform graphics application programming interface), etc.
[0095] The Surface Flinger is a system service. This service primarily handles the creation, control, and management of Surfaces. It's responsible for combining the content of multiple applications or windows into a single final image, essentially handling layer composition. The Surface Flinger receives drawing requests from various applications or windows and, based on the window's layout, size, and position, combines this content into a final image. For example, after an application starts, Surface Flinger can create a layer for that application. During the operation of an electronic device, Surface Flinger can acquire the layers to be displayed from various applications running on the device and composite these layers using the Graphics Processing Unit (GPU) and / or Hardware Composer (HWC).
[0096] As an example, an application can send a layer creation request to Surface Flinger after it launches. Upon receiving the request, Surface Flinger creates the corresponding layer for the application and returns the layer ID to the application. The created layer has corresponding layer properties, which can include information such as the layer's size and position.
[0097] It is understandable that the graphics compositor is responsible for the rendering and compositing of images at the software level, including combining various graphic elements (such as textures, geometry, lighting, etc.), applying effects such as blur, shadows, and transparency, and finally generating a complete image.
[0098] The Surface Manager is used to manage the display subsystem and provides the fusion of 2D and 3D layers for multiple applications.
[0099] The Hardware Abstraction Layer (HAL) is a layer between the system libraries and the kernel layer. It encapsulates hardware drivers and provides a unified, generic interface for hardware capabilities to the upper layers. The HAL includes at least a hardware synthesizer.
[0100] The hardware compositor primarily provides hardware support for the image compositing system, supporting layer compositing and display modules. It's a tool used by SurfaceFlinger to composite Surfaces onto the screen. The hardware compositor can abstract objects such as overlays and 2D bitblock transporters to composite Surfaces and communicates with dedicated window compositing hardware to composite windows. Its main function is to optimize graphics rendering, improve graphics performance and stability, while reducing CPU and memory usage. HWC also supports the compositing and blending of multiple image layers, enabling more complex graphic effects. Furthermore, HWC manages the graphics buffers, passing them to the hardware for rendering and outputting the rendering results to the screen.
[0101] It is understood that different devices may have different HWC implementations, depending on the customization and optimization made by the device manufacturer based on its own hardware characteristics. This application does not specifically limit this.
[0102] The hardware layer may include processors (such as central processing units, graphics processing units, etc.), components with storage capabilities (such as memory), and components with display capabilities (such as displays). For information on central processing units, graphics processing units, and memory, please refer to [link to relevant documentation]. Figure 1 .
[0103] In some embodiments, the central processing unit can be used to control the various modules in the application framework layer to implement their respective functions, and the graphics processing unit can be used to perform corresponding rendering processing according to the APIs in the graphics library (such as OpenGL ES) called by the instructions processed by the various modules in the application framework layer.
[0104] The following example illustrates the process of generating and displaying a blurred image.
[0105] Step 1: When the target application in the application layer needs to perform image blurring, it calls the API in the application framework layer to instruct the adaptive blur radius module in the application framework layer to determine the current target blur radius.
[0106] Step 2: The adaptive fuzzy radius module acquires the influencing factors of the electronic device and determines the target fuzzy radius based on these factors. The application framework layer then transmits the target fuzzy radius determined by the adaptive fuzzy radius to the graphics library in the system library.
[0107] Step 3: The target application passes the image information (such as layer drawing information) of the image to be blurred to the graphics library in the system library through the application framework layer. The image information includes layer drawing information, image pixel information, image size, resolution, color depth, and other metadata. The image pixel information includes the color value and position information of each pixel.
[0108] Step 4: The graphics library uses a corresponding blurring algorithm (such as Gaussian blur, Kawase blur, or radial blur) or filter to blur the image information of the image to be processed based on the target blur radius, thus obtaining the blurred image information. For example, the graphics library uses a Gaussian blur algorithm to generate a blur effect based on the target blur radius. The working principle of Gaussian blur is: for each pixel in an image, with this pixel as the center, the RGB components of this pixel are replaced by the weighted average of the red (R), green (G), and blue (B) components of the surrounding pixels, and the pixel is redrawn to obtain the blurred image information.
[0109] Step 5: The graphics compositor receives the blurred image information from the graphics library and further processes and synthesizes it to obtain the image information of the target blurred image. For example, the graphics compositor can merge the blurred image information with other graphic elements (such as text, icons, etc.), or overlay or blend multiple blurred images to create the image information of the target blurred image. The graphics compositor may adjust the image size, position, color, and other attributes according to the application's needs or user instructions to meet different display and output requirements.
[0110] Step 6: The graphics compositor calls graphics APIs (such as OpenGL, DirectX, etc.) to transmit the image information of the target blurred image to the hardware compositor.
[0111] Step 7: The hardware compositor performs a series of operations to process and render the image based on the received target blurred image information, obtaining an intermediate composite result. These operations typically include, but are not limited to, layer merging, color adjustment, and special effects processing. The hardware compositor merges these layers according to predetermined compositing rules or algorithms, such as simple overlay, blending, and transparency adjustment. During the layer merging process, the hardware compositor may also adjust the image colors and apply various special effects, such as image blurring, sharpening, and color correction.
[0112] Step 8: The hardware compositor transmits intermediate compositing results to the GPU. The GPU performs vertex processing, primitive assembly, geometry shader (if enabled), rasterization, fragment processing, and per-fragment operations to ultimately generate a rendered image and write it to the framebuffer.
[0113] Step 9: The driver and controller of the display device (such as a display screen) are responsible for reading the data in the frame buffer and controlling the scanning output process of the display screen, and finally displaying the target blurred image on the display screen.
[0114] It is understood that the above description is a simplified example, and different software architectures may include different components and interaction relationships. Furthermore, different software architecture designs may have different implementation methods, which this application does not specifically limit.
[0115] The following describes some exemplary user interfaces (UIs) provided by electronic device 100. The term "user interface" in the specification, claims, and drawings of this application refers to the medium interface through which an application or operating system interacts and exchanges information with the user; it realizes the conversion between the internal form of information and a form acceptable to the user. The user interface of an application is source code written in a specific computer language such as Java or Extensible Markup Language (XML). The interface source code is parsed and rendered on the terminal device, ultimately presenting content that the user can recognize. A common form of user interface is the graphical user interface (GUI), which refers to a user interface related to computer operation displayed graphically. It can be an icon, window, control, or other interface element displayed on the display screen 130 of electronic device 100. Controls can include visible interface elements such as icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, widgets, and components. In this application, "user interface" can also be simply referred to as "interface."
[0116] The image processing method provided in this application can be applied to scenarios involving image blurring based on blur radius. Application scenarios for image blurring based on blur radius may include, but are not limited to: user interface and interaction design, privacy protection, and camera and photography applications.
[0117] User interface and interaction design applications can include, but are not limited to, blurred backgrounds and transition animations. For example, in mobile application interfaces, desktops, or pop-ups, using blurred backgrounds can make the current focus stand out more. As another example, during interface transitions or user feedback, blurring effects can be used as part of transition animations to make interface transitions smoother and more natural.
[0118] Privacy protection applications can include, but are not limited to, privacy masking. For example, when displaying sensitive information, such as notification previews or message content, blurring can be used to protect user privacy from being easily viewed by others.
[0119] Cameras and photography applications can include, but are not limited to, background blurring, real-time preview, and adjustments. For example, when shooting portraits or objects, the camera can blur the background to make the subject stand out more. Another example is that during the shooting process, users can preview the image after applying the blur effect in real time and adjust the blur level instantly.
[0120] Image blurring based on blur radius can include, but is not limited to, local blurring, global blurring, static blurring, and dynamic blurring; this application does not specifically limit these. Global blurring can be understood as the entire image being blurred or out of focus, meaning the blurring effect is applied uniformly to the entire image without distinguishing specific regions. Local blurring can be understood as a partial area of the image being blurred or out of focus, with the blurring effect only affecting that part of the image while the rest remains clear.
[0121] For ease of understanding, the following embodiments of this application will take a mobile phone as an example of an electronic device having the above-described hardware structure and software architecture, and will exemplarily illustrate the image processing method provided in the embodiments of this application in conjunction with the accompanying drawings.
[0122] Please see Figure 3A This example illustrates a partially blurred scene on a mobile phone.
[0123] like Figure 3AAs shown, mobile phone 100 displays user interface 101. User interface 101 displays wallpaper 102, message pop-up window 103, and various applications, such as clock application 104, calendar application 105, gallery application 106, and memo application 107. Message pop-up window 103 obscures parts of clock application 104, calendar application 105, gallery application 106, and memo application 107, and also partially obscures wallpaper 102. The obscured application and wallpaper areas in the area where message pop-up window 102 is located are partially blurred.
[0124] It is understandable that the above Figure 3A The partial blur shown is merely an example. Partial blur can be used when a mobile phone displays message pop-ups, volume bars, voice assistants, etc. This application does not specifically limit this aspect.
[0125] Please see Figure 3B This example illustrates a global blur scene on a mobile phone.
[0126] like Figure 3B As shown, mobile phone 100 displays a power-on / off screen 108. The power-on / off screen 108 obscures the wallpaper 102 and various applications. The power-on / off screen 108 displays a restart control 109 and a power-off control 110.
[0127] It is understandable that the above Figure 3B The global blur shown is merely an example. Global blur can also be used when a mobile phone displays the power on / off screen, the lock screen (the screen displayed when the terminal device is in a locked state), the screen for entering the unlock password, etc. This application does not specifically limit this.
[0128] In the embodiments of this application, when an electronic device performs image blurring based on a blur radius, it uses a blur algorithm. The image processing method provided in the embodiments of this application can be applied to blur algorithms that use blur radii, including but not limited to: Gaussian blur, Kawase blur, double blur, and granular blur. This application does not specifically limit the specific algorithms used.
[0129] The blur radius is a parameter used to set the degree of blur in an image. When adding a blur effect to an image, you can control the degree of blur by adjusting the value of the blur radius.
[0130] In image processing, blurring is typically achieved through a convolution process involving a blur kernel (also called a filter or convolution kernel). The blur kernel is a small matrix that determines the degree of influence each pixel and its neighbors have on the final blur effect. As the blur radius increases, the size of the blur kernel also increases. The size of the blur kernel determines the number of neighboring pixels involved in calculating the new value for each pixel. For example, a 3x3 blur kernel considers the target pixel and its eight surrounding pixels, while a 5x5 blur kernel considers even more pixels.
[0131] Therefore, as the blur radius increases, the size of the blur kernel becomes larger, and the new value of each pixel needs to consider more neighboring pixels. This means that more multiplication and addition operations are required to calculate the new value of each pixel. As the number of pixels involved in the calculation increases, the amount of computation required for the entire image processing process also increases significantly.
[0132] The following section uses Gaussian blur as an example to explain the relationship between the blur radius, the degree of blur, and the computational cost.
[0133] Gaussian blur uses a Gaussian function (Gaussian kernel) to filter an image. For example... Figure 4 As shown, the Gaussian kernel is a 3x3 matrix. The input matrix is convolved with the Gaussian kernel matrix to obtain the output matrix.
[0134] The input matrix is a two-dimensional array where each element represents the pixel value at the corresponding location in the image. For example, for a grayscale image, pixel values are typically integers between 0 and 255, representing brightness; for a color image, each pixel consists of values from three or four channels (such as RGB or RGBA).
[0135] A Gaussian kernel is a two-dimensional weight matrix used to define the blurring operation. It's a bell-shaped curve that smooths pixel values in an image, maximizing the weight contribution of surrounding pixels to the central pixel and gradually decreasing the weight of pixels farther from the center. The process of convolution processing an image based on a Gaussian kernel can be understood as a weighted average of the Gaussian kernel and the corresponding two-dimensional matrix of the image. The size (i.e., its dimension) and shape (determined by the blur radius) of the Gaussian kernel determine the degree and range of blurring.
[0136] The output matrix is the image pixel values after Gaussian blurring.
[0137] The blur radius is a crucial parameter of the Gaussian kernel, determining its size and shape. A larger blur radius results in a larger Gaussian kernel with a wider weight distribution, leading to more even weight distribution among surrounding pixels, a higher degree of blur, and a stronger blur effect. Conversely, a smaller blur radius produces a smaller Gaussian kernel with a more concentrated weight distribution, meaning only localized areas of surrounding pixels affect the blurring of the central pixel, resulting in a weaker blur effect. Consequently, a larger blur radius requires a larger Gaussian kernel, increasing the computational load on the processor (such as a graphics processing unit) and directly increasing the power consumption required for each blurring operation.
[0138] It is understandable that different fuzzing algorithms may respond differently to the fuzzing radius, but there is a certain positive correlation between the fuzzing radius and the fuzzing effect. Correspondingly, there is a certain positive correlation between the fuzzing radius and the computational load.
[0139] The following uses electronic device 100 as a mobile phone. Figure 5 Taking the global blurring of the image 501 to be processed as an example, this paper exemplifies the image processing method provided in the embodiments of this application.
[0140] Figure 5 The image to be processed 501 shown is an image that has not yet undergone image blurring processing. It can be an image pre-stored in the electronic device, an image downloaded by the electronic device through the network, or an image generated by the application without image blurring processing. It can be a single image or a frame from a video; this application does not specifically limit it in this regard.
[0141] In scenario A, a first user uses mobile phone 100 to blur image 501. When mobile phone 100 blurs image 501, it acquires influencing factors, including the first user's age group. Mobile phone 100 blurs image 501 based on the first user's age group, resulting in the following: Figure 6A The blurred image 601 shown.
[0142] In scenario B, the second user uses mobile phone 100 to blur the image 501 to be processed. When mobile phone 100 blurs the image 501, it acquires influencing factors, including the second user's age group. Mobile phone 100 blurs the image 501 according to the second user's age group, resulting in the following: Figure 6B The blurred image shown is 602.
[0143] The blurriness of both blurred images 601 and 602 is higher than that of the image to be processed 501.
[0144] The difference between scenario A and scenario B lies in the different age groups of the first and second users. Figure 6A The blurred image 601 shown and Figure 6B The blurred images 602 shown have different degrees of blurring, resulting in different blurring effects. Specifically, based on the fact that the age group of the first user is younger than that of the second user, the blurring degree of blurred image 601 is higher than that of blurred image 602, that is, the blurring effect of blurred image 601 is stronger than that of blurred image 602.
[0145] In scenario C, when mobile phone 100 performs image blurring on image 501, the influencing factors of mobile phone 100 are obtained, including the fact that the battery level of mobile phone 100 is 100%. Mobile phone 100 performs image blurring on image 501 based on the obtained 100% battery level, resulting in the following: Figure 7A The blurred image 701 shown is an example. Figure 7A As shown, the phone 100 also displays a battery icon 702, which indicates that the battery level of the phone 100 is 100%.
[0146] In scenario D, when mobile phone 100 performs image blurring on image 501, the influencing factors of mobile phone 100 are obtained, including the fact that the battery level of mobile phone 100 is 30%. Mobile phone 100 performs image blurring on image 501 based on the obtained battery level of 30%, resulting in the following: Figure 7B The blurred image 703 is shown. (As shown...) Figure 7B As shown, the phone 100 also displays a battery icon 704, which indicates that the battery level of the phone 100 is 30%.
[0147] The blurriness of both blurred images 701 and 703 is higher than that of the image to be processed 501.
[0148] The difference between scenario C and scenario D lies in the battery capacity of the phone. Figure 7A The blurred image 701 shown and Figure 7B The blurred images 703 shown have different degrees of blur and thus present different blur effects. Specifically, since the battery power in scene C is greater than that in scene D, the blur degree of blurred image 701 is higher than that of blurred image 703, that is, the blur effect of blurred image 701 is stronger than that of blurred image 703.
[0149] In scenario E, when mobile phone 100 performs image blurring on image 501, the influencing factors of mobile phone 100 are obtained, including the display brightness of mobile phone 100 being 450 nits. Mobile phone 100 performs image blurring on image 501 based on the obtained display brightness of 450 nits, resulting in the following: Figure 8A The blurred image shown is 801. (As shown...) Figure 8A As shown, the phone responds to the user's pull-down gesture and displays the following: Figure 8B The dropdown menu 802 is shown. Dropdown menu 802 includes a brightness bar 803 and multiple controls. These controls include, for example, mobile data controls, WLAN controls, mute controls, and Bluetooth controls. The starting position of the brightness bar 803 is 0%, corresponding to a screen brightness of 'a' (e.g., 50 nits), and the ending position of the brightness bar 803 is 100%, corresponding to a screen brightness of 'b' (e.g., 600 nits). Figure 8B As shown, the current brightness bar 803 is adjusted to 90%, so the current display brightness of the mobile phone 100 is 450 (600*90%) nits.
[0150] In scenario F, when mobile phone 100 performs image blurring on image 501, the influencing factors of mobile phone 100 are obtained. These factors include the display brightness of mobile phone 100 being 90 nits. Mobile phone 100 performs image blurring on image 501 based on the obtained display brightness of 90 nits, resulting in the following: Figure 9A The blurred image shown is 804. (As shown...) Figure 9A As shown, the phone responds to the user's pull-down gesture and displays the following: Figure 9B The dropdown menu 805 is shown. Dropdown menu 805 includes a brightness bar 806 and multiple controls. For details on dropdown menu 805, please refer to dropdown menu 802; for details on brightness bar 806, please refer to brightness bar 803. Further details will not be provided here. Figure 8B As shown, the current brightness bar 806 is adjusted to 15%, so the current display brightness of the mobile phone 100 is 90 (600*15%) nits.
[0151] The blurriness of both blurred images 801 and 804 is higher than that of the image to be processed 501.
[0152] The difference between Scene E and Scene F lies in the display brightness of the phone. Figure 8A The blurred image 801 shown Figure 9AThe blurred images 804 shown have different degrees of blur and thus present different blur effects. Specifically, since the display brightness of mobile phone 100 in scene E is greater than that in scene F, the blur degree of blurred image 801 is higher than that of blurred image 804, that is, the blur effect of blurred image 801 is stronger than that of blurred image 804.
[0153] It is understandable that different types of fuzziness may represent different degrees of fuzziness, as mentioned above. Figures 6A to 9B This is just an example; it can also be used to... Figure 5 This application does not specifically limit the specific application scenarios, blurred objects, or blurred algorithms for performing local blurring or other blurring processes.
[0154] From scenarios A and B, we can see that the blurriness (corresponding to the blur radius) of the dependent variable image changes as the user's age group (the independent variable) changes. From scenarios C and D, we can see that the blurriness (corresponding to the blur radius) of the dependent variable image changes as the battery level (the independent variable) changes. From scenarios E and F, we can see that the blurriness (corresponding to the blur radius) of the dependent variable image changes as the display brightness (the independent variable) changes.
[0155] The following describes the image processing method provided by the embodiments of this application.
[0156] Please see Figure 10 This application provides an example of an image processing method applied to an electronic device, which includes steps S101 and S102.
[0157] Step S101: When the electronic device is in the first scene, the image to be processed is blurred to obtain and display the first blurred image.
[0158] Step S102: When the electronic device is in the second scene, the image to be processed is blurred to obtain and display the processed second blurred image. The blurring degree of the first blurred image and the second blurred image are different. The influencing factors of the difference between the first scene and the second scene include at least one of the following: a first factor, a second factor and a third factor. The first factor is related to the user information of the current user of the electronic device, the second factor is related to the operating status of the electronic device, and the third factor is related to the light source in the environment where the electronic device is located.
[0159] In this embodiment, the first blurred image corresponds to a first blurred radius, and the second blurred image corresponds to a second blurred radius. Since the first blurred radius differs from the second blurred radius, the first blurred image and the second blurred image exhibit different degrees of blur.
[0160] In this embodiment, the first factor is related to the user information of the current user using the electronic device. The user information can be used to indicate the identity of the current user and determine the group category of the current user.
[0161] In the embodiments of this application, user information includes the user's age group. The inventors discovered during the implementation of these embodiments that different users have different needs regarding blurring effects and / or performance / power consumption. In particular, users of different age groups have different needs regarding blurring effects and / or performance / power consumption. For example, the elderly and middle-aged populations have a less strong need for blurring effects than for performance / power consumption, thereby reducing the blur radius and the degree of blur.
[0162] In some embodiments, user information may also include the user's usage habits. The inventors also discovered during the implementation of the embodiments of this application that a user may own multiple electronic devices simultaneously and assign different functions to each device. For example, a user may own two mobile phones, one of which, phone A, is used only for calls and not for display functions, while the other, phone B, is used for more functions, such as reading text messages and watching videos. For phone A, the user is not particularly concerned about the display effect of the user interface, so the blur radius when phone A performs image blurring can be reduced, thus reducing the degree of blur.
[0163] In this embodiment, the electronic device can categorize user groups based on a first factor. When the first factor includes the current user's age range, different user group categories can be determined based on different age ranges. Age ranges can be divided into elderly and non-elderly groups, so the user group categories can include elderly and non-elderly groups. Age ranges can also be divided into elderly, middle-aged, and young groups, so the user group categories can include elderly, middle-aged and elderly, and young people. When the first factor includes the user's usage habits, different user group categories can be determined based on different usage habits. For example, based on usage habits, users can be divided into a first user group and other user groups, where the first user group consists of users who do not frequently use display-related functions. When the first user group uses the electronic device for image blurring, the blur radius can be reduced, thus lowering the blur level.
[0164] In this embodiment, the second factor is related to the operating state of the electronic device, which indicates the performance, power consumption, and / or battery life and / or resource scheduling of the electronic device. The operating state of the electronic device may include at least one of the following: application operating state, processor workload, and system power state.
[0165] The application running status information can include focused applications, non-focused applications, and background applications, as well as the running status of each application. The running status of each application can be determined based on system events from the corresponding probes. For example, by using GPU probes, audio probes, and camera probes, we can obtain whether the application is using the GPU, audio, and camera. If the GPU and camera are used, the app's running status is determined to be video; if the GPU and camera are not used, and only audio is used, the app's running status is determined to be audio.
[0166] Electronic devices can further determine the resource usage in the current scene based on the information of the application's running status. For example, if the GPU probe obtains a system event indicating the use of the GPU 3D engine, it means that the GPU is used for 2D or 3D rendering operations. It can be inferred that the user is browsing video resources on the electronic device rather than playing videos, that is, video apps are in the state of browsing videos.
[0167] Electronic devices can further determine the number of running applications based on information about the application's running status, such as the number of focused applications, non-focused applications, and background applications, as well as the total number of all running applications.
[0168] The processor's workload level can include the workload level of the central processing unit (CPU) and / or the graphics processing unit (GPU). An electronic device can determine the workload level of a processor core based on its load; that is, the higher the load on a processor core, the higher its workload level, and vice versa. The processor's workload level includes the load of the CPU and / or the graphics processing unit (GPU).
[0169] The system power status can include battery level and / or available time. Battery level refers to the remaining battery power of the electronic device. The electronic device can estimate its available time with the current remaining battery power based on the user's usage patterns (such as the applications used and their usage duration) and the current remaining battery power.
[0170] In embodiments of this application, the second factor includes the workload of the processor in the electronic device and / or the battery level in the electronic device. In other embodiments, the second factor may also include parameters related to the applications running on the electronic device, such as the number of applications running. In still other embodiments, the second factor may also include the available time of the electronic device.
[0171] In the embodiments of this application, when an electronic device performs image blurring processing, the higher the processor's workload, and / or the lower the battery power, and / or the more applications are running, and / or the shorter the available time, the lower the blur radius and the lower the blur degree.
[0172] In this embodiment, the third factor is related to the light source in the environment where the electronic device is located, and the third factor indicates the ambient light conditions of the environment where the electronic device is located. The light source in the environment where the electronic device is located may include the display screen of the electronic device and external light sources in the environment. When the display screen of the electronic device is turned on, it can provide corresponding light as a light source. External light sources may include, but are not limited to: lamps, and the displays of other electronic devices that are turned on.
[0173] In this embodiment, the electronic device includes a display screen and an ambient light sensor. The electronic device uses the ambient light sensor to collect the light intensity of the environment in which it is located, thus obtaining the ambient light intensity. When the ambient light intensity is weak, the electronic device can automatically reduce the display screen brightness. Conversely, when the ambient light intensity is strong, the electronic device can increase the display screen brightness.
[0174] In this application embodiment, the third factor includes the ambient light intensity collected by the electronic device and / or the display brightness of the electronic device (the display brightness of the screen of the electronic device).
[0175] In this embodiment of the application, when the different influencing factors in the first scenario and the second scenario include at least one of the following: a first factor, a second factor, and a third factor. For example, the first factor of the first scenario is different from the first factor of the second scenario, or, the second factor of the first scenario is different from the second factor of the second scenario, or, the third factor of the first scenario is different from the third factor of the second scenario, or, the first factor and the second factor of the first scenario are respectively different from the first factor and the second factor of the second scenario, or, the first factor and the third factor of the first scenario are respectively different from the first factor and the third factor of the second scenario, or, the second factor and the third factor of the first scenario are respectively different from the second factor and the third factor of the second scenario, or, the first factor, the second factor, and the third factor of the first scenario are respectively different from the first factor, the second factor, and the third factor of the second scenario.
[0176] Specifically, the first scenario and the second scenario may include, but are not limited to, the following situations:
[0177] In scenario (1), the difference between the first and second scenarios is that the user's age group in the first scenario is younger than that in the second scenario, the first blur radius is larger than the second blur radius, and the blur degree of the first blurred image is higher than that of the second blurred image. As described above... Figures 6A to 6BThe age group of the first user is younger than that of the second user, and the blurriness of blurred image 601 is higher than that of blurred image 602.
[0178] In scenario (2), the difference between the first scenario and the second scenario is that the age range of the user in the first scenario is greater than that of the user in the second scenario, the first blur radius is smaller than the second blur radius, and the blur degree of the first blurred image is lower than that of the second blurred image.
[0179] In scenario (3), the difference between the first scenario and the second scenario is that the processor is busier in the first scenario than in the second scenario, the first blur radius is smaller than the second blur radius, and the blur degree of the first blurred image is lower than that of the second blurred image.
[0180] In scenario (4), the difference between the first scenario and the second scenario is that the processor is less busy in the first scenario than in the second scenario, the first blur radius is greater than the second blur radius, and the blur degree of the first blurred image is greater than the blur degree of the second blurred image.
[0181] In scenario (5), the difference between the first scenario and the second scenario is that the number of applications running on the electronic device in the first scenario is less than the number of applications running on the electronic device in the second scenario, the first blur radius is greater than the second blur radius, and the blur degree of the first blurred image is higher than the blur degree of the second blurred image.
[0182] In scenario (6), the difference between the first scenario and the second scenario is that the number of applications running on the electronic device in the first scenario is greater than the number of applications running on the electronic device in the second scenario, the first blur radius is smaller than the second blur radius, and the blur degree of the first blurred image is lower than the blur degree of the second blurred image.
[0183] In scenario (7), the difference between the first scenario and the second scenario is that the battery power in the first scenario is lower than that in the second scenario, the first blur radius is smaller than the second blur radius, and the blur degree of the first blurred image is lower than that of the second blurred image.
[0184] In scenario (8), the difference between the first and second scenarios is that the battery power in the first scenario is higher than that in the second scenario, the first blur radius is larger than the second blur radius, and the blurriness of the first blurred image is greater than that of the second blurred image. As described above... Figures 7A to 7B In scene C, the battery power is greater than that in scene D, and the blurriness of blurred image 701 is greater than that of blurred image 703.
[0185] In scenario (9), the difference between the first scenario and the second scenario is that the available time of the electronic device in the first scenario is longer than that in the second scenario, the first blur radius is larger than the second blur radius, and the blur degree of the first blurred image is higher than that of the second blurred image.
[0186] In scenario (10), the difference between the first scenario and the second scenario is that the available time of the electronic device in the first scenario is less than the available time of the electronic device in the second scenario, the first blur radius is less than the second blur radius, and the blur degree of the first blurred image is lower than the blur degree of the second blurred image.
[0187] In scenario (11), the difference between the first scene and the second scene is that the ambient light intensity in the first scene is less than that in the second scene, the first blur radius is less than the second blur radius, and the blur degree of the first blurred image is lower than that of the second blurred image.
[0188] In scenario (12), the difference between the first scene and the second scene is that the ambient light intensity in the first scene is greater than that in the second scene, the first blur radius is greater than the second blur radius, and the blur degree of the first blurred image is higher than that of the second blurred image.
[0189] In scenario (13), the difference between the first scene and the second scene is that the display brightness in the first scene is lower than that in the second scene, the first blur radius is smaller than the second blur radius, and the blur degree of the first blurred image is lower than that of the second blurred image.
[0190] In scenario (14), the difference between the first scene and the second scene is that the display brightness in the first scene is higher than that in the second scene, the first blur radius is larger than the second blur radius, and the blur degree of the first blurred image is higher than that of the second blurred image. As described above... Figures 8A to 9B In scene E, the display brightness of mobile phone 100 is greater than that of mobile phone 100 in scene F, and the blurriness of blurred image 801 is greater than that of blurred image 804.
[0191] In other embodiments, the first scenario and the second scenario may include a combination of any two or more of the above scenarios, such as a combination of scenario (1) and scenario (4), or a combination of scenario (2), scenario (3), scenario (7) and scenario (11).
[0192] In the embodiments of this application, when the blur radius corresponding to different influencing factors in the first scene and the second scene changes differently, for example, when the first scene and the second scene include a combination of situation (1) and situation (3), the electronic device can integrate different influencing factors (such as considering priority and / or weight) to balance the current scene's demand for blur effect, the current scene's performance power consumption of the electronic device, and the current scene's ambient light conditions to determine a suitable blur radius.
[0193] In the embodiments of this application, the images to be processed in the first scene and the second scene can be the same image or different images, and the embodiments of this application do not specifically limit this.
[0194] In this embodiment, the blurring algorithm used for image blurring in the first and second scenarios can be the same. The difference between the first and second scenarios may lie only in the aforementioned influencing factors.
[0195] In the embodiments of this application, the first blurred image and the second blurred image have different degrees of blurring, which can be judged from the image clarity, edge sharpness, contrast, loss of detail and overall impression.
[0196] It's understandable that sharper images typically retain more detail and texture, while blurry images may lose these details, making the image content less distinct. Edge sharpness: In a sharp image, the edges of objects are sharper, and lines are more defined. In a blurry image, the edges of objects become blurred, and lines become less distinct. Contrast: Blur can reduce the overall contrast of an image, making the differences between light and dark areas less pronounced. Blurry images appear darker or more monotonous, while sharp images may have higher contrast. Blur can also cause some details in an image to be lost or become difficult to discern. Loss of detail: When evaluating the blurriness of two images, it can be noticed that some details in one image become blurred or disappear in the other. Overall impression: Overall, a blurry image may give a soft, hazy feeling, while a sharp image may be more vivid and realistic.
[0197] For example, when the blur level of the first blurred image is lower than that of the second blurred image, the sharpness and / or edge sharpness and / or contrast of the first blurred image is higher than that of the second blurred image, and / or the loss of detail in the first blurred image is less than that in the second blurred image, and / or the first blurred image is more vivid and realistic relative to the second blurred image.
[0198] In other embodiments, the blurriness of the first blurred image is lower than that of the second blurred image. This can be calculated by comparing the mean squared error between the first and second blurred images; a higher peak signal-to-noise ratio (PSNR) indicates a sharper image and a lower degree of blurriness. Alternatively, it can be calculated by comparing the brightness, contrast, and structural similarity between the first and second blurred images; a closer SSIM value to 1 indicates a sharper image and a lower degree of blurriness.
[0199] In this embodiment, the corresponding blur radius can be adaptively set according to one or more influencing factors in different scenarios, and then image blurring can be performed based on the adaptively set blur radius to obtain the corresponding blur degree. This avoids using a pre-configured blur radius in different scenarios, which would prevent the maximization of both blur effect and performance / power consumption benefits.
[0200] Figure 11 Another image processing method provided by an embodiment of this application is described by way of example. This image processing method is applied to an electronic device and includes steps S111 to S113.
[0201] Step S111: Obtain the influencing factors of the electronic device. The influencing factors include at least one of the following: a first factor, a second factor, and a third factor. The first factor is related to the user information of the current user using the electronic device, the second factor is related to the operating status of the electronic device, and the third factor is related to the light source in the environment where the electronic device is located.
[0202] In this embodiment of the application, when an electronic device needs to perform image blurring processing, the influencing factors of the electronic device are obtained. The relevant content of the first factor, the second factor, and the third factor can be referred to the above. Figure 10 This will not be elaborated upon here.
[0203] In this application embodiment, the electronic device may obtain the current user's age range in ways including but not limited to the following:
[0204] (1) The system application of electronic devices can obtain user registration information, and based on the user registration information, the age range information entered by the user can be obtained.
[0205] (2) Electronic devices can sense user information and infer the user's age group based on the sensed information. For example, if the device senses that the user frequently accesses fitness and health-related functions, it can infer that the user belongs to the youth or middle-aged age group.
[0206] (3) Determining the user's age group based on the device model of the electronic device. For example, mobile phone manufacturers can develop corresponding mobile phone models for different age groups, and then determine the user's age group based on the mobile phone model.
[0207] In this embodiment, the electronic device can obtain the user's usage habits based on the user's historical usage of the electronic device's functions and the applications installed on the electronic device. Alternatively, if the electronic device does not have any additional third-party applications related to the display function installed, and the user rarely uses the display function, then the user can be identified as the first user group.
[0208] In this embodiment, the electronic device can determine the workload of the central processing unit (CPU) and / or graphics processing unit (GPU) based on their load. The electronic device can view the CPU and GPU load using system monitoring tools.
[0209] CPU load can be determined by checking CPU utilization. CPU utilization refers to the activity level of the CPU over a certain period of time, usually expressed as a percentage. High CPU utilization indicates a high CPU load, possibly due to the CPU handling many computational tasks. In some embodiments, a CPU utilization exceeding 70%–80% is considered a high CPU load.
[0210] GPU load can be assessed by examining GPU utilization and / or rendering time. GPU utilization indicates the activity level of the GPU, usually expressed as a percentage. High GPU utilization suggests a high GPU load, potentially indicating a heavy workload of graphics rendering tasks. Rendering time is also an important indicator; longer rendering times suggest a high GPU load. Generally, a GPU load is considered high when GPU utilization exceeds 70%–80% or rendering times are prolonged.
[0211] In this embodiment, CPU / GPU utilization can be used as a criterion for distinguishing between high and low load. For example, utilization of 0-50% is considered low load, 50%-80% is considered medium load, and above 80% is considered high load. Determining processor load based on percentage utilization can be done according to actual circumstances, and this embodiment does not impose specific limitations on this.
[0212] It is understood that the processor load or the processor's busyness can also be determined based on other parameters, and this application does not specifically limit this.
[0213] In this embodiment, the electronic device can obtain the battery's power level through an operating system or a specific driver. The electronic device can also obtain the remaining battery power's usable time through an operating system or a specific driver.
[0214] In this embodiment of the application, the electronic device collects ambient light from the external environment through an ambient light sensor to obtain the ambient light intensity.
[0215] In this embodiment of the application, the electronic device can obtain the display brightness of the display screen through interaction with the display screen hardware and the operating system or device driver. The electronic device can obtain the display brightness of the display screen in ways including, but not limited to, the following:
[0216] (1) Display screen hardware typically has an interface for communicating with the processor, such as I2C (Inter-Integrated Circuit), SMBus (System Management Bus), or other dedicated interfaces. The processor of the electronic device reads the current settings and status of the display screen, including the brightness level, through the above interfaces.
[0217] (2) The operating system or device driver provides a software interface for communicating with the display hardware. The processor of the electronic device interacts with the display hardware by executing code in the operating system or device driver.
[0218] (3) Users can adjust the screen brightness through the operating system interface (such as sliders, buttons, or shortcut keys). These user inputs are captured by the operating system or device drivers and converted into appropriate control signals, which are then sent by the processor to the screen hardware.
[0219] It is understood that the above examples illustrate the methods by which electronic devices acquire influencing factors, and this application does not specifically limit the methods by which electronic devices acquire influencing factors.
[0220] In this embodiment of the application, the target application in the application layer generates an image blurring instruction based on the user's operation or preset rules. The electronic device can respond to the image blurring instruction and obtain the influencing factors of the electronic device in real time. Subsequently, the corresponding target blur radius can be determined based on the influencing factors obtained in real time.
[0221] An image blur instruction is used to instruct an image to be blurred. The image blur instruction may include specifying the type of blur (such as Gaussian blur, motion blur, etc.), the area to be blurred, etc. In some embodiments, the image blur instruction may specify the image to be blurred. An electronic device can determine the image to be blurred based on the image blur instruction.
[0222] In this embodiment, image blurring processing can be real-time image blurring processing performed on the image frame sequence of the display interface of an electronic device. Correspondingly, the image to be processed is each frame of the image displayed on the screen of the electronic device or a portion of each frame of the image. The screen of the electronic device typically refreshes at a fixed frame rate. Taking a fixed frame rate of 120 Hz as an example, the screen of the electronic device can display 120 frames of images per second. Each frame of these 120 frames can then be used as the image to be processed.
[0223] In this embodiment, the methods for triggering image blurring on the electronic device include, but are not limited to, those triggered by a target operation gesture or according to preset rules. For example, if a user performs a long press operation on any display component in the electronic device's display interface (i.e., touches for more than a target duration), the electronic device can trigger image blurring. Correspondingly, the electronic device will overlay the interface wallpaper and the display component as the image to be processed. It can be understood that the image to be processed includes each frame of the interface wallpaper within the target duration and the image obtained by overlaying the display component corresponding to each frame of the interface wallpaper. Of course, the target operation gesture may also include gestures such as dragging, clicking, or double-clicking on the status bar or display component in the display interface. Multiple target operation gestures can be preset according to actual needs, and this embodiment does not limit this.
[0224] In other embodiments, image blurring can also be applied to an image to be processed in image processing software in an electronic device; correspondingly, the image to be processed is an image that the user inputs into the image processing software and that needs to be blurred.
[0225] In this embodiment, the electronic device can determine the corresponding target blur radius based on real-time obtained influencing factors, and then perform image blurring processing based on the target blur radius. When the electronic device performs image blurring processing, it obtains influencing factor A. The electronic device first determines the target blur radius r1 based on influencing factor A, and then performs image blurring processing on the first image based on the target blur radius r1 (e.g., using blurring algorithm a), obtaining a blurred image. When the electronic device continues image blurring processing, the obtained influencing factor is influencing factor B. The electronic device then determines the target blur radius r2 based on influencing factor B, and performs image blurring processing on the second image based on the target blur radius r2 (e.g., using blurring algorithm a), obtaining a blurred image. Because influencing factors A and B are different, the determined target blur radii r1 and r2 are different. Using the same blurring algorithm, different blurring effects are obtained based on different target blur radii. The first image and the second image can be the same image or different images.
[0226] For example, when an electronic device blurs a video, if the user moves from a bright environment to a dark environment during the blurring process, the degree of blurriness of the blurred image obtained by the electronic device in the bright environment will be different from the degree of blurriness of the blurred image obtained by the electronic device in the dark environment.
[0227] Step S112: Determine the target fuzzy radius based on influencing factors.
[0228] In this embodiment, the electronic device can determine the current target fuzzy radius based on the currently obtained influencing factors. When one influencing factor is obtained, the current target fuzzy radius is determined based on that factor. When two or more influencing factors are obtained, the current target fuzzy radius is determined based on those two or more factors.
[0229] In this embodiment, the influencing factors may include one or more parameters. For example, a first factor may include the user's age group. Another example is that a second factor may include the processor's workload and battery level. When the user's age group is obtained, the current target blur radius is determined based on the user's age group. When the user's age group and the processor's workload are obtained, the current target blur radius is determined based on both the user's age group and the processor's workload.
[0230] In this embodiment of the application, the electronic device can configure the correspondence between the influencing factors and the fuzzy radius, and then determine the current optimal target fuzzy radius based on the influencing factors obtained by the current electronic device and the correspondence between the influencing factors and the fuzzy radius.
[0231] In other embodiments, corresponding weights can be configured for each influencing factor, and then the current optimal target fuzzy radius can be determined based on the weights, correspondences, and influencing factors.
[0232] In other embodiments, a corresponding priority can be configured for each influencing factor, and then the current optimal target fuzzy radius can be determined based on the priority, the correspondence, and the influencing factor.
[0233] In other embodiments, corresponding weights and priorities can be configured for each influencing factor, and then the current optimal target fuzzy radius can be determined based on the priority, weight, correspondence and influencing factor.
[0234] Step S113: Perform image blurring processing on the image to be processed according to the target blur radius to obtain the target blurred image.
[0235] In this embodiment, after determining the target blur radius, image blurring processing is performed on the image to be processed based on the target blur radius and the blurring algorithm to obtain the target blurred image. The target blurred image is the image obtained by blurring the image to be processed based on the target blur radius.
[0236] In this embodiment, the requirements of the current scenario are determined based on influencing factors, and then an appropriate target blur radius is adaptively configured based on the requirements of the current scenario to balance the relationship between the requirements for blur effect and the performance and power consumption of electronic devices, so as to maximize the benefits of both blur effect and performance and power consumption.
[0237] Figure 12 This application provides an exemplary method for determining the fuzzy radius of a target.
[0238] Step S121: Obtain the first correspondence relationship related to the influencing factors.
[0239] In this embodiment of the application, the electronic device configures the relationship between each influencing factor and the fuzzy radius to obtain a first correspondence relationship related to each influencing factor.
[0240] In this embodiment, the first correspondence related to age groups includes a negative correlation between age groups and fuzzy radius. According to this first correspondence, the larger the current user's age group, the smaller the corresponding fuzzy radius; conversely, the smaller the current user's age group, the larger the corresponding fuzzy radius.
[0241] In this embodiment, different age groups correspond to different ages. Taking a user's age group as including a first age group, a second age group, and a third age group as an example, if the age in the first age group is less than the age in the second age group, then the first age group is less than the second age group. If the age in the second age group is less than the age in the third age group, then the second age group is less than the third age group.
[0242] It is understandable that the age groups of users can be determined based on the actual situation, and the age range corresponding to each age group can be set according to the actual situation. This application does not make any specific restrictions on this.
[0243] In the embodiments of this application, the range of values for the fuzzy radius varies for different age groups. For example... Figure 13 As shown, taking the user's age range as an example, which includes the first age range, the second age range, and the third age range, the range of values for the fuzzy radius corresponding to the first age range is the first range, the range of values for the fuzzy radius corresponding to the second age range is the second range, and the range of values for the fuzzy radius corresponding to the third age range is the third range.
[0244] It is understood that the range of values for the fuzzy radius includes at least a maximum and a minimum radius. The minimum radius is the smallest fuzzy radius within the range of possible values. The maximum radius is the largest fuzzy radius within the range of possible values. The minimum and maximum radius values within each range can be set according to actual circumstances; this application does not impose specific limitations on them.
[0245] In the embodiments of this application, the minimum radius values in the first value range, the second value range, and the third value range are all different, and / or, the maximum radius values in the first value range, the second value range, and the third value range are all different.
[0246] In this embodiment of the application, based on the fact that the first age group is less than the second age group, and the second age group is less than the third age group, the maximum radii of the first value range, the second value range, and the third value range decrease sequentially. For example... Figure 13 As shown, the maximum radius value in the first range is the first value, the maximum radius value in the second range is the second value, and the maximum radius value in the third range is the third value. The first value is greater than the second value, and the second value is greater than the third value.
[0247] In other embodiments, based on the fact that the first age group is less than the second age group, and the second age group is less than the third age group, the minimum radius of the first value range, the second value range, and the third value range decreases sequentially. That is, the minimum radius of the first value range is greater than the minimum radius of the second value range, and the minimum radius of the second value range is greater than the minimum radius of the third value range.
[0248] In other embodiments, based on the fact that the first age group is less than the second age group, and the second age group is less than the third age group, the maximum value of the radius of the first, second, and third value ranges decreases sequentially, and the minimum value of the radius of the first, second, and third value ranges is uniform, such as all being 0 (or close to 0). For example, the first age group is greater than or equal to 18 years old and less than 35 years old, and its corresponding first value range is [0, 120]. The second age group is greater than or equal to 35 years old and less than 59 years old, and its corresponding second value range is [0, 80]. The third age group is greater than or equal to 59 years old, and its corresponding third value range is [0, 40].
[0249] In the embodiments of this application, the range of values for the fuzzy radius of each age group can be set according to the actual situation. The maximum value of the radius is different for different age groups, and this application does not make specific limitations on this.
[0250] In this embodiment, a corresponding blur radius range is matched for different user group categories. For example, the blur radius range for the first user group is 0 to 60 pixels, while the blur radius range for other user groups is 0 to 120 pixels.
[0251] In this embodiment, the first correspondence related to processor activity level includes a negative correlation between processor activity level and fuzzy radius. Lower processor activity level corresponds to a larger fuzzy radius, while higher processor activity level corresponds to a smaller fuzzy radius. When processor utilization is used to indicate processor activity level, higher utilization level corresponds to a smaller fuzzy radius, and lower utilization level corresponds to a larger fuzzy radius.
[0252] Please see Figure 14 This document exemplifies a first correspondence between CPU utilization and other parameters provided in an embodiment of this application. The lowest threshold of CPU utilization corresponds to the maximum value of the fuzzy radius, and the highest threshold of CPU utilization corresponds to the minimum value of the fuzzy radius.
[0253] For example, a minimum threshold for CPU utilization is set to 30%, with a corresponding maximum radius of 210 pixels. A maximum threshold for CPU utilization is set to 90%, with a corresponding minimum radius of 30 pixels. When CPU utilization is less than or equal to 30%, the corresponding blur radius is 210 pixels; when CPU utilization is greater than or equal to 90%, the corresponding blur radius is 30 pixels. Between 30% and 90% CPU utilization, there is a negative correlation between CPU utilization and blur radius.
[0254] Please see Figure 15 This document exemplifies a first correspondence between GPU utilization and the specified GPU utilization. The lowest threshold of GPU utilization corresponds to the maximum value of the blur radius, and the highest threshold of GPU utilization corresponds to the minimum value of the blur radius.
[0255] For example, a minimum GPU utilization threshold of 0% corresponds to a maximum radius of 210 pixels. A maximum GPU utilization threshold of 100% corresponds to a minimum radius of 0 pixels. Between 0% and 100% GPU utilization, GPU utilization is negatively correlated with blur radius.
[0256] In other embodiments, the GPU rendering time can be used as the independent variable to set its relationship with the dependent variable, the fuzzy radius.
[0257] In some embodiments, in the first correspondence related to the processor's workload, the maximum and minimum values of the fuzzy radius can be set based on the computing resources of the electronic device and / or the fuzzy algorithm, etc. The highest and lowest thresholds of utilization can be set based on one or more factors such as the number of processor cores, task parallelism, system configuration, stability and performance of the electronic device, etc.
[0258] In this embodiment, the first correspondence related to battery capacity includes a positive correlation between battery capacity and fuzzy radius. The larger the battery capacity, the larger the corresponding fuzzy radius. Conversely, the smaller the battery capacity, the smaller the corresponding fuzzy radius.
[0259] Please see Figure 16 This document exemplifies a first correspondence between battery power and its related charge level, provided by an embodiment of this application. The lowest threshold of battery power corresponds to the minimum value of the fuzzy radius, and the highest threshold of battery power corresponds to the maximum value of the fuzzy radius.
[0260] For example, a minimum battery level threshold of 3% is set, corresponding to a minimum radius of 10 pixels. A maximum battery level threshold of 100% is set, corresponding to a maximum radius of 120 pixels. When the battery level is less than or equal to 3%, the corresponding blur radius is 10 pixels, while between 3% and 100% battery level, the battery level is positively correlated with the blur radius.
[0261] In the first correspondence related to battery capacity, the minimum and maximum radius values can be set based on the electronic device's computing resources and fuzzy algorithms, or based on other influencing factors. The minimum and maximum capacity thresholds can be set according to the battery type, usage scenario, and device requirements. For example, to prevent battery damage from over-discharge, the battery management system sets a minimum capacity limit, such as 3% or 5%, and the minimum capacity threshold can be set with reference to this minimum capacity limit.
[0262] In some embodiments, the minimum and maximum power thresholds can be determined based on big data analysis to determine the power range that the user typically uses. For example, if the user usually charges when the power is 30%, the minimum and maximum thresholds can be set to 30% and 100% respectively. This application does not make any specific limitations on this.
[0263] In this embodiment, the first correspondence related to display brightness includes a positive correlation between display brightness and blur radius. The lower the display brightness, the smaller the corresponding blur radius. The higher the display brightness, the larger the corresponding blur radius.
[0264] Please see Figure 17This application provides an exemplary embodiment of a first correspondence related to display brightness. The lowest threshold of the display brightness of the electronic device corresponds to the minimum value of the blur radius, and the highest threshold of the display brightness of the electronic device corresponds to the maximum value of the blur radius.
[0265] For example, the minimum threshold for display brightness is set to 10%, with a minimum corresponding radius of 10 pixels. The maximum threshold for display brightness is 100%, with a minimum corresponding radius of 120 pixels. When the display brightness is less than or equal to 10%, the corresponding blur radius is 10 pixels, while between 10% and 100% display brightness, the battery level is positively correlated with the blur radius.
[0266] In the first correspondence related to display brightness, the minimum and maximum radius values can be set based on the computing resources of the electronic device and the fuzzy algorithm, or based on other influencing factors. Electronic devices have corresponding maximum and minimum display brightness values. The minimum and maximum threshold values for display brightness can be these maximum and minimum values, or they can be set based on device type, power consumption, display technology, and specific usage scenarios.
[0267] In some embodiments, the minimum and maximum threshold values for display brightness can be determined based on big data analysis to determine the brightness range that the user typically uses, such as 30% and 80% respectively. This application does not specifically limit this.
[0268] In this embodiment, the first correspondence related to ambient light intensity includes a positive correlation between ambient light intensity and blur radius. The greater the ambient light intensity, the larger the corresponding blur radius. Conversely, the smaller the ambient light intensity, the smaller the corresponding blur radius.
[0269] Please see Figure 18 This document exemplifies a first correspondence related to ambient light intensity provided by an embodiment of this application. The lowest threshold of ambient light intensity corresponds to the minimum value of the blur radius, and the highest threshold of ambient light intensity corresponds to the maximum value of the blur radius.
[0270] For example, the minimum threshold for ambient light intensity is set to 10 lux, with a minimum radius of 10 pixels. The maximum threshold for ambient light intensity is 1000 lux, with a minimum radius of 120 pixels. When the ambient light intensity is less than or equal to 10 lux, the corresponding blur radius is 10 pixels, while when the ambient light intensity is greater than or equal to 1000 lux, the minimum radius is 120 pixels.
[0271] In the first correspondence related to ambient light intensity, the minimum and maximum radius values can be set based on the computing resources of the electronic device and fuzzy algorithms, or based on other influencing factors. The ambient light intensity detected by the electronic device has its corresponding maximum and minimum values. The minimum and maximum threshold values for ambient light intensity can be these maximum and minimum values, respectively, or can be set based on the device type, power consumption, and performance of the ambient light sensor.
[0272] In some embodiments, priorities are set for each influencing factor. Figures 14 to 18 The maximum and minimum values of the fuzzy radius can be set based on other influencing factors (such as factors with higher priority).
[0273] In the embodiments of this application, the specific values of the minimum threshold of CPU utilization, the maximum threshold of CPU utilization, the minimum threshold of GPU utilization, the maximum threshold of CGPU utilization, the minimum threshold of battery power, the maximum threshold of battery power, the minimum threshold of display brightness, the maximum threshold of display brightness, the minimum threshold of ambient light intensity, the maximum threshold of ambient light intensity, the maximum value of radius, and the minimum value of radius can be set according to the actual situation, and the correspondence between radius and threshold can also be set according to the actual situation. The embodiments of this application do not impose specific limitations on this.
[0274] In this embodiment of the application, when the second factor includes the processor's workload and the battery's charge level, obtaining the first correspondence related to the second factor includes: determining a first weight for the processor's workload and a second weight for the battery's charge level, and then determining the first correspondence related to the second factor based on the first weight, the first correspondence related to the processor's workload, the second weight, and the first correspondence related to the battery's charge level. The sum of the first weight and the second weight equals 1.
[0275] In this embodiment, the relationship between the dependent variable fuzzy radius R and the independent variables battery power and CPU utilization is set as R(x, y). The relationship between the fuzzy radius and battery power is R1(x), as follows: Figure 16 As shown. The relationship between the blur radius and CPU utilization is R²(y), as... Figure 14 As shown. By setting the second weight c2 for battery power and the first weight c1 for CPU utilization, we can obtain the following formula (1):
[0276] R(x,y)=c1* R2(y)+ c2* R1(x) (1)
[0277] Where x,y∈(0,1),c1+c2=1.
[0278] In other embodiments, the dependent variable fuzzy radius R is set to be related to the independent variables system battery power, CPU utilization, and GPU utilization as R(x, y, z). The relationship between the fuzzy radius and battery power is R1(x), as shown below. Figure 16 As shown. The relationship between the blur radius and CPU utilization is R²(y), as... Figure 14 As shown. The relationship between the blur radius and GPU utilization is R3(z), as... Figure 15 As shown. Setting the first weight of the CPU load factor's fuzzy radius to c11, the first weight of the GPU load to c12, and the second weight of the battery power to c13, we obtain the following formula (2):
[0279] R(x, y, z)= c11* R2(y)+ c12* R3(z)+ c13* R1(x) (2)
[0280] Where x, y, z ∈ (0, 1). Where c11 + c12 + c13 = 1.
[0281] In this embodiment, the mobile phone provides two brightness adjustment modes: manual and automatic. Manual adjustment refers to adjusting the display brightness based on the mapping relationship between the brightness levels of the brightness bar and the backlight level, responding to user input to a sliding node. Automatic adjustment refers to the mobile phone automatically adjusting the display brightness based on a preset algorithm, using an ambient light sensor to collect ambient light intensity parameters from the surrounding environment. Typically, the mobile phone displays an "automatic adjustment mode" switch near the brightness bar, for example... Figure 8B and Figure 9B The word "Automatic" is displayed. When the user checks this option, they enter the automatic adjustment mode. Clicking the option again to uncheck it will enter the manual adjustment mode.
[0282] In this embodiment of the application, when the electronic device initiates automatic adjustment of display brightness, the electronic device can determine the target blur radius based on the ambient light brightness or the display brightness.
[0283] In some embodiments, when the electronic device does not initiate automatic adjustment of display brightness, it can determine the target blur radius by combining ambient light brightness and display brightness. For example, when the electronic device responds to a user's manual adjustment of display brightness, it can determine the target blur radius by combining ambient light brightness, display brightness, and weights.
[0284] In this embodiment of the application, when the third factor includes ambient light intensity and display brightness, obtaining the first correspondence relationship related to the third factor includes: determining a third weight for ambient light intensity and a fourth weight for display brightness; and determining the first correspondence relationship related to the third factor based on the third weight, the first correspondence relationship related to ambient light intensity, the fourth weight, and the first correspondence relationship related to display brightness. The sum of the fourth weight and the third weight is 1.
[0285] In this embodiment, the relationship between the dependent variable blur radius r and the independent variables ambient light intensity and display brightness is set as r(x, y). The relationship between the blur radius and ambient light intensity is r1(x), as follows: Figure 18 As shown. The relationship between the blur radius and the display brightness is r2(y), as... Figure 17 As shown. The third weight of ambient light intensity is c3, and the fourth weight of display brightness is c4, then we get the following formula (3):
[0286] r(x,y)=c3* r1(x)+ c4* r2(y) (3)
[0287] Where x,y∈(0,1),c3+c4=1.
[0288] Step S122: Determine the target fuzzy radius based on the influencing factors and the first correspondence related to the influencing factors.
[0289] In this embodiment of the application, based on the target parameter value corresponding to the influencing factor and the first correspondence related to the influencing factor, the fuzzy radius corresponding to the target parameter value is found, and the fuzzy radius corresponding to the target parameter value is the target fuzzy radius.
[0290] In this embodiment of the application, when the electronic device obtains the influencing factors of the electronic device in step S111, it can obtain the target parameter values corresponding to each influencing factor. For example, if the user's age group is obtained as the first age group in step S111, and the first age group is the corresponding target parameter value, the range of the target fuzzy radius is determined as the first range based on the first correspondence relationship related to the age group and the first age group. As another example, if the battery level is obtained as 50% in step S111, and 50% is the corresponding target parameter value, the target fuzzy radius is determined based on the first correspondence relationship related to the battery level and 50%. As yet another example, if the user's age group is obtained as the first age group, the battery level is 50%, the CPU utilization rate is 80%, and the display brightness is 80%, the target fuzzy radius can be determined comprehensively based on the target parameter values: the first age group, the battery level 50%, the CPU utilization rate 80%, the display brightness 80%, and the first correspondence relationships related to the age group, the battery level, the CPU utilization rate, and the display brightness.
[0291] Figure 19 Another image processing method provided by an embodiment of this application is described by way of example.
[0292] Step S191: Determine the priority of each influencing factor.
[0293] In step S111, the influencing factors of the electronic device are obtained. The number of influencing factors of the electronic device is N. If N is greater than 1, the priority of each influencing factor can be determined.
[0294] In this application, the first factor has a higher priority than the second factor, and the second factor has a higher priority than the third factor. For example, the user's age group has a higher priority than the processor's workload or battery level. The processor's workload has the same priority as the battery level. The processor's workload has a higher priority than ambient light intensity or display brightness. Ambient light intensity has the same priority as display brightness.
[0295] In this embodiment, the first factor is given higher priority than the second factor. The user group category to which the current user belongs can be determined based on the first factor. After determining the user group category, the user's requirements for blur effect and electronic device performance and power consumption can be determined. Then, based on these requirements, the target blur radius can be further adjusted according to the second factor (indicating the performance and power consumption of the electronic device in the current scene) or the third factor (ambient light conditions). This can better balance the relationship between the requirements for blur effect and the performance and power consumption of the electronic device, thereby maximizing the benefits of both blur effect and performance and power consumption.
[0296] In this embodiment, the second factor is given higher priority than the third factor. The range of values for the target blur radius can be obtained by first adjusting the performance and power consumption of the electronic device in the current scene, so that the target blur radius can reduce power consumption, and then further optimized based on the ambient light conditions.
[0297] It is understood that the priority of each influencing factor can be set according to the actual situation, and the embodiments of this application do not make specific limitations in this regard.
[0298] Step S192: Determine the maximum target radius based on the top N-1 influencing factors with the highest priority.
[0299] In this embodiment of the application, the electronic device determines the maximum target radius based on the top N-1 influencing factors with the highest priority, and the final determined target fuzzy radius is less than or equal to the maximum target radius.
[0300] In other embodiments, the electronic device determines the target range of the target fuzzy radius based on the top N-1 influencing factors with the highest priority. This range includes the maximum and minimum target radius values. The target fuzzy radius is less than or equal to the maximum target radius value and greater than or equal to the minimum target radius value.
[0301] Step S193: Determine the target correspondence relationship related to the target influencing factors based on the maximum value of the target radius. The target influencing factors are the lowest priority influencing factors among N influencing factors. The maximum value of the fuzzy radius in the target correspondence relationship is the maximum value of the target radius.
[0302] As mentioned above Figures 13 to 18 In the first correspondence of each influencing factor, there is a corresponding maximum radius. The maximum target radius can be determined based on the influencing factor with high priority, and then the first correspondence related to the target influencing factor can be re-determined based on the maximum target radius, thus obtaining the target correspondence related to the target influencing factor.
[0303] For example, taking factors including age group and battery level as an example, the electronic device obtains the age group as the second age group, and the fuzzy radius value range of the second age group is 0-80 pixels. It can be determined that the maximum target radius is 80 pixels. Therefore, the target correspondence of battery level can be determined as follows: the maximum radius value corresponding to the highest threshold of battery level is the maximum radius value of the second age group, which is 80 pixels.
[0304] In the target correspondence of battery power, the minimum radius corresponding to the lowest battery power threshold can be the minimum radius of the second age group (0 pixels), the minimum radius corresponding to the original first correspondence, or a uniform value, such as 0 pixels or close to 0 pixels. For example, taking a battery power maximum threshold of 100% and a battery power minimum threshold of 0%, with display brightness also as an influencing factor, and based on the fact that battery power has a higher priority than display brightness, if the electronic device obtains a battery power of 50%, the blur radius can be determined to be 80 * 50% = 40 pixels according to the above target correspondence. Therefore, the maximum target radius is 40 pixels. Thus, the target correspondence for display brightness can be determined as follows: the maximum radius corresponding to the highest display brightness threshold is 40 pixels.
[0305] In the target correspondence of display brightness, the minimum radius corresponding to the lowest threshold of display brightness can be the minimum radius corresponding to its original first correspondence, or it can be a uniform value, such as 0 pixels or close to 0 pixels.
[0306] For example, taking factors including age group, battery level, CPU usage, and display brightness as an example, and the user group being divided into three groups: elderly, middle-aged, and young, with corresponding fuzzy radius thresholds of [0,40], [0,80], and [0,120], respectively, and the current user being young, with the highest thresholds for battery level, CPU usage, and display brightness all being 100% and the lowest thresholds for battery level, CPU usage, and display brightness all being 0%, then the maximum radius in the correspondence of the second factor is the maximum radius of 120 pixels corresponding to young people.
[0307] Please see Figure 20 This example illustrates the relationship between battery power and fuzzy radius in young people.
[0308] When prioritizing age group over battery level, the maximum target radius can be set to 120 pixels for the youth group. Therefore, when the battery level is 0%, the blur radius is 0. When the battery level is 100%, the blur radius is 120 pixels.
[0309] Age group takes precedence over battery level. The maximum radius corresponding to the highest battery level threshold can be set based on the maximum radius of the age group, and the minimum radius corresponding to the lowest battery level threshold can be set based on the minimum radius of the age group.
[0310] Understandable. Figure 20 This demonstrates the impact of battery level on the blur radius for young users. The relationship between battery level and blur radius is similar for middle-aged and elderly users. For example, if the current user is middle-aged, the blur radius is 0 when the battery is 0%. At 100% battery level, the blur radius is the maximum value of 80 pixels for the middle-aged group. Similarly, if the current user is elderly, the blur radius is 0 when the battery is 0. At 100% battery level, the blur radius is the maximum value of 40 pixels for the elderly group.
[0311] Please see Figure 21 This example illustrates the relationship between CPU usage and fuzzy radius among young people.
[0312] When prioritizing age group over battery level, the maximum target radius can be set at 120 pixels for the youth group. Therefore, the blur radius is 120 pixels when CPU usage is 0%, and 0 pixels when CPU usage is 100%.
[0313] Age group has higher priority than CPU utilization. The minimum radius corresponding to the highest threshold of CPU utilization can be set based on the minimum radius of age group, and the maximum radius corresponding to the lowest threshold of CPU utilization can be set based on the maximum radius of age group.
[0314] Understandable. Figure 21 This demonstrates the impact of CPU usage on the blur radius for young users. The relationship between CPU usage and blur radius is similar for middle-aged and elderly users. For example, if the current user is middle-aged, the blur radius is the maximum value of 80 pixels when CPU usage is 0%, and 0 pixels when CPU usage is 100%. Similarly, if the current user is elderly, the blur radius is the maximum value of 40 pixels when CPU usage is 0%, and 0 pixels when CPU usage is 100%.
[0315] Please see Figure 22 The example illustrates the relationship between display brightness and blur radius for young people.
[0316] When prioritizing age group over display brightness, the blur radius is 0 when the display brightness is 0%. At 100% display brightness, the blur radius is the maximum value of 120 pixels.
[0317] Age group takes precedence over display brightness. The maximum radius corresponding to the highest threshold of display brightness can be set based on the maximum radius of age group, and the minimum radius corresponding to the lowest threshold of display brightness can be set based on the minimum radius of age group.
[0318] Understandable. Figure 20 , Figure 21 and Figure 22 This demonstrates an ideal model state, where the two exhibit a positive correlation. The target correspondence between the second and third factors is constrained by higher-priority factors such as user group categories.
[0319] In this embodiment, the first factor has a higher priority than the second factor, and the second factor has a higher priority than the third factor. After determining the user group and the second factor (battery power, CPU load), a fuzzy radius value, denoted as k, can be obtained based on the corresponding relationship. Then, when the highest threshold of display brightness is 100% and the lowest threshold is 0%, the relationship between the fuzzy radius and the screen brightness can be expressed as: R3 = kx, where x is the display brightness percentage, x∈(0,1).
[0320] For example, taking the current user as the youth segment, the blur radius is set to 0-120 pixels, the battery level is 10%, the CPU usage is 40%, the first weight is 0.5, and the second weight is 0.5, according to... Figure 20 and Figure 21 Formula (1) yields R(0.1, 0.4) = 0.5 * 120 * 0.1 + 0.5 * (120 - 120 * 0.4) = 6 + 36 = 42. Therefore, the maximum target radius is determined to be 42 pixels. The blur radius corresponding to the highest threshold of the third factor is also 42 pixels, thus revealing the corresponding target relationship.
[0321] Taking factors including age group, battery level, and display brightness as an example, with the current user being a young adult and the battery level at 50%, and the maximum thresholds for both battery level and display brightness being 100% and 0% respectively, and the blur radius for young adults ranging from 0 to 120 pixels, based on the age group and 50% battery level, the maximum target radius can be determined to be 50% * 120 pixels = 60 pixels. Therefore, the target correspondence between display brightness and blur radius can be determined as follows: Figure 23 As shown, the blur radius corresponding to the lowest display brightness threshold is 0 pixels, and the blur radius corresponding to the highest display brightness threshold is 60 pixels. The target blur radius can be further determined based on the target parameter value of the current display brightness. For example, if the target parameter value of the current display brightness is 50%, then the target blur radius can be determined to be 50% * 60 pixels = 30 pixels.
[0322] Under the conditions of a young person and a battery charge of 50%, the calculated blur radius is 60 pixels. The highest threshold of the blur radius corresponding to the highest display brightness threshold has become 60 pixels. That is, even if the screen brightness is 100%, once a blur scene occurs, the range of the blur radius change is [0, 60]. The third factor has a lower priority than the first and second factors, so the influence and limitation of the first two factors on the blur radius threshold should be considered first.
[0323] Step S194: Determine the target fuzzy radius based on the target influencing factors and the target correspondence.
[0324] In this embodiment of the application, the target fuzzy radius corresponding to the target parameter value is found based on the target parameter value corresponding to the target influencing factor and the target correspondence.
[0325] In this embodiment of the application, a model function can be established in advance based on the first correspondence of each influencing factor, and then the target fuzzy radius can be determined based on the model function and the parameter values of the obtained influencing factors.
[0326] For example, taking the maximum radius of 120 pixels for young people, 80 pixels for middle-aged people, and 40 pixels for elderly people as an example, with the highest threshold of 100% and the lowest threshold of 0% for each influencing factor, let the three influencing factor variables be the first factor X = age group, the second factor Y = battery power and CPU usage rate, and the third factor Z = display brightness, and establish the model function as follows (4):
[0327]
[0328] The second factor is: Y = c2*x + c1*(1-y), where c2 and x are the second weight of battery power and the percentage of the target parameter value of battery power, respectively; c1 and y are the first weight of CPU utilization and the percentage of the target parameter value of CPU utilization, respectively; and Z is the percentage of the target parameter value of screen brightness.
[0329] The above model function is obtained under the ideal condition that each factor is positively correlated with the fuzzy radius.
[0330] Step S103: Perform image blurring processing on the image to be processed according to the target blur radius to obtain the target blurred image.
[0331] In this embodiment of the application, after the electronic device determines the target blur radius, it can perform image blurring processing on the image to be processed using the target blur radius and a preset blur algorithm to obtain the target blurred image.
[0332] The blurring algorithms used for the above blurring processing include, but are not limited to, mean blurring algorithm, radial blurring algorithm, distant blurring algorithm, Gaussian blurring algorithm, Kawase blurring algorithm, Dual-Kawase blurring algorithm, etc. All blurring algorithms that can blur an image are within the protection scope of this application.
[0333] Please see Figure 24 The present application provides an exemplary embodiment of the chip system 240.
[0334] Figure 24 A schematic diagram of a chip system 240 is shown. The chip system 240 may include a processor 241 and a communication interface 242, used to support related devices in implementing the functions involved in the above embodiments. In one possible design, the chip system also includes a memory for storing necessary program instructions and data for the electronic device. The chip system may be composed of chips or may include chips and other discrete devices. It should be noted that in some implementations of this application, the communication interface 242 may also be referred to as an interface circuit.
[0335] It should be noted that all relevant content of each step involved in the above method embodiments can be referenced from the functional description of the corresponding functional module, and will not be repeated here.
[0336] This application also provides a computer program product that, when run on a computer, causes the computer to perform the aforementioned related steps to implement the image processing methods in the above-described method embodiments.
[0337] This application also provides a computer storage medium including computer instructions, which, when executed on an electronic device, cause the electronic device to perform the image processing method as described in the above embodiments.
[0338] In this application, the electronic devices, computer storage media, computer program products, or chip systems provided in the embodiments are all used to execute the corresponding methods provided above. Therefore, the beneficial effects they can achieve can be referred to the beneficial effects in the corresponding methods provided above, and will not be repeated here.
[0339] Through the above description of the embodiments, those skilled in the art can clearly understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0340] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For instance, the division of modules or 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 device, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0341] The unit described as a separate component may or may not be physically separate. The component shown as a unit can be one physical unit or multiple physical units, that is, it can be located in one place or distributed in multiple different places. Some or all of the units can be selected to achieve the purpose of the solution in this embodiment according to actual needs.
[0342] 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.
[0343] 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 readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, essentially or in other words, the parts that contribute to the prior art, or all or part of the technical solutions, can be embodied in the form of a software product. This software product is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods of 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.
[0344] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions within the technical scope disclosed in this application should be covered within the scope of protection of this application.
Claims
1. An image processing method, characterized in that, Applied to electronic devices, the method includes: When the electronic device is in the first scene, the image to be processed is blurred to obtain and display the first blurred image after processing. When the electronic device is in the second scene, the image to be processed is blurred to obtain and display the processed second blurred image. The first blurred image and the second blurred image have different degrees of blurring. The factors influencing the difference between the first scene and the second scene include at least one of the following: a first factor, a second factor, and a third factor. The first factor is related to the user information of the current user of the electronic device, including the age group of the current user. The second factor is related to the operating status of the electronic device, including the workload of the processor in the electronic device and / or the battery level in the electronic device, including the load of the central processing unit and / or the load of the graphics processing unit. The third factor is related to the light source in the environment in which the electronic device is located, including the ambient light intensity collected by the electronic device and / or the display brightness of the electronic device.
2. The method according to claim 1, characterized in that, The first blurred image corresponds to a first blurred radius, and the second blurred image corresponds to a second blurred radius. The first blurred radius is different from the second blurred radius.
3. The method according to claim 2, characterized in that, In the first scenario, the current user's age group is greater than that in the second scenario, the first blur radius is smaller than the second blur radius, and the blur degree of the first blurred image is lower than that of the second blurred image.
4. The method according to claim 2 or 3, characterized in that, The processor in the first scenario is busier than the processor in the second scenario, the first blur radius is smaller than the second blur radius, and the blur degree of the first blurred image is lower than the blur degree of the second blurred image. And / or, In the first scenario, the battery power is lower than that in the second scenario; the first blur radius is smaller than the second blur radius; and the blur degree of the first blurred image is lower than that of the second blurred image.
5. The method according to claim 2 or 3, characterized in that, The ambient light intensity in the first scene is less than the ambient light intensity in the second scene, the first blur radius is less than the second blur radius, and the blur degree of the first blurred image is less than the blur degree of the second blurred image; And / or, The display brightness in the first scene is lower than the display brightness in the second scene, the first blur radius is smaller than the second blur radius, and the blur degree of the first blurred image is lower than the blur degree of the second blurred image.
6. An image processing method, characterized in that, Applied to electronic devices, the method includes: The influencing factors of the electronic device are obtained, including at least one of the following: a first factor, a second factor, and a third factor; the first factor is related to the user information of the current user using the electronic device, and the first factor includes the age group of the current user; the second factor is related to the operating status of the electronic device, and the second factor includes the workload of the processor in the electronic device and / or the battery level in the electronic device, and the workload of the processor includes the load of the central processing unit and / or the load of the graphics processing unit; the third factor is related to the light source in the environment in which the electronic device is located, and the third factor includes the ambient light intensity collected by the electronic device and / or the display brightness of the electronic device; Determine the target fuzzy radius based on the aforementioned influencing factors; The image to be processed is blurred according to the target blur radius to obtain the target blurred image.
7. The method according to claim 6, characterized in that, The step of determining the target fuzzy radius based on the influencing factors includes: Obtain the first correspondence relationship related to the influencing factors; Among them, the first correspondence related to the current user's age group includes a negative correlation between age group and fuzzy radius; The first correlation between processor busyness and fuzzy radius includes a negative correlation between processor busyness and fuzzy radius; The first correlation related to battery capacity includes a positive correlation between battery capacity and fuzzy radius; The first correlation related to ambient light intensity includes a positive correlation between ambient light intensity and blur radius; The first correlation related to display brightness includes a positive correlation between display brightness and blur radius; The target fuzzy radius is determined based on the influencing factors and the first correspondence related to the influencing factors.
8. The method according to claim 7, characterized in that, When the second factor includes the processor's workload and the battery's charge level, obtaining the first correspondence related to the influencing factors includes: Determine a first weight corresponding to the processor's busy level and a second weight corresponding to the battery's charge level; The first correspondence related to the second factor is determined based on the first weight, the first correspondence related to the processor's busy level, the second weight, and the first correspondence related to the battery's charge level.
9. The method according to any one of claims 6 to 8, characterized in that, The electronic device has N influencing factors, where N is greater than 1. The method further includes: Determine the priority of each of the aforementioned influencing factors; The determination of the target fuzzy radius based on the influencing factors includes: The maximum target radius is determined based on the top N-1 influencing factors with the highest priority. The target correspondence relationship related to the target influencing factors is determined based on the maximum value of the target radius. The target influencing factor is the influencing factor with the lowest priority among the N influencing factors. The maximum value of the fuzzy radius in the target correspondence relationship is the maximum value of the target radius. The target fuzzy radius is determined based on the target influencing factors and the target correspondence.
10. The method according to claim 9, characterized in that, The first factor has a higher priority than the second factor, and the second factor has a higher priority than the third factor.
11. The method according to any one of claims 6 to 8, 10, characterized in that, The factors influencing the acquisition of the electronic device include: In response to an image blurring instruction, the influencing factors of the electronic device are acquired in real time, and the image blurring instruction is used to instruct image blurring to be performed. The step of determining the target fuzzy radius based on the influencing factors includes: The corresponding target fuzzy radius is determined based on the influencing factors of the electronic device obtained in real time.
12. An electronic device, characterized in that, The device includes a processor and a memory coupled together, the memory being used to store a computer program that, when executed by the processor, causes the electronic device to perform the method of any one of claims 1 to 11.
13. A chip system, characterized in that, The chip system is applied to an electronic device, the chip system including one or more processors, the processors being configured to invoke computer instructions to cause the electronic device to perform the method as described in any one of claims 1 to 11.
14. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, causes the processor to perform the method of any one of claims 1 to 11.
Citation Information
Patent Citations
Image processing method and device
CN110969570A
Image processing method and device, computer equipment and storage medium
CN115239609A