Image processing method and electronic device

By adaptively selecting blur quality adjustment parameters, the problem of high computational complexity in Gaussian blurring is solved, enabling efficient and flexible image blurring processing in electronic devices and improving user experience.

WO2026016443A1PCT designated stage Publication Date: 2026-01-22HUAWEI TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2025/074051
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-07-17
Filing Date
2025-01-22
Publication Date
2026-01-22

AI Technical Summary

Technical Problem

When existing electronic devices perform image blurring, the highly complex calculation process of Gaussian blurring leads to high performance requirements and is prone to problems such as frame drops, frame skipping, stuttering, and device overheating, which affect the user experience.

Method used

An image processing method is provided that flexibly adjusts blur quality and performance by adaptively selecting blur quality adjustment parameters, thereby reducing the complexity of blur processing. This includes dynamically adjusting blur algorithm parameters based on factors such as the blur processing scene, blur level, load information, and resource utilization.

Benefits of technology

While acquiring high-quality blurred images, it reduces the computational complexity of blur processing, improves the performance and user experience of electronic devices, and avoids device overheating and lag.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025074051_22012026_PF_FP_ABST
    Figure CN2025074051_22012026_PF_FP_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of terminals. Provided are an image processing method and an electronic device. In the present application, blur quality adjustment parameters can be adaptively selected, thereby reducing the computational complexity of a blur processing process while obtaining a display image having a high blur quality. The method comprises: in response to a first blur processing event, acquiring a first image, and first blur quality adjustment parameters corresponding to the first blur processing event, wherein the first blur quality adjustment parameters include the first number of iterations and the first number of instances of sampling per iteration; and on the basis of the first blur quality adjustment parameters and the first image, obtaining a second image.
Need to check novelty before this filing date? Find Prior Art

Description

Image processing methods and electronic devices

[0001] This application claims priority to Chinese Patent Application No. 202410964756.1, filed on July 17, 2024, entitled "Image Processing Method and Electronic Device", the entire contents of which are incorporated herein by reference. Technical Field

[0002] This application relates to the field of terminal technology, and in particular to an image processing method and an electronic device. Background Technology

[0003] With the development of terminal technology, users have increasingly higher requirements for the display effects of electronic devices. Electronic devices can use image blurring methods to blur the background content of the display interface, allowing users to focus on key content and providing a better display effect.

[0004] Currently, electronic devices typically perform real-time blurring of images based on Gaussian blur. Gaussian blur can output visually appealing images. However, the highly complex calculation process of Gaussian blur places high demands on the performance of electronic devices. This can lead to problems such as frame drops, frame skipping, stuttering, and overheating in mobile devices like smartphones and tablets during image blurring, negatively impacting the user experience. Summary of the Invention

[0005] To address the aforementioned technical problems, this application provides an image processing method and an electronic device. The technical solution provided by this application can adaptively select blur quality adjustment parameters, thereby reducing the computational complexity of the blur processing process while acquiring a display image with high blur quality.

[0006] To achieve the above-mentioned technical objectives, this application provides the following technical solution:

[0007] In a first aspect, an image processing method is provided, applied to an electronic device. The method includes: in response to a first blur processing event, acquiring a first image and a first blur quality adjustment parameter corresponding to the first blur processing event, the first blur quality adjustment parameter including a first iteration round number and a first single-round iteration sampling number; and obtaining a second image based on the first blur quality adjustment parameter and the first image.

[0008] Thus, the electronic device processes the first image based on adaptively selected blur quality adjustment parameters, achieving flexible and efficient adjustment of blur quality and balancing blur quality and blur performance. The complexity of this blur processing is independent of the blur degree parameter. Therefore, compared to Gaussian blur, it effectively reduces the complexity of blur processing and achieves better blur performance.

[0009] According to the first aspect, in response to the first blur processing event, obtaining the first image and the first blur quality adjustment parameter corresponding to the first blur processing event includes: in response to the first blur processing event, obtaining the first blur quality adjustment parameter based on one or more of the following items corresponding to the first blur processing event: blur processing scene, blur level, load information, and resource utilization rate.

[0010] In this way, electronic devices can flexibly match appropriate fuzz quality adjustment parameters based on various factors when the current fuzzing event occurs, thereby better balancing fuzz quality and performance.

[0011] According to the first aspect, or any implementation of the first aspect above, in response to a first blur processing event, obtaining a first image and a first blur quality adjustment parameter corresponding to the first blur processing event includes: in response to the first blur processing event, obtaining a blur processing scene corresponding to the first blur processing event; and obtaining the first blur quality adjustment parameter corresponding to the blur processing scene from a set of preset blur quality adjustment parameters.

[0012] Optionally, the blurring scenario is, for example, a scenario where the image to be displayed needs to be blurred. Optionally, the blurring scenario includes, for example, a pull-down notification menu, a pull-down settings menu, a desktop folder open / exit scenario, a lock screen scenario, a volume button press scenario, and a desktop icon display scenario.

[0013] In this way, electronic devices can obtain the required fuzzy quality adjustment parameters based on the current fuzzy processing scenario, effectively improving the efficiency of obtaining fuzzy quality adjustment parameters.

[0014] According to the first aspect, or any implementation of the first aspect above, in response to the first blur processing event, obtaining the first image and the first blur quality adjustment parameter corresponding to the first blur processing event includes: receiving a first operation from the user and determining the blur level. In response to the first blur processing event, obtaining the first blur quality adjustment parameter corresponding to the blur level from a preset set of multiple sets of blur quality adjustment parameters.

[0015] In this way, configuring fuzz quality adjustment parameters corresponding to different fuzziness levels can meet the needs of different fuzziness qualities while also satisfying users' personalized requirements. Furthermore, the selection of fuzziness levels is easy for users to understand, reducing the difficulty of operation.

[0016] According to the first aspect, or any implementation of the first aspect above, in response to a first blur processing event, obtaining a first image and a first blur quality adjustment parameter corresponding to the first blur processing event includes: in response to the first blur processing event, obtaining load information. If the load information indicates that the load of the electronic device is greater than or equal to a first threshold, a preset second blur quality adjustment parameter is used as the first blur quality adjustment parameter. If the load information indicates that the load of the electronic device is less than the first threshold, a preset third blur quality adjustment parameter is used as the first blur quality adjustment parameter, wherein the first blur quality corresponding to the third blur quality adjustment parameter is higher than the second blur quality corresponding to the second blur quality adjustment parameter.

[0017] In this way, electronic devices can adaptively select fuzzy quality adjustment parameters according to the device load. Under high load, the demand for fuzzy quality can be reduced, thereby avoiding the impact of fuzzing processing on the operation of other functions of the device. Under low load, it can provide users with better fuzzy quality.

[0018] According to the first aspect, or any implementation of the first aspect above, in response to the first blur processing event, obtaining the first image and the first blur quality adjustment parameter corresponding to the first blur processing event includes: in response to the first blur processing event, obtaining a first resource occupancy rate and a second resource occupancy rate. When the first resource occupancy rate is greater than or equal to a second threshold, and the second resource occupancy rate is less than a third threshold, the first iteration round number is a first quantity, and the first single-round iteration sampling number is a second quantity. When the first resource occupancy rate is less than the second threshold, and the second resource occupancy rate is greater than or equal to the third threshold, the first iteration round number is a third quantity, and the first single-round iteration sampling number is a fourth quantity. Wherein, the first quantity is greater than the third quantity, and the second quantity is less than the fourth quantity.

[0019] Optionally, the first resource utilization rate is, for example, the high-speed storage space utilization rate, and the second resource utilization rate is, for example, the computing unit utilization rate.

[0020] Thus, by selecting blur quality adjustment parameters based on resource utilization across at least two dimensions, the image blurring process can be prevented from affecting the operation of other functions of the electronic device. Furthermore, decoupling different blur quality adjustment parameters allows for more flexible subsequent blur quality adjustments.

[0021] According to the first aspect, or any implementation of the first aspect above, before obtaining the first image and the first blur quality adjustment parameter corresponding to the first blur processing event in response to the first blur processing event, the method further includes: detecting a second operation of adaptively adjusting the blur quality by a user instruction.

[0022] In this way, the electronic device can choose whether to adaptively adjust the blur quality based on the user's operation, thereby meeting the user's personalized needs.

[0023] According to the first aspect, or any implementation of the first aspect above, obtaining a second image based on a first blur quality adjustment parameter and a first image includes: obtaining a first blur algorithm corresponding to the first blur quality adjustment parameter; and obtaining the second image based on the first blur algorithm and the first image.

[0024] Optionally, the electronic device has pre-set fuzzy algorithms corresponding to different fuzzy quality adjustment parameters. These fuzzy algorithms indicate the coordinates of the sampling points during each iteration update. In this way, the electronic device can directly match the fuzzy algorithm based on the fuzzy quality adjustment parameters, reducing the difficulty of obtaining the fuzzy algorithm and improving the efficiency of fuzzy processing.

[0025] According to the first aspect, or any implementation of the first aspect above, before acquiring the second image based on the first blur quality adjustment parameter and the first image, the method further includes: acquiring a blur degree parameter in response to a first blur processing event. Acquiring the second image based on the first blur quality adjustment parameter and the first image includes: acquiring the second image based on the first blur quality adjustment parameter, the blur degree parameter, and the first image.

[0026] Optionally, the implementation process of the image processing method provided in this application is integrated into a preset API interface. The input parameters of the API interface include a first blur quality adjustment parameter, a blur degree parameter, and a first image, and it can output a second image, thereby achieving flexible, efficient, and abrupt adjustment of blur quality and performance.

[0027] According to the first aspect, or any implementation thereof, the second image is obtained based on the first blur quality adjustment parameter, the blur degree parameter, and the first image, including: obtaining a blur algorithm template corresponding to the first blur quality adjustment parameter, the blur algorithm template including multiple blur algorithms; obtaining a second blur algorithm in the blur algorithm template corresponding to the blur degree parameter; and obtaining the second image based on the second blur algorithm and the first image.

[0028] In this way, electronic devices can obtain the required fuzzy algorithm based on the fuzziness parameter.

[0029] According to the first aspect, or any implementation of the first aspect above, the difference between the third blur quality and the target blur quality of the second image is less than the fourth threshold, and the target blur quality is the blur quality of the image output after processing the first image with Gaussian blur based on the blur degree parameter.

[0030] In this way, the blur quality of the pre-built blur algorithm in electronic devices can reach the blur quality achieved by Gaussian blur. As a result, after blurring the image to be processed based on this blur algorithm, better blur quality can be obtained, thus improving the user experience.

[0031] According to the first aspect, or any implementation of the first aspect above, in response to the first blur processing event, obtaining the first image and the first blur quality adjustment parameter corresponding to the first blur processing event includes: in response to the first blur processing event, cropping part or all of the image in the full-screen image as the first image.

[0032] In this way, electronic devices can acquire images that need to be blurred.

[0033] According to the first aspect, or any implementation of the first aspect above, in response to the first blur processing event, obtaining the first image and the first blur quality adjustment parameter corresponding to the first blur processing event includes: in response to the first blur processing event, obtaining the third image; obtaining the scaling factor; and obtaining the first image based on the scaling factor and the third image.

[0034] In some examples, the third image is, for instance, a portion or all of a full-screen image captured by the electronic device. Alternatively, the third image could be a preset image acquired by the electronic device, an image obtained from a server, or an image from another source. In this way, the electronic device first scales the acquired third image and then blurs the scaled image, thereby improving blurring performance.

[0035] According to the first aspect, or any implementation of the first aspect above, obtaining a second image based on a first blur quality adjustment parameter and a first image includes: obtaining a fourth image based on the first blur quality adjustment parameter and the first image; and obtaining the second image based on a scaling factor and the fourth image, wherein the size of the second image is the same as the size of the first image.

[0036] In this way, electronic devices can reduce the power consumption of the blurring process by using a scaling factor, and can obtain a blurred image that meets the display size requirements.

[0037] According to the first aspect, or any implementation of the first aspect above, the method further includes: in response to the second blur processing event, obtaining the fourth image and the fourth blur quality adjustment parameter corresponding to the second blur processing event, wherein the fourth blur quality adjustment parameter is different from the first blur quality adjustment parameter, and the fourth blur quality adjustment parameter includes the second iteration round number and the second single-round iteration sampling number. Based on the fourth blur quality adjustment parameter and the fourth image, obtaining the fifth image.

[0038] In this way, electronic devices can obtain appropriate fuzzy quality adjustment parameters based on different fuzzy processing events.

[0039] Secondly, an electronic device is provided. The electronic device includes: a processor and a memory, the memory being coupled to the processor. The memory stores computer program code, which includes computer instructions. When the processor reads the computer instructions from the memory, the electronic device executes: in response to a first blur processing event, acquiring a first image and a first blur quality adjustment parameter corresponding to the first blur processing event, the first blur quality adjustment parameter including a first iteration round number and a first single-round iteration sampling number; and obtaining a second image based on the first blur quality adjustment parameter and the first image.

[0040] According to the second aspect, in response to the first blur processing event, obtaining the first image and the first blur quality adjustment parameter corresponding to the first blur processing event includes: in response to the first blur processing event, obtaining the first blur quality adjustment parameter based on one or more of the following items corresponding to the first blur processing event: blur processing scene, blur level, load information, and resource occupancy rate.

[0041] According to the second aspect, or any implementation of the second aspect above, in response to the first blur processing event, obtaining the first image and the first blur quality adjustment parameter corresponding to the first blur processing event includes: in response to the first blur processing event, obtaining the blur processing scene corresponding to the first blur processing event; and obtaining the first blur quality adjustment parameter corresponding to the blur processing scene from a set of preset blur quality adjustment parameters.

[0042] According to the second aspect, or any implementation of the second aspect above, in response to the first blur processing event, obtaining the first image and the first blur quality adjustment parameter corresponding to the first blur processing event includes: receiving a first operation from the user and determining the blur level. In response to the first blur processing event, obtaining the first blur quality adjustment parameter corresponding to the blur level from a preset set of multiple sets of blur quality adjustment parameters.

[0043] According to the second aspect, or any implementation of the second aspect above, in response to a first blur processing event, obtaining a first image and a first blur quality adjustment parameter corresponding to the first blur processing event includes: in response to the first blur processing event, obtaining load information. If the load information indicates that the load of the electronic device is greater than or equal to a first threshold, a preset second blur quality adjustment parameter is used as the first blur quality adjustment parameter. If the load information indicates that the load of the electronic device is less than the first threshold, a preset third blur quality adjustment parameter is used as the first blur quality adjustment parameter, wherein the first blur quality corresponding to the third blur quality adjustment parameter is higher than the second blur quality corresponding to the second blur quality adjustment parameter.

[0044] According to the second aspect, or any implementation of the second aspect above, in response to the first blur processing event, obtaining the first image and the first blur quality adjustment parameter corresponding to the first blur processing event includes: in response to the first blur processing event, obtaining a first resource occupancy rate and a second resource occupancy rate. When the first resource occupancy rate is greater than or equal to a second threshold, and the second resource occupancy rate is less than a third threshold, the first iteration round number is a first quantity, and the first single-round iteration sampling number is a second quantity. When the first resource occupancy rate is less than the second threshold, and the second resource occupancy rate is greater than or equal to the third threshold, the first iteration round number is a third quantity, and the first single-round iteration sampling number is a fourth quantity. Wherein, the first quantity is greater than the third quantity, and the second quantity is less than the fourth quantity.

[0045] According to the second aspect, or any implementation of the second aspect above, when the processor reads computer instructions from memory, it also causes the electronic device to perform a second operation: detecting a user instruction to adaptively adjust the fuzz quality.

[0046] According to the second aspect, or any implementation thereof, the second image is obtained based on the first blur quality adjustment parameter and the first image, including: obtaining the first blur algorithm corresponding to the first blur quality adjustment parameter; and obtaining the second image based on the first blur algorithm and the first image.

[0047] According to the second aspect, or any implementation of the second aspect above, when the processor reads computer instructions from memory, it further causes the electronic device to perform: in response to a first blur processing event, acquiring a blur level parameter; and acquiring a second image based on a first blur quality adjustment parameter and a first image, including: acquiring the second image based on the first blur quality adjustment parameter, the blur level parameter, and the first image.

[0048] According to the second aspect, or any implementation thereof, the second image is obtained based on the first blur quality adjustment parameter, the blur degree parameter, and the first image, including: obtaining a blur algorithm template corresponding to the first blur quality adjustment parameter, the blur algorithm template including multiple blur algorithms; obtaining a second blur algorithm in the blur algorithm template corresponding to the blur degree parameter; and obtaining the second image based on the second blur algorithm and the first image.

[0049] According to the second aspect, or any implementation of the second aspect above, the difference between the third blur quality and the target blur quality of the second image is less than the fourth threshold, and the target blur quality is the blur quality of the image output after processing the first image with Gaussian blur based on the blur degree parameter.

[0050] According to the second aspect, or any implementation of the second aspect above, in response to the first blur processing event, obtaining the first image and the first blur quality adjustment parameter corresponding to the first blur processing event includes: in response to the first blur processing event, cropping part or all of the image in the full-screen image as the first image.

[0051] According to the second aspect, or any implementation of the second aspect above, in response to the first blur processing event, obtaining the first image and the first blur quality adjustment parameter corresponding to the first blur processing event includes: in response to the first blur processing event, obtaining the third image; obtaining the scaling factor; and obtaining the first image based on the scaling factor and the third image.

[0052] According to the second aspect, or any implementation thereof, obtaining a second image based on the first blur quality adjustment parameter and the first image includes: obtaining a fourth image based on the first blur quality adjustment parameter and the first image; and obtaining the second image based on the scaling factor and the fourth image, wherein the size of the second image is the same as the size of the first image.

[0053] According to the second aspect, or any implementation thereof, when the processor reads computer instructions from memory, it further causes the electronic device to perform: in response to the second blur processing event, acquiring a fourth image and a fourth blur quality adjustment parameter corresponding to the second blur processing event, wherein the fourth blur quality adjustment parameter is different from the first blur quality adjustment parameter, and the fourth blur quality adjustment parameter includes a second iteration round number and a second single-round iteration sampling number. Based on the fourth blur quality adjustment parameter and the fourth image, acquiring a fifth image.

[0054] Thirdly, an electronic device is provided, which has the function of implementing the image processing method as described in the first aspect and any of its possible implementations. This function can be implemented in hardware or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above-described function.

[0055] Fourthly, a computer-readable storage medium is provided. The computer-readable storage medium stores a computer program (also referred to as instructions or code) that, when executed by an electronic device, causes the electronic device to perform the method of the first aspect or any embodiment of the first aspect.

[0056] Fifthly, a computer program product is provided that, when run on an electronic device, causes the electronic device to perform the method of the first aspect or any one of the embodiments of the first aspect.

[0057] In a sixth aspect, a circuit system is provided, the circuit system including processing circuitry configured to perform the method of the first aspect or any embodiment of the first aspect.

[0058] In a seventh aspect, a chip system is provided, including at least one processor and at least one interface circuit, wherein the at least one interface circuit is used to perform transceiver functions and send instructions to the at least one processor, and when the at least one processor executes the instructions, the at least one processor performs the method of the first aspect or any embodiment of the first aspect.

[0059] The technical effects of the aforementioned aspects can be referenced from each other, and will not be elaborated further here. Attached Figure Description

[0060] Figure 1 is a schematic diagram of a fuzzy processing scenario provided in an embodiment of this application;

[0061] Figure 2 is a schematic diagram of the iterative update process of Kawase fuzzy fuzz provided in an embodiment of this application;

[0062] Figure 3 is a schematic diagram of the blurring process of the hybrid resolution acceleration technology provided in the embodiments of this application;

[0063] Figure 4 is a schematic diagram of the hardware structure of the electronic device provided in the embodiment of this application;

[0064] Figure 5 is a schematic diagram of the software structure of the electronic device provided in the embodiment of this application;

[0065] Figure 6 is a schematic flowchart of the image processing method provided in an embodiment of this application;

[0066] Figure 7 is a schematic diagram of the image processing method provided in an embodiment of this application (II).

[0067] Figure 8 is a schematic flowchart of the image processing method provided in the embodiment of this application;

[0068] Figure 9 is a schematic diagram of a fuzzy quality setting scenario provided in an embodiment of this application;

[0069] Figure 10 is a schematic flowchart of the image processing method provided in an embodiment of this application;

[0070] Figure 11 is a schematic flowchart of the image processing method provided in an embodiment of this application;

[0071] Figure 12 is a schematic diagram of the structure of the electronic device provided in an embodiment of this application;

[0072] Figure 13 is a schematic diagram of the possible product form of the electronic device provided in the embodiments of this application. Detailed Implementation

[0073] The technical solutions of the embodiments of this application are described below with reference to the accompanying drawings. In the description of the embodiments of this application, the terminology used in the following embodiments is for the purpose of describing specific embodiments only and is not intended to be a limitation of this application. As used in the specification and appended claims of this application, the singular expressions “a,” “an,” “the,” “the,” “the,” and “this” are intended to include expressions such as “one or more,” unless the context clearly indicates otherwise. It should also be understood that in the following embodiments of this application, “at least one” and “one or more” refer to one or more (including two).

[0074] References to "one embodiment" or "some embodiments" in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized. The term "connection" includes direct connections and indirect connections, unless otherwise stated. "First" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated.

[0075] In the embodiments of this application, the words "exemplarily" or "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design described as "exemplarily" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design solutions. Specifically, the use of the words "exemplarily" or "for example" is intended to present the relevant concepts in a specific manner.

[0076] In some embodiments, in blurring scenarios, electronic devices typically process the image to be displayed using a blurring algorithm to obtain an image with a blurred display effect, enriching the display scenarios and meeting users' needs for display effects. Optionally, blurring scenarios include, for example, pull-down notification menu bar scenarios, pull-down settings menu bar scenarios, desktop folder open / exit scenarios, lock screen scenarios, volume button press scenarios, etc. Optionally, blurring algorithms include, for example, Gaussian blur, Kawase blur, mixed resolution acceleration technology, etc.

[0077] For example, as shown in Figure 1(a), during the process of displaying the desktop, the electronic device detects the user's swiping operation along the top edge of the display screen and displays the notification menu bar as shown in Figure 1(b). During the process of triggering the display of the notification menu bar, the electronic device blurs the main interface image displayed on the desktop so that the subsequently displayed notification menu bar can cover the blurred main interface, enriching the display effect and preventing the content displayed on the main interface from interfering with the display of the notification menu bar.

[0078] In some examples, in blurring scenarios, electronic devices achieve a real-time blurred display effect through Gaussian blur. For instance, the electronic device acquires an image to be processed, which is the image material to be blurred. The electronic device acquires a blur degree parameter σ and calculates a Gaussian convolution kernel G based on this parameter σ. σ .For example, (Formula 1). Here, the Gaussian convolution kernel can also be described as weights. Then, the electronic device can perform a convolution operation on each pixel in the image to be processed according to the Gaussian convolution kernel, outputting an image, i.e., obtaining an image with a blurred display effect, thus achieving blurred display. In some example scenarios during the convolution operation, the electronic device performing a convolution operation on a certain pixel A means: the electronic device selects a ring of pixels surrounding pixel A, calculates the weights according to Formula 1, where (x, y) is the distance vector from a pixel in the selected ring of pixels to pixel A. Then, the electronic device performs a weighted average of the pixel values ​​of the selected ring of pixels to obtain the blurred pixel value of pixel A. Generally, the selected ring of pixels refers to all pixels within a square area of ​​length and width of 6σ centered on pixel A. Therefore, the theoretical computational complexity of Gaussian blur and the area of ​​the square (i.e., 36σ) are related. 2 The computational complexity is directly proportional to the side length of the square (i.e., 6σ). In other example scenarios, after selecting a ring of pixels using the above example scenario, the electronic device breaks down the 2D convolution operation into two 1D convolution operations. For example, the electronic device first performs a horizontal convolution operation, then a vertical convolution operation. The theoretical computational complexity of the two 1D convolution operations is directly proportional to the side length of the square (i.e., 6σ).

[0079] It can be seen that the theoretical computational complexity of Gaussian blur is directly proportional to the blur level parameter. A smaller blur level parameter results in a clearer output image, while a larger parameter leads to a blurrier image. Although Gaussian blur offers high blur quality, producing blurred images with natural detail transitions and good visual effects, its high computational complexity places high demands on the performance of electronic devices. For example, electronic devices with average or poor performance may experience frame drops, frame skipping, stuttering, and overheating when processing images in real-time using Gaussian blur, negatively impacting the user experience.

[0080] In other examples, in blurring scenarios, electronic devices achieve real-time blurred display effects through Kawase blurring. For instance, the electronic device acquires an image to be processed, which is the image material to be blurred. Then, the electronic device performs multiple rounds of iterative updates on the image until the output image approaches a preset blur level. Specifically, in each round of iterative updates, for a specific pixel A in the image to be processed, the electronic device selects N sampling points B1, B2, ..., B according to a preset rule. N The pixel values ​​of these N sampling points are averaged to obtain the blurred pixel value of pixel A. The preset rules and the number of iteration rounds are fixed elements determined based on engineering experience, used to make the output image closer to the preset blur level. For example, the number of iteration rounds is fixed at 4, and the number of sampling points N=4 in each round, as shown in Figures 2(a)-(d). The sampling points are distributed at the four corners of a square centered on pixel A, and the ratio of the square's side length between iterations is 1:3:5:7, with the specific side length values ​​proportional to the blur level parameter.

[0081] It can be seen that the advantage of Kawase blur is that its theoretical computational complexity is independent of the blur degree parameter, and its performance is better than Gaussian blur under the same conditions. However, because the iterative update process of Kawase blur is determined entirely by a single preset rule, the blur degree of the output image is uncontrollable and cannot be accurately measured, resulting in poor blur quality.

[0082] In other examples, in blurring scenarios, electronic devices achieve real-time blurring effects through hybrid resolution acceleration technology. For instance, the electronic device acquires an image to be processed, which is the image material to be blurred. Then, as shown in Figure 3, the electronic device selects a scaling factor and reduces the size of the image to be processed according to the scaling factor (as in step 1). The scaling factor β is, for example, an integer value such as 1, 2, or 3. The reduction method, for example, involves reducing the number of pixels in the image to be processed by 2 pixels at intervals of 2. β By selecting one pixel at a time, the dimensions of the image to be processed are reduced to twice the original size. β The image is reduced to one-third of its original size. Then, the electronic device blurs the reduced image to obtain a blurred image (as in step 2). The electronic device can choose any blurring algorithm to perform the blurring process. Next, the electronic device enlarges the blurred image to obtain a blurred image of the same size as the original image (as in step 3). The enlargement method, for example, is through interpolation to enlarge the blurred image to the same size as the original image.

[0083] As can be seen, hybrid resolution acceleration technology improves blur performance through scaling factors. For example, a larger scaling factor results in better blur performance. However, as the scaling factor increases, blur quality decreases. For instance, during image scaling, a large amount of pixel information is lost, affecting blur quality. Furthermore, blur results in real-time blur processing scenarios are prone to abrupt changes or jitter, making it difficult to flexibly adjust blur quality and performance by adjusting the scaling factor.

[0084] Therefore, this application provides an image processing method that can adaptively select a blur algorithm and perform blur processing on the image to be processed through multiple rounds of iterative blur algorithms. While obtaining a display image with high blur quality, it reduces the computational complexity of the blur processing process and achieves flexible adjustment of blur quality and performance.

[0085] Optionally, the image processing method provided in this application embodiment can be applied to electronic device 100. Optionally, electronic device 100 can be, for example, a mobile phone, tablet computer, personal computer (PC), digital broadcasting terminal, in-vehicle smart screen, medical device, fitness equipment, wearable device, ultra-mobile personal computer (UMPC), netbook, personal digital assistant (PDA), artificial intelligence (AI) device, and other terminal devices. The operating system installed on electronic device 100 includes, but is not limited to, […]. Alternatively, other operating systems may be used. This application does not limit the specific type of electronic device 100 or the operating system installed on it.

[0086] For example, Figure 4 shows a schematic diagram of the structure of an electronic device 100.

[0087] Electronic device 100 may include processor 110, external memory interface 120, internal memory 121, universal serial bus (USB) interface 130, charging management module 140, power management module 141, battery 142, antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, audio module 170, sensor module 180, button 190, motor 191, indicator 192, camera 193, display screen 194, and subscriber identification module (SIM) card interface 195, etc.

[0088] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0089] 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, video codec, digital signal processor (DSP), baseband processor, and / or neural network processing unit (NPU). These different processing units may be independent devices or integrated into one or more processors.

[0090] 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, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.

[0091] The MIPI interface can be used to connect the processor 110 to peripheral devices such as the display screen 194 and the camera 193. The MIPI interface includes a camera serial interface (CSI) and a display serial interface (DSI). In some embodiments, the processor 110 and the camera 193 communicate via the CSI interface to enable the electronic device 100 to capture images. The processor 110 and the display screen 194 communicate via the DSI interface to enable the electronic device 100 to display images.

[0092] Electronic device 100 implements display functions through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. Processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.

[0093] Display screen 194 is used to display images, videos, etc. Display screen 194 includes a display panel. The display panel can be manufactured using a liquid crystal display (LCD), such as an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a mini-LED, a micro-LED, a micro-OLED, a quantum dot light-emitting diode (QLED), etc. In some embodiments, electronic device 100 may include one or N displays 194, where N is a positive integer greater than 1.

[0094] The sensor module 180 may include pressure sensors, gyroscope sensors, barometric pressure sensors, magnetic sensors, accelerometers, distance sensors, proximity sensors, fingerprint sensors, temperature sensors, touch sensors, ambient light sensors, bone conduction sensors, etc.

[0095] A touch sensor, also known as a "touch device," can be located on the display screen 194. The touch sensor and the display screen 194 together form a touchscreen, also known as a "touchscreen." The touch sensor detects touch operations applied to or near it. The touch sensor can then transmit the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In some embodiments, the touch sensor may also be located on the surface of the electronic device 100, in a different position than the display screen 194.

[0096] In some embodiments, a user can detect a touch operation on the display screen using a touch sensor to obtain a blurring event. In response to the blurring event, the electronic device 100 acquires an image to be processed and performs blurring processing on the image to be processed by the processor 110 to obtain a blurred image to be displayed. The electronic device 100 can then display the blurred image to be displayed on the display screen 194.

[0097] The software system of electronic device 100 can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture. This application embodiment uses the layered architecture Android system as an example to exemplify the software structure of electronic device 100.

[0098] Figure 5 is a software structure block diagram of an electronic device 100 according to an embodiment of this application.

[0099] A layered architecture divides software into several layers, each with a clear role and function. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom: the application layer, the application framework layer, the system service layer, and the kernel layer.

[0100] The application layer can include a series of application packages.

[0101] As shown in Figure 5, the application package can include applications such as desktop, contacts, notes, camera, music, gallery, maps, calls, and video.

[0102] The application framework layer provides application programming interfaces (APIs) and a programming framework for applications in the application layer. The application framework layer includes some predefined functions.

[0103] As shown in Figure 5, the application framework layer may include a window manager, content provider, view system, phone manager, resource manager, notification manager, etc.

[0104] The window manager is used to manage windowed applications. It can retrieve screen size, determine the presence of a status bar, lock the screen, and capture screenshots, among other things.

[0105] Content providers store and retrieve data, making that data accessible to applications. This data may include videos, images, audio, made and received phone calls, browsing history and bookmarks, phone books, etc.

[0106] A view system includes visual controls, such as controls that display text and controls that display images.

[0107] The system service layer includes an acquisition module, an adjustment module, a core processing module, and an output module.

[0108] The acquisition module is used to acquire the image to be processed and a blur level parameter. Optionally, the blur level parameter represents the degree of blur of the target relative to the image to be processed, such as a blur level parameter of 2, 3, etc. Optionally, the blur level parameter required in different blur processing scenarios may be the same or different. For example, in response to a blur processing event, the application acquires the blur processing scenario corresponding to the blur processing event and acquires the preset blur level parameter corresponding to the blur processing scenario. Then, the application can send the blur level parameter to the acquisition module.

[0109] An adjustment module is used to obtain blur quality adjustment parameters. These parameters affect the blur quality of the output image. Optionally, the electronic device 100 performs blur processing on the image to be processed through multiple rounds of iterative updates. The blur quality adjustment parameters may include, for example, the number of iterations in the multiple iterations and the number of samples per iteration. In some examples, the operating system provides an application programming interface (API) at the application framework layer for external application developers to implement real-time image blurring functionality. Application developers can achieve real-time blurring effects in third-party applications by calling this API. For example, application developers can write blur quality adjustment parameters by calling this API. Optionally, in response to a blur processing event, the adjustment module can obtain the blur quality adjustment parameters through this API.

[0110] Optionally, the adjustment module is further configured to obtain a fuzzy algorithm template corresponding to the fuzzy quality adjustment parameters. Optionally, the fuzzy algorithm template includes at least one pre-configured fuzzy algorithm.

[0111] The core processing module is used to blur the image to be processed according to the blur algorithm template and obtain the blurred image to be displayed.

[0112] The output module is used to output the blurred image to be displayed. For example, the output module sends the blurred image to be displayed to the display driver in the kernel layer to trigger the display driver to instruct the display screen to display the blurred image.

[0113] Optionally, the system service layer may also include a surface manager, a 3D graphics processing library (e.g., OpenGL ES), a 2D graphics engine (e.g., SGL), etc.

[0114] The Surface Manager is used to manage the display subsystem and provides the blending of 2D and 3D layers for multiple applications.

[0115] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.

[0116] A 2D graphics engine is a graphics engine for 2D drawing.

[0117] The kernel layer is the layer between hardware and software. The kernel layer contains at least the display driver, camera driver, audio driver, and sensor driver.

[0118] The image processing method provided in the embodiments of this application will be described in detail below.

[0119] Figure 6 is a schematic flowchart of an image processing method provided in an embodiment of this application. It should be noted that this method is not limited to the specific order described in Figure 6 and below. It should be understood that in other embodiments, the order of some steps in this method can be interchanged according to actual needs, or some steps can be omitted or deleted. The method includes the following steps:

[0120] S601, Electronic device 100 acquires blur level parameters and the image to be processed.

[0121] The blur level parameter represents the degree of blur of the target relative to the image being processed, such as a blur level parameter of 2, 3, etc. For example, the application of electronic device 100 has preset blur level parameters required for different blur processing scenarios, and the blur level parameters corresponding to different blur processing scenarios may be the same or different. Optionally, blur processing scenarios may include, for example, pull-down notification menu bar scenarios, pull-down settings menu bar scenarios, desktop folder open / exit scenarios, lock screen scenarios, volume button press scenarios, and desktop icon display scenarios.

[0122] In some embodiments, in response to a blurring event, the electronic device 100 obtains a blur level parameter corresponding to the current blurring event. Optionally, in response to a blurring event, the electronic device 100 determines the currently entered blurring scene and may obtain a preset blur level parameter corresponding to the current blurring scene.

[0123] For example, in the scenario shown in Figure 1, the electronic device 100 detects a user's swipe-down operation along the top edge of the display screen, triggering a blur processing event. The electronic device 100 determines that the current blur processing scenario is a drop-down notification menu bar scenario, and can obtain the blur level parameter 1 corresponding to this drop-down notification menu bar scenario.

[0124] For example, when the electronic device 100 is displaying an application interface, it triggers a blurring event in response to the user's return to the desktop. The electronic device 100 obtains that the current blurring scenario is a desktop icon display scenario, and can obtain the blur level parameter 2 corresponding to the desktop icon display scenario through the desktop. In one possible implementation, the blur level parameter 2 may be different from the blur level parameter 1, or it may be the same as the blur level parameter 2.

[0125] In some embodiments, in response to a blurring event, the electronic device 100 acquires an image to be processed. Optionally, the image to be processed is an image to be blurred. The image to be processed can be a portion or all of a full-screen image. It should be understood that a full-screen image is an image to be displayed in full screen, or a layer of an image to be displayed in full screen. For example, in a drop-down notification menu scenario, the full-screen image is the image displayed in full screen before the drop-down menu is displayed, and this image is placed below the subsequently displayed drop-down menu. Alternatively, the image to be processed can also be a preset image in the electronic device 100, an image downloaded from a server, or an image from other sources; this embodiment does not limit this.

[0126] For example, in a drop-down notification menu scenario, in response to a blur processing event, the electronic device 100 captures a full-screen image and uses this full-screen image as the image to be processed in order to obtain the subsequent full-screen blur display effect.

[0127] For example, in a scenario where desktop icons are displayed, in response to a blur processing event, the electronic device 100 captures an image of the area surrounding the application icon to be displayed as an image to be processed, so as to obtain the subsequent blur display effect of the area surrounding the application icon.

[0128] Optionally, as shown in FIG7, step S601 may include steps S6011a and S6012a. It should be understood that the embodiments of this application do not limit the execution order of steps S6011a and S6012a.

[0129] S6011a In response to a fuzzy processing event, electronic device 100 acquires a fuzziness level parameter.

[0130] S6012a, Electronic device 100 captures part or all of the image from the full-screen image as the image to be processed.

[0131] In some embodiments, in response to a blur processing event, the acquisition module shown in FIG5 acquires a blur degree parameter and acquires an image to be processed by cropping the image.

[0132] Optionally, the specific implementation details of steps S6011a and S6012a can be found in the above-mentioned content.

[0133] Optionally, as shown in FIG8, step S601 may further include steps S6011b-S6013b. It should be understood that the embodiments of this application do not limit the execution order between steps S6011b and steps S6012b-S6013b.

[0134] S6011b, In response to a fuzzy processing event, electronic device 100 acquires a fuzziness level parameter.

[0135] In some embodiments, in response to a blurring event, the acquisition module shown in FIG5 acquires a blur level parameter.

[0136] S6012b, Electronic device 100 captures part or all of the image in a full-screen image.

[0137] S6013b, electronic device 100 obtains the scaling factor, scales the captured image, and obtains the image to be processed.

[0138] In some embodiments, in response to a blurring event, the acquisition module, as shown in FIG5, captures an image. The acquisition module can then select a scaling factor to scale the captured image to obtain the image to be processed for subsequent blurring. Optionally, the electronic device 100 has a preset scaling factor. Optionally, the scaling factors corresponding to different blurring scenarios may be the same or different.

[0139] For example, the scaling factor obtained by the acquisition module is β, and the size of the cropped image is W*H. Then, the acquisition module scales the cropped image using the scaling factor β, resulting in an image of size W*H to be processed. Here, ceil represents the rounding function. Optionally, the acquisition module can use standard GPU downsampling to scale the captured image.

[0140] Thus, electronic device 100 combines hybrid resolution acceleration technology to improve blur performance.

[0141] In this way, the electronic device 100 obtains the blur level parameter and the image to be processed, which facilitates the subsequent blur processing of the image to be processed by the electronic device 100 based on the blur level parameter.

[0142] S602, Electronic device 100 acquires fuzzy quality adjustment parameters.

[0143] The blur quality adjustment parameters are used to influence the blur quality of the output image. Optionally, the electronic device 100 performs blur processing on the image to be processed through multiple rounds of iterative updates. The blur quality adjustment parameters may include, for example, the number of iteration rounds in the multiple iterations and the number of samples per iteration, or other parameters that may affect the blur quality. Optionally, by performing blur processing on the image to be processed based on the blur quality adjustment parameters, it is possible to flexibly, efficiently, and abruptly adjust the blur quality and performance.

[0144] For example, the number of iteration rounds may be 3, 5, or 6. The number of samples per iteration may be 3, 5, or 6. Optionally, the more iteration rounds and / or the more samples per iteration, the better the fuzzy quality.

[0145] In some embodiments, the electronic device 100 is pre-configured with fuzz quality adjustment parameters corresponding to different fuzzing scenarios. For example, during application development, developers write possible fuzzing scenarios for the current application, as well as the fuzz quality adjustment parameters corresponding to different fuzzing scenarios, into the application. Subsequently, after the application is installed on the electronic device 100, the application can write the fuzz quality adjustment parameters into the electronic device 100 through a pre-defined API interface. Then, in response to a fuzzing event, the adjustment module shown in Figure 5, after obtaining the fuzzing scenario indicated by the current fuzzing event, can obtain the fuzz quality adjustment parameters corresponding to that fuzzing scenario through the pre-defined API interface.

[0146] For example, the pre-configured fuzz quality adjustment parameters for the pull-down notification menu bar scenario in electronic device 100 include 3 iteration rounds and 5 sampling times per iteration. The pre-configured fuzz quality adjustment parameters for the desktop folder open / exit scenario in electronic device 100 include 5 iteration rounds and 6 sampling times per iteration. Thus, during subsequent fuzzing processing, electronic device 100 can directly obtain the fuzz quality adjustment parameters corresponding to the current fuzzing scenario. For instance, if electronic device 100 determines that the current fuzzing scenario is a pull-down notification menu bar scenario, it can obtain the corresponding fuzz quality adjustment parameters for the pull-down notification menu bar scenario, such as 3 iteration rounds and 5 sampling times per iteration.

[0147] In other embodiments, the electronic device 100 is pre-configured with different fuzz quality adjustment parameters. Based on user operation, the electronic device 100 can select the fuzz quality adjustment parameters to be used in the current fuzzing process. This increases user participation and meets personalized user needs. For example, the electronic device 100 may pre-configure fuzz quality adjustment parameters corresponding to different levels, or pre-configure fuzz quality adjustment parameters corresponding to different levels in different fuzzing scenarios. Optionally, the levels may include, for example, poor, moderate, relatively high, and high levels that help users clearly see the fuzz quality and have practical descriptive meaning.

[0148] For example, as shown in Figure 9(a), the fuzzy quality adjustment parameters include the number of iteration rounds K for multi-round updates and the number of sampling times N for a single iteration. The electronic device 100 is pre-configured with five levels of fuzzy quality: poor, moderate, medium, high, and excellent. Each level of fuzzy quality corresponds to a different number of iteration rounds K and the number of sampling times N for a single iteration. Thus, the electronic device 100 can obtain the corresponding number of iteration rounds K and the number of sampling times N for a single iteration based on the level selected by the user.

[0149] Optionally, the fuzzy quality adjustment parameters corresponding to different levels can also be written through a preset API interface.

[0150] For example, the pre-configured blur quality adjustment parameters in electronic device 100 include: 3 iteration rounds and 3 sampling times per round for the poor level; 3 iteration rounds and 5 sampling times per round for the medium level; 5 iteration rounds and 5 sampling times per round for the medium level; 5 iteration rounds and 6 sampling times per round for the high level; and 6 iteration rounds and 6 sampling times per round for the high level. Thus, in response to the user's selection of a level, electronic device 100 can match the corresponding number of iteration rounds and sampling times per round. Subsequently, during image blurring, electronic device 100 can obtain the successfully matched number of iteration rounds and sampling times per round.

[0151] For example, different blur quality adjustment parameters can be configured for different blur processing scenarios as described in the above example. The pre-configured blur quality adjustment parameters in electronic device 100 can also be different iteration rounds and single-round sampling times for different levels corresponding to different blur processing scenarios. For instance, the pre-configured blur quality adjustment parameters for the drop-down notification menu scenario in electronic device 100 include: 3 iteration rounds and 3 single-round sampling times for the poor level; 3 iteration rounds and 5 single-round sampling times for the relatively poor level; 5 iteration rounds and 5 single-round sampling times for the medium level; 5 iteration rounds and 6 single-round sampling times for the relatively high level; and 6 iteration rounds and 6 single-round sampling times for the high level. Thus, during image blur processing, electronic device 100 can match the corresponding number of iteration rounds and single-round sampling times based on the current blur processing scenario (drop-down notification menu scenario) and the level selected by the user. For example, the pre-configured blur quality adjustment parameters for the desktop folder open / exit scenarios in electronic device 100 include: 4 iteration rounds and 5 sampling times per round for the poor level; 5 iteration rounds and 5 sampling times per round for the medium level; 5 iteration rounds and 6 sampling times per round for the medium level; 5 iteration rounds and 7 sampling times per round for the higher level; and 6 iteration rounds and 7 sampling times per round for the highest level. Thus, during image blurring, electronic device 100 can match the corresponding number of iteration rounds and sampling times per round based on the current blurring scenario (desktop folder open / exit scenario) and the user-selected level.

[0152] In other embodiments, the electronic device 100 is pre-configured with different fuzzy quality adjustment parameters and parameter selection rules. Optionally, the parameter selection rules indicate whether to use the default fuzzy quality adjustment parameters or to adaptively select appropriate fuzzy quality adjustment parameters based on the current device load. Optionally, the electronic device 100 can obtain the corresponding parameter selection rules based on user operations.

[0153] Optionally, device load may include, for example, high-speed storage load, computing unit load, etc. Optionally, high-speed storage load may include, for example, memory or cache utilization. Computing unit load may include, for example, CPU or GPU utilization.

[0154] For example, the fuzzy quality adjustment parameters include the number of iteration rounds K and the number of sampling times N for each iteration round. As shown in Figure 9(b), when the electronic device 100 disables the adaptive fuzzy quality adjustment, it can obtain the default number of iteration rounds K and the number of sampling times N for each iteration round during the subsequent acquisition of the fuzzy quality adjustment parameters. Alternatively, when the electronic device 100 enables the adaptive fuzzy quality adjustment, it can obtain the current load status of the device during the subsequent acquisition of the number of iteration rounds K and the number of sampling times N for each iteration round. Then, the electronic device 100 matches the corresponding number of iteration rounds K and the number of sampling times N for each iteration round according to the current load status of the device. For example, if the current device load is high, the electronic device 100 can select a set of number of iteration rounds K and the number of sampling times N for each iteration round corresponding to a poorer fuzzy quality; if the current device load is low, the electronic device 100 can select a set of number of iteration rounds K and the number of sampling times N for each iteration round corresponding to a better fuzzy quality.

[0155] Optionally, different fuzz quality adjustment parameters and preset rules can also be written through a preset API interface.

[0156] In this way, by adjusting the fuzzy quality in conjunction with the equipment load, the fuzzy processing process can be prevented from affecting equipment operation under high load. Furthermore, while allowing users to customize the fuzzy quality settings, the complexity of the selection process is reduced.

[0157] In some other embodiments, the electronic device 100 can decouple different fuzzy quality adjustment parameters, and adjust the fuzzy quality by adjusting some or all of the parameters. For example, the fuzzy quality adjustment parameters include the number of iteration rounds K for multi-round updates and the number of samplings N in a single iteration. The electronic device 100 can decouple the number of iteration rounds K and the number of samplings N in a single iteration, and adjust either the number of iteration rounds K or the number of samplings N in a single iteration separately to achieve more flexible fuzzy quality adjustment.

[0158] Optionally, the electronic device 100 is pre-configured with different fuzzy quality adjustment parameters and parameter selection rules. In response to the user's selection to enable fuzzy quality adaptive adjustment, the electronic device 100 obtains the number of iteration rounds K and the number of sampling times per iteration round based on at least two dimensions of device load parameters.

[0159] For example, device load parameters include high-speed storage space utilization and computing unit utilization. If the current high-speed storage space utilization is higher than threshold 1 while the computing unit utilization is lower than threshold 2, then the electronic device 100 adaptively selects a higher number of iteration rounds K and a default number of single-round iteration samples N, or the electronic device 100 adaptively selects a default number of iteration rounds K and a lower number of single-round iteration samples N, thereby reducing the memory access pressure on the high-speed storage space while ensuring blur quality. If the current high-speed storage space utilization is lower than threshold 1 while the computing unit utilization is higher than threshold 2, then the electronic device 100 adaptively selects a lower number of iteration rounds K and a default number of single-round iteration samples N, or the electronic device 100 adaptively selects a default number of iteration rounds K and a higher number of single-round iteration samples N, thereby reducing the computational load on the computing unit and increasing the frame rate while ensuring blur quality.

[0160] In this way, electronic device 100 can achieve more flexible fuzzy quality adjustment by decoupling different fuzzy quality adjustment parameters.

[0161] Optionally, in one possible implementation, the order of steps S601 and S602 is not limited. Step S601 may be executed before, after, or simultaneously with step S602. In another possible implementation, steps S601 and S602 may be the same step. For example, in response to a blurring event, the electronic device 100 acquires blur level parameters, the image to be processed, and blur quality adjustment parameters.

[0162] S603 and electronic device 100 obtain the fuzzy algorithm template according to the fuzzy quality adjustment parameters.

[0163] The blurring algorithm template includes at least one blurring algorithm. The blurring algorithm refers to an algorithm that performs multiple rounds of iterative updates on the image during the blurring process. For example, the image is updated K times, where the input of the k-th round is the output of the (k-1)-th round. Each round of iterative update operation, for example, involves acquiring N sampling points for a pixel A in the image. The N sampling points are, for example, the pixels surrounding pixel A. Then, the pixel values ​​of these N sampling points are averaged, and the resulting average pixel value is used as the pixel value of pixel A in the current iteration update. Thus, a blurring algorithm is used to indicate K iterations of image updates, and this blurring algorithm includes K*N sampling points.

[0164] Optionally, a fuzzy algorithm template is implemented as an array of a large number of sampling points. Optionally, the electronic device 100 may have multiple pre-configured fuzzy algorithm templates, where each template includes the same fuzzy algorithm indicator K. Then, after obtaining the fuzzy quality adjustment parameters, including the number of iterations K and the number of samplings per iteration N, the electronic device 100 can match the corresponding fuzzy algorithm template.

[0165] For example, as shown in FIG5, the electronic device 100 obtains the fuzzy algorithm template through the core processing module.

[0166] Optionally, as shown in FIG6, the execution order of steps S601 and S602-S603 is not limited in this embodiment. That is, the electronic device 100 may first acquire the image to be processed and the blur level parameter, and then acquire the blur quality adjustment parameter and the blur algorithm template. Alternatively, the electronic device 100 may also first acquire the blur quality adjustment parameter and the blur algorithm template, and then acquire the image to be processed and the blur level parameter. Alternatively, the electronic device 100 may also first acquire the blur quality adjustment parameter, then acquire the image to be processed and the blur level parameter, and then acquire the blur algorithm template.

[0167] S604, Electronic device 100 obtains the fuzzy algorithm based on the fuzziness level parameter and the fuzzy algorithm template.

[0168] In some embodiments, as described in step S603 above, each blur algorithm template includes at least one blur algorithm. Optionally, the effect of multiple rounds of iterative updates is determined by the offset of the coordinates of K*N sampling points relative to the coordinates of pixel A. When the blur degree parameter changes, the coordinates of the K*N sampling points change accordingly. Therefore, each pre-configured blur algorithm template in the electronic device 100 includes blur algorithms corresponding to different blur degree parameters, and the coordinates of the sampling points included in different blur algorithms are different.

[0169] Optionally, after obtaining the fuzzy algorithm template, the electronic device 100 can match the corresponding fuzzy algorithm in the fuzzy algorithm template according to the fuzziness level parameter obtained in step S601 above.

[0170] For example, as shown in FIG5, the electronic device 100 obtains the fuzzy algorithm through the core processing module.

[0171] In some embodiments, developers can obtain a fuzzy algorithm template through manual or automatic tuning. Then, the fuzzy algorithm template is pre-set in the electronic device 100, and the electronic device 100 can obtain the pre-set fuzzy algorithm template during subsequent fuzzing processes.

[0172] Optionally, as shown in Figure 10, the process of obtaining the fuzzy algorithm template may include steps S1001 and S1002.

[0173] S1001. Obtain the coordinates of the sampling point corresponding to a preset fuzziness parameter.

[0174] In some embodiments, based on a preset blur level parameter, a preset image is blurred using Gaussian blur, and the blurring result is used as the target value. Then, a set of iteration rounds K and the number of samples per iteration N are obtained. The preset image is blurred using an iterative update blurring method. During the blurring process, the coordinates of N sampling points are manually adjusted, or automatic optimization is performed using loss functions such as cross-entropy and gradient descent, so that after K iterations, the blur quality of the output image is close to the target value corresponding to Gaussian blur. This allows the acquisition of a set of sampling point coordinates corresponding to the current preset blur level parameter. It should be understood that this set of sampling point coordinates represents, for example, a blurring algorithm.

[0175] S1002. Obtain the fuzzy algorithm template based on the coordinates of the sampling points corresponding to the multiple preset fuzziness parameters.

[0176] In some embodiments, by repeating step S1001 above, multiple sets of sampling point coordinates (e.g., fuzzy algorithm) corresponding to multiple fuzziness parameters can be obtained. Then, by combining these multiple sets of sampling point coordinates, the corresponding fuzzy algorithm template can be obtained.

[0177] The fuzzy algorithm template corresponds to a set of iteration rounds K and single-round sampling number N used in step S1001. Therefore, by repeating steps S1001-S1002, fuzzy algorithm templates corresponding to different sets of iteration rounds K and single-round sampling number N can be obtained.

[0178] Thus, the blur quality of the pre-installed blur algorithm in the electronic device 100 can reach the blur quality achieved by Gaussian blur. Therefore, after blurring the image to be processed based on this blur algorithm, better blur quality can be obtained, improving the user experience.

[0179] In some embodiments, the fuzzy algorithm template preset in the electronic device 100 includes a finite number of fuzzy algorithms corresponding to fuzziness degree parameters, thereby reducing the storage space occupied by the fuzzy algorithm template in the electronic device 100 and reducing the processing difficulty of the above steps S1001 and S1002.

[0180] In some examples, electronic device 100 can directly match the corresponding fuzzy algorithm in the fuzzy algorithm template based on the fuzziness level parameter.

[0181] In other examples, electronic device 100 cannot directly match the corresponding fuzzy algorithm in the fuzzy algorithm template based on the fuzziness level parameter. In this case, electronic device 100 can obtain the required fuzzy algorithm through interpolation.

[0182] For example, consider the fuzziness parameter σ1 < σ0 < σ2. If the electronic device 100 cannot directly match a corresponding fuzzy algorithm in the fuzzy algorithm template corresponding to the iteration number i and the single iteration sampling number j based on the fuzziness parameter σ0, then the electronic device 100 can obtain the fuzziness parameters σ1 and σ2 adjacent to the fuzziness parameter σ0, and obtain the sampling point coordinates corresponding to the fuzziness parameter σ1. and the coordinates of the sampling points corresponding to the ambiguity parameter σ2 Then, the electronic device 100 can obtain the coordinates of the sampling point corresponding to the ambiguity parameter σ0 through interpolation.

[0183] In this way, the electronic device 100 can obtain the coordinates of the sampling points corresponding to the required ambiguity parameter from a finite set of sampling point coordinates through interpolation, thereby increasing the applicability of the solution.

[0184] S605, electronic device 100 performs blur processing on the image to be processed according to the blur algorithm, and obtains the blurred image to be displayed.

[0185] In some embodiments, after obtaining the fuzzy algorithm, the electronic device 100 can perform K rounds of iterative update processing on the image to be processed obtained in step S601, according to the number of iteration rounds K, the number of sampling times N in a single iteration, and the coordinates of the sampling points indicated by the fuzzy algorithm, thereby obtaining the fuzzy image to be displayed.

[0186] In another example, during step S6013b above, the electronic device 100 scales the captured image while acquiring the image to be processed. Therefore, after performing K rounds of iterative updates on the image to be processed, the electronic device 100 also needs to perform reverse scaling on the acquired blurred image according to the scaling factor used in step S6013b to obtain the blurred image to be displayed. For example, in step S6013b, the electronic device 100 shrinks the captured image according to the scaling factor. Then, during the blurring process, the electronic device 100 can enlarge the iteratively updated blurred image according to the scaling factor to obtain a blurred image to be displayed that is the same size as the captured image. Optionally, the blurred image enlargement process can be implemented through interpolation.

[0187] For example, as shown in FIG5, the electronic device 100 performs blurring processing on the image to be processed through the core processing module to obtain a blurred image to be displayed.

[0188] In some embodiments, after acquiring a blurred image to be displayed, the electronic device 100 may output the blurred image. For example, the electronic device 100 may display the blurred image on a display screen. Alternatively, the electronic device 100 may perform layer composite processing on the blurred image to be displayed with other images to be displayed to obtain a composite image. The electronic device 100 may then display the composite image on a display screen.

[0189] For example, as shown in FIG5, the electronic device 100 calls the display driver through the output module to trigger the display screen to display the blurred image or composite image to be displayed.

[0190] Thus, based on the blur quality adjustment parameters, the electronic device 100 performs blur processing on the image to be processed through a multi-round iterative update of the blur algorithm. This enables flexible, efficient, and seamless adjustment of blur quality, achieving a balance between blur quality and blur performance. For example, in scenarios with heavy third-party application loads or where visual effects are not critical, the electronic device 100 can lower the blur quality to gain benefits in blur performance, ensuring smooth display. Conversely, in scenarios with higher visual effect requirements, the electronic device 100 can increase the blur quality to achieve a blur effect close to Gaussian blur.

[0191] The complexity of this fuzzing process is independent of the fuzziness level parameter. Therefore, compared to Gaussian fuzzing, it can effectively reduce the complexity of fuzzing and achieve better fuzzing performance.

[0192] Furthermore, the pre-configured blur algorithm in the electronic device 100 is one that can achieve blur quality close to Gaussian blur. Therefore, it can obtain better blur quality compared to Kawase blur. Moreover, the target value for blur quality optimization in the electronic device 100 is Gaussian blur. Therefore, for different iteration rounds K and single-round sampling times N, the blur quality will not change abruptly, achieving controllable blur quality.

[0193] Furthermore, the electronic device 100 can achieve blurring without scaling the captured image. Therefore, compared to hybrid resolution acceleration technology, it can achieve higher performance while maintaining blur quality.

[0194] Figure 11 is a schematic flowchart of another image processing method provided in an embodiment of this application. It should be noted that this method is not limited to the specific order described in Figure 11 and below. It should be understood that in other embodiments, the order of some steps in this method can be interchanged according to actual needs, or some steps can be omitted or deleted. The method includes the following steps:

[0195] S1101. In response to the first blur processing event, the electronic device 100 acquires the first image and the first blur quality adjustment parameter corresponding to the first blur processing event.

[0196] The first blur quality adjustment parameter includes the first iteration round number and the first single-round iteration sampling number. Optionally, the first blur quality adjustment parameter can affect the blur processing effect on the first image, such as affecting the blur quality of the second image output after blur processing of the first image.

[0197] Optionally, the subsequent electronic device 100 blurs the first image through multiple rounds of iterative updates. The first iteration round number indicates the number of iterations required during the blurring process, and the first single-round iteration sampling number indicates the number of samples taken in each iteration. For example, the first iteration round number may be 3, 5, or 6 rounds. The first single-round iteration sampling number may be 3, 5, or 6 times. Optionally, the more first iteration rounds and / or the more first single-round iteration sampling numbers, the better the blur quality of the acquired second image.

[0198] In some embodiments, the electronic device 100 matches a suitable first fuzzy quality adjustment parameter based on one or more of the following: fuzzy processing scenario, fuzzy level, device load, and resource utilization rate.

[0199] In this way, electronic devices can flexibly match appropriate fuzz quality adjustment parameters based on various factors when the current fuzzing event occurs, thereby better balancing fuzz quality and performance.

[0200] In some examples, in response to a first blur processing event, the electronic device 100 acquires the blur processing scene corresponding to the first blur processing event. Then, the electronic device 100 selects the first blur quality adjustment parameter corresponding to the blur processing scene from a set of preset blur quality adjustment parameters.

[0201] For example, the electronic device 100 has preset fuzz quality adjustment parameters corresponding to different fuzzing scenarios. Then, in response to the first fuzzing event, the electronic device 100 can determine the current fuzzing scenario and then obtain the corresponding first fuzz quality adjustment parameters based on the fuzzing scenario.

[0202] Optionally, the blurring scenario is, for example, a scenario where the image to be displayed needs to be blurred. Optionally, the blurring scenario includes, for example, a pull-down notification menu, a pull-down settings menu, a desktop folder open / exit scenario, a lock screen scenario, a volume button press scenario, and a desktop icon display scenario.

[0203] In this way, the electronic device 100 can obtain the required fuzzy quality adjustment parameters based on the current fuzzy processing scenario, effectively improving the efficiency of obtaining fuzzy quality adjustment parameters.

[0204] In other examples, electronic device 100 receives a first operation from the user and determines the fuzziness level. In response to the first fuzzing event, electronic device 100 obtains a first fuzziness quality adjustment parameter corresponding to the fuzziness level from a set of preset fuzziness quality adjustment parameters.

[0205] Optionally, in response to a user's operation in the settings application, the blur level is obtained. Then, upon detecting a blur processing event, the electronic device 100 can obtain the currently set blur level and, based on that blur level, obtain blur quality adjustment parameters. Optionally, in response to a blur processing event, the electronic device 100 prompts the user to select a blur level via a pop-up window or other notification method. Afterward, the electronic device 100 obtains the blur quality adjustment parameters based on the blur level selected by the user.

[0206] For example, as shown in Figure 9(a), the electronic device 100 is pre-configured with five levels of fuzzy quality: poor, moderate, high, and excellent. Each level of fuzzy quality corresponds to a different number of first iteration rounds K and the number of first single-round iteration samplings N. In this way, the electronic device 100 can obtain the corresponding number of first iteration rounds K and the number of first single-round iteration samplings N according to the level selected by the user.

[0207] In this way, configuring fuzz quality adjustment parameters corresponding to different fuzziness levels can meet the needs of different fuzziness qualities while also satisfying users' personalized requirements. Furthermore, the selection of fuzziness levels is easy for users to understand, reducing the difficulty of operation.

[0208] In other examples, the electronic device 100 is pre-configured with blur quality adjustment parameters corresponding to different blur levels in different blur processing scenarios. For example, the electronic device 100 receives a first operation from the user and determines the blur level. In response to the first blur processing event, the electronic device 100 determines the current blur processing scenario and obtains multiple blur quality adjustment parameters corresponding to that scenario. Then, based on the blur level, the electronic device 100 selects the first blur quality adjustment parameter corresponding to that blur level from among the multiple blur quality adjustment parameters.

[0209] Thus, by combining the blur processing scenario and blur level, the blur quality adjustment parameters can be configured to obtain better image blur quality.

[0210] In other examples, in response to a first fuzzing event, the electronic device 100 acquires load information. If the load information indicates that the load of the electronic device 100 is greater than or equal to a first threshold, the electronic device 100 uses a preset second fuzziness quality adjustment parameter as the first fuzziness quality adjustment parameter; if the load information indicates that the load of the electronic device 100 is less than the first threshold, the electronic device 100 uses a preset third fuzziness quality adjustment parameter as the first fuzziness quality adjustment parameter. The first fuzziness quality corresponding to the third fuzziness quality adjustment parameter is higher than the second fuzziness quality corresponding to the second fuzziness quality adjustment parameter.

[0211] Optionally, blur quality can be compared using an error function. For example, the pixel value difference between two blurred images can be obtained using an error function, and the blurred image with higher pixel values ​​can be considered as having higher blur quality, while the blurred image with lower pixel values ​​can be considered as having lower blur quality.

[0212] Optionally, the electronic device 100 may choose whether to adaptively select fuzzy quality adjustment parameters based on load information, depending on the user's operation. For example, if the electronic device 100 detects a second user instruction to adaptively adjust the fuzzy quality, it then obtains the fuzzy quality adjustment parameters based on the load information; otherwise, the electronic device 100 responds to the fuzzing processing event and directly obtains the default fuzzy quality adjustment parameters. This increases user participation and reduces the difficulty of user operation.

[0213] In this way, the electronic device 100 can adaptively select the fuzzy quality adjustment parameters according to the device load. When the load is high, it can reduce the demand for fuzzy quality, thereby avoiding the impact of the fuzzy processing process on the operation of other functions of the device. When the load is low, it can provide users with better fuzzy quality.

[0214] In other examples, in response to a first fuzzing event, electronic device 100 acquires a first resource occupancy rate and a second resource occupancy rate. When the first resource occupancy rate is greater than or equal to a second threshold and the second resource occupancy rate is less than a third threshold, the electronic device 100 assigns a first iteration round number of a first quantity and a second quantity of sampling counts in a first single iteration round; when the first resource occupancy rate is less than the second threshold and the second resource occupancy rate is greater than or equal to the third threshold, the first iteration round number of a first iteration round number of a third quantity and a fourth quantity of sampling counts in a first single iteration round. Wherein, the first quantity is greater than the third quantity, and the second quantity is less than the fourth quantity.

[0215] Optionally, the first resource utilization rate is, for example, the high-speed storage space utilization rate, and the second resource utilization rate is, for example, the computing unit utilization rate.

[0216] For example, if high-speed storage space utilization is high, the computational data generated by a large number of single-round iteration samplings may further increase the load on the high-speed storage space. In this case, electronic device 100 can choose a lower number of single-round iteration samplings, or it can choose a higher or default number of iteration rounds.

[0217] For example, when the computing unit utilization is high, a larger number of iteration rounds may place a greater burden on the computing unit. In this case, the electronic device can choose a lower number of iteration rounds and instead select a higher or default number of sampling times per iteration round.

[0218] Thus, by selecting blur quality adjustment parameters based on resource utilization across at least two dimensions, the image blurring process can be prevented from affecting the operation of other functions of the electronic device. Furthermore, decoupling different blur quality adjustment parameters allows for more flexible subsequent blur quality adjustments.

[0219] Optionally, the electronic device 100 selects whether to adaptively select fuzzy quality adjustment parameters based on a first resource utilization rate and a second resource utilization rate, depending on the user's operation. For example, if the electronic device 100 detects a second user instruction to adaptively adjust the fuzzy quality, it then obtains the fuzzy quality adjustment parameters based on the first and second resource utilization rates; otherwise, the electronic device 100 directly obtains the default fuzzy quality adjustment parameters in response to the fuzzing processing event. This increases user participation and reduces the difficulty of user operation.

[0220] Optionally, the electronic device 100 can obtain a suitable first fuzzy quality adjustment parameter based on any one or a combination of factors such as the fuzzy processing scenario, fuzziness level, device load, and resource utilization. For example, the electronic device 100 may have pre-configured fuzzy quality adjustment parameters corresponding to different fuzzy processing scenarios. Subsequently, during the fuzzy processing, the electronic device 100 can first obtain the fuzzy quality adjustment parameter based on the current fuzzy processing scenario, and then select the fuzzy quality adjustment parameter corresponding to the load information from the already obtained fuzzy quality adjustment parameters based on the current device load information. This ensures that the obtained fuzzy quality adjustment parameter meets the requirements of the fuzzy processing scenario and load information, thereby balancing fuzzy quality and device performance. This application embodiment will not provide further examples of this.

[0221] In some embodiments, the first image is the image to be blurred. Optionally, the first image is an image obtained by the electronic device 100 by capturing a full-screen image, or the first image may be a preset image in the electronic device 100 or an image downloaded by the electronic device 100 from a server.

[0222] In some examples, in response to a first blurring event, the electronic device 100 captures part or all of the image from the full-screen image as the first image.

[0223] In other examples, in response to a first blurring event, electronic device 100 acquires a third image. Electronic device 100 then acquires a scaling factor. Subsequently, electronic device 100 acquires a first image based on the scaling factor and the third image. Optionally, the third image may be a portion or all of a full-screen image captured by electronic device 100. Alternatively, the third image may be a preset image acquired by electronic device 100, an image acquired from a server, or an image from another source. In this way, electronic device 100 first scales the acquired third image and then blurs the scaled image, thereby improving blurring performance.

[0224] In this way, the electronic device 100 can acquire the image that needs to be blurred.

[0225] S1102, the electronic device 100 obtains a second image based on the first fuzzy quality adjustment parameter and the first image.

[0226] In some embodiments, after obtaining the first blur quality adjustment parameter, the electronic device 100 can perform iterative updating blur processing on the first image using the first blur quality adjustment parameter to obtain a second image. The second image is a blurred image that meets the blur degree parameter requirements.

[0227] In this way, the electronic device 100 performs fuzzy processing through iterative updates, reducing computational power consumption and thus lowering the performance requirements of the fuzzy processing device.

[0228] In some embodiments, the electronic device 100 acquires a first blur algorithm corresponding to a first blur quality adjustment parameter. The electronic device 100 then acquires a second image based on the first blur algorithm and the first image.

[0229] Optionally, the electronic device 100 has pre-set fuzzy algorithms corresponding to different fuzzy quality adjustment parameters. These fuzzy algorithms indicate the coordinates of the sampling points during each iteration update. In this way, the electronic device 100 can directly match the fuzzy algorithm according to the fuzzy quality adjustment parameters, reducing the difficulty of obtaining the fuzzy algorithm and improving the efficiency of fuzzy processing.

[0230] In some embodiments, in response to a first blur processing event, the electronic device 100 acquires a blur level parameter. Then, the electronic device 100 acquires a second image based on the first blur quality adjustment parameter and the first image, including: the electronic device 100 acquires the second image based on the first blur quality adjustment parameter, the blur level parameter, and the first image.

[0231] Optionally, the implementation process of the image processing method provided in this application embodiment is integrated into a preset API interface. The input parameters of the API interface include a first blur quality adjustment parameter, a blur degree parameter, and a first image, and it can output a second image, thereby achieving flexible, efficient, and abrupt adjustment of blur quality and performance.

[0232] In some examples, the electronic device 100 acquires a blur algorithm template corresponding to a first blur quality adjustment parameter. This blur algorithm template includes multiple blur algorithms. Then, the electronic device 100 acquires a second blur algorithm from the blur algorithm template corresponding to a blur degree parameter. Subsequently, the electronic device 100 can acquire a second image based on the second blur algorithm and the first image.

[0233] Optionally, the difference between the third blur quality and the target blur quality of the second image is less than a fourth threshold, where the target blur quality is the blur quality of the image output after processing the first image with Gaussian blur based on the blur degree parameter.

[0234] Optionally, the fourth threshold indicates that the third blur quality of the second image is similar to the target blur quality.

[0235] Optionally, the fuzzy algorithm template corresponding to the first fuzzy quality adjustment parameter includes fuzzy algorithms corresponding to different fuzziness degree parameters. These fuzzy algorithms enable the electronic device 100 to obtain a fuzzy quality close to Gaussian fuzziness corresponding to the same fuzziness degree parameter.

[0236] Thus, based on the blur quality adjustment parameters, the electronic device 100 performs blur processing on the first image through multiple rounds of iterative updates, which can achieve flexible, efficient, and abrupt adjustment of blur quality, thereby achieving a balance between blur quality and blur performance.

[0237] In some embodiments, during the acquisition of the first image, the electronic device 100 acquires a first image of a corresponding size using a scaling factor. Then, the electronic device 100 acquires a fourth image based on a first blur quality adjustment parameter and the first image. Afterwards, the electronic device 100 acquires a second image based on the scaling factor and the fourth image. The size of the second image is the same as the size of the first image.

[0238] For example, the electronic device 100 first reduces the size of the captured image to lower the power consumption of the blurring process. After the blurring process is completed, the blurred image is then enlarged to obtain the final output blurred image, so that the size of the output blurred image meets the display size requirements.

[0239] In some embodiments, the electronic device 100 displays the second image after acquiring it.

[0240] Thus, the electronic device 100 acquires a blurred image that meets the display requirements.

[0241] In some embodiments, in response to a second blur processing event, the electronic device 100 acquires a fourth image and a fourth blur quality adjustment parameter corresponding to the second blur processing event. The fourth blur quality adjustment parameter differs from the first blur quality adjustment parameter and includes a second iteration round number and a second single-round iteration sampling number. Subsequently, the electronic device 100 acquires a fifth image based on the fourth blur quality adjustment parameter and the fourth image.

[0242] Optionally, the fourth fuzzy quality adjustment parameter may differ from the first fuzzy quality adjustment parameter, for example, by the fourth fuzzy quality adjustment parameter being completely different from the first fuzzy quality adjustment parameter, or by the fourth fuzzy quality adjustment parameter being partially different from the first fuzzy quality adjustment parameter. For instance, the fourth fuzzy quality adjustment parameter differing from the first fuzzy quality adjustment parameter may include any of the following situations: the number of the second iteration rounds is different from the number of the first iteration rounds, and the number of samples in the second single iteration round is different from the number of samples in the first single iteration round; the number of the second iteration rounds is different from the number of the first iteration rounds, and the number of samples in the second single iteration round is the same as the number of samples in the first single iteration round; the number of the second iteration rounds is the same as the number of the first iteration rounds, and the number of samples in the second single iteration round is different from the number of samples in the first single iteration round.

[0243] In this way, the electronic device 100 can obtain appropriate fuzzy quality adjustment parameters according to different fuzzy processing events.

[0244] The image processing method provided by the embodiments of this application has been described in detail above with reference to Figures 6-11. The electronic device provided by the embodiments of this application is described in detail below with reference to Figure 12.

[0245] In one possible design, Figure 12 is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. As shown in Figure 12, the electronic device 1200 may include a processing unit 1201. The electronic device 1200 can be used to implement the functions of the electronic device 100 involved in the above method embodiments.

[0246] Optionally, the processing unit 1201 is configured to support the electronic device 1200 in executing S601-S605 in FIG6; and / or, to support the electronic device 1200 in executing S6011a and S6012a in FIG7; and / or, to support the electronic device 1200 in executing S6011b-S6013b in FIG8; and / or, to support the electronic device 1200 in executing S1101 and S1102 in FIG11.

[0247] Optionally, the electronic device 1200 may further include a transceiver unit 1202. The transceiver unit 1202 is used to support the electronic device 1200 in receiving user operations.

[0248] The transceiver unit may include a receiving unit and a transmitting unit, and may be implemented by a transceiver or transceiver-related circuit components, and may be a transceiver or transceiver module. The operation and / or function of each unit in the electronic device 1200 are respectively to implement the corresponding flow of the image processing method described in the above method embodiments. All relevant content of each step involved in the above method embodiments can be referred to the functional description of the corresponding functional unit, and for the sake of brevity, it will not be repeated here.

[0249] Optionally, the electronic device 1200 shown in FIG12 may further include a storage unit (not shown in FIG12) storing a program or instructions. When the processing unit 1201 and the transceiver unit 1202 execute the program or instructions, the electronic device 1200 shown in FIG12 can perform the image processing method described in the above method embodiments.

[0250] The technical effects of the electronic device 1200 shown in Figure 12 can be referred to the technical effects of the image processing method described in the above method embodiments, and will not be repeated here.

[0251] In addition to being in the form of electronic device 1200, the technical solution provided in this application can also be a functional unit or chip in an electronic device, or a device used in conjunction with an electronic device.

[0252] Figure 13 is a schematic diagram of the possible product form of the electronic device 100 provided in the embodiments of this application.

[0253] As one possible product form, the electronic device 100 described in this application embodiment can be a communication device.

[0254] The communication device includes a processor 1301. Optionally, the communication device further includes a transceiver 1302, a memory 1303, and a bus. The processor 1301 is used to execute S601-S605 in FIG. 6; and / or, to execute S6011a and S6012a in FIG. 7; and / or, to execute S6011b-S6013b in FIG. 8; and / or, to support the electronic device 1200 in executing S1101 and S1102 in FIG. 11, and / or other processing operations that the electronic device 100 needs to perform in this embodiment of the application.

[0255] As another possible product form, the electronic device 100 described in this application embodiment can also be implemented by a general-purpose processor or a dedicated processor, that is, a chip.

[0256] The chip includes a processing circuit 1301. Optionally, the communication device further includes transceiver pins 1302. The processing circuit 1301 is used to execute S601-S605 in FIG6; and / or, to execute S6011a and S6012a in FIG7; and / or, to execute S6011b-S6013b in FIG8; and / or, to support the electronic device 1200 in executing S1101 and S1102 in FIG11, and / or other processing operations that the electronic device 100 needs to perform in this embodiment of the application.

[0257] This application also provides a chip system, including: a processor coupled to a memory, the memory being used to store programs or instructions, wherein when the program or instructions are executed by the processor, the chip system implements the methods in any of the above method embodiments.

[0258] Optionally, the chip system may contain one or more processors. These processors can be implemented in hardware or software. When implemented in hardware, the processor can be a logic circuit, an integrated circuit, etc. When implemented in software, the processor can be a general-purpose processor, implemented by reading software code stored in memory.

[0259] Optionally, the chip system may contain one or more memories. The memory may be integrated with the processor or disposed separately from it; this application embodiment does not limit this. For example, the memory may be a non-transient processor, such as a read-only memory (ROM), which may be integrated with the processor on the same chip or disposed separately on different chips. This application embodiment does not specifically limit the type of memory or the arrangement of the memory and processor.

[0260] For example, the chip system may be a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on chip (SoC), a central processor unit (CPU), a network processor (NP), a digital signal processor (DSP), a micro controller unit (MCU), a programmable logic device (PLD), or other integrated chips.

[0261] It should be understood that each step in the above method embodiments can be completed by integrated logic circuits in the processor hardware or by instructions in software form. The method steps disclosed in the embodiments of this application can be directly manifested as being executed by a hardware processor, or being executed by a combination of hardware and software modules in the processor.

[0262] This application also provides a computer-readable storage medium storing a computer program. When the computer program is run on a computer, it causes the computer to perform the aforementioned steps to implement the image processing method described above.

[0263] This application also provides a computer program product that, when run on a computer, causes the computer to perform the aforementioned steps to implement the image processing method described above.

[0264] In addition, this application also provides an apparatus. Specifically, the apparatus may be a component or module, and may include one or more processors and a memory connected together. The memory stores a computer program. When the computer program is executed by one or more processors, the apparatus performs the image processing methods described in the above-described method embodiments.

[0265] The apparatus, computer-readable storage medium, computer program product, or chip provided in the embodiments of this application are all used to execute the corresponding methods provided above. Therefore, the beneficial effects they can achieve can be referred to the beneficial effects of the corresponding methods provided above, and will not be repeated here.

[0266] The steps of the methods or algorithms described in conjunction with the embodiments of this application can be implemented in hardware or by a processor executing software instructions. The software instructions can consist of corresponding software modules, which can be stored in random access memory (RAM), flash memory, read-only memory (ROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), registers, hard disks, portable hard disks, CD-ROMs, or any other form of storage medium well known in the art. An exemplary storage medium is coupled to a processor, enabling the processor to read information from and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can reside in an application-specific integrated circuit (ASIC).

[0267] Through the above description of the embodiments, those skilled in the art will clearly understand that, for the sake of convenience and brevity, the division of the above functional modules is only used as an example. In practical 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. The specific working process of the system, device, and unit described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0268] In the several embodiments provided in this application, it should be understood that the disclosed methods can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of modules or units is only a logical functional division, and there may be other division methods in actual implementation; for example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of modules or units may be electrical, mechanical or other forms.

[0269] 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.

[0270] Computer-readable storage media include, but are not limited to, any of the following: USB flash drive, portable hard drive, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk, and other media capable of storing program code.

[0271] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. An image processing method, characterized by, The method is applied to an electronic device, and the method comprises: In response to a first blur processing event, a first image and a first blur quality adjustment parameter corresponding to the first blur processing event are obtained, the first blur quality adjustment parameter comprising a first iteration round number and a first single-round iteration sampling number; A second image is obtained according to the first blur quality adjustment parameter and the first image.

2. The method of claim 1, wherein, The method comprises: In response to the first blur processing event, the first blur quality adjustment parameter is obtained according to one or more of the following contents corresponding to the first blur processing event: a blur processing scene, a blur level, load information, and resource occupation rate.

3. The method according to claim 1 or 2, characterized in that, The method comprises: In response to the first blur processing event, the blur processing scene corresponding to the first blur processing event is obtained; In a plurality of preset groups of blur quality adjustment parameters, the first blur quality adjustment parameter corresponding to the blur processing scene is obtained.

4. The method according to any one of claims 1 to 3, characterized in that, The method comprises: A first operation of a user is received, and a blur level is determined; In response to the first blur processing event, in a plurality of preset groups of blur quality adjustment parameters, the first blur quality adjustment parameter corresponding to the blur level is obtained.

5. The method according to claim 1 or 2, characterized in that, The method comprises: In response to the first blur processing event, load information is obtained; In a case where the load information indicates that the load of the electronic device is greater than or equal to a first threshold value, a preset second blur quality adjustment parameter is used as the first blur quality adjustment parameter; In a case where the load information indicates that the load of the electronic device is less than the first threshold value, a preset third blur quality adjustment parameter is used as the first blur quality adjustment parameter, the first blur quality corresponding to the third blur quality adjustment parameter being higher than the second blur quality corresponding to the second blur quality adjustment parameter.

6. The method according to claim 1 or 2, characterized in that, The method comprises: In response to the first blur processing event, a first resource occupation rate and a second resource occupation rate are obtained; In a case where the first resource occupation rate is greater than or equal to a second threshold value and the second resource occupation rate is less than a third threshold value, the first iteration round number is a first number, and the first single-round iteration sampling number is a second number; In a case where the first resource occupation rate is less than the second threshold value and the second resource occupation rate is greater than or equal to the third threshold value, the first iteration round number is a third number, and the first single-round iteration sampling number is a fourth number; The first number is greater than the third number, and the second number is less than the fourth number.

7. The method according to claim 5 or 6, characterized in that, Before the acquiring the first image and the first blur quality adjustment parameter corresponding to the first blur processing event in response to the first blur processing event, the method further includes: detecting a second operation of indicating self-adaptive adjustment of blur quality by a user.

8. The method according to any one of claims 1 to 7, characterized in that, The acquiring the second image according to the first blur quality adjustment parameter and the first image includes: acquiring a first blur algorithm corresponding to the first blur quality adjustment parameter; acquiring the second image according to the first blur algorithm and the first image.

9. The method according to any one of claims 1 to 8, characterized in that, Before the acquiring the second image according to the first blur quality adjustment parameter and the first image, the method further includes: acquiring a blur degree parameter in response to the first blur processing event; The acquiring the second image according to the first blur quality adjustment parameter and the first image includes: acquiring the second image according to the first blur quality adjustment parameter, the blur degree parameter and the first image.

10. The method of claim 9, wherein, The acquiring the second image according to the first blur quality adjustment parameter, the blur degree parameter and the first image includes: acquiring a blur algorithm template corresponding to the first blur quality adjustment parameter, the blur algorithm template including a plurality of blur algorithms; acquiring a second blur algorithm corresponding to the blur degree parameter in the blur algorithm template; acquiring the second image according to the second blur algorithm and the first image.

11. The method according to claim 9 or 10, characterized in that, A difference between a third blur quality of the second image and a target blur quality is less than a fourth threshold value, the target blur quality being a blur quality of an image output by processing the first image based on the blur degree parameter through Gaussian blur.

12. The method according to any one of claims 1 to 11, characterized in that, The acquiring the first image and the first blur quality adjustment parameter corresponding to the first blur processing event in response to the first blur processing event includes: in response to the first blur processing event, intercepting part or all of a full-screen image as the first image.

13. The method according to any one of claims 1 to 11, characterized in that, The acquiring the first image and the first blur quality adjustment parameter corresponding to the first blur processing event in response to the first blur processing event includes: in response to the first blur processing event, acquiring a third image; acquiring a scaling factor; acquiring the first image according to the scaling factor and the third image.

14. The method of claim 13, wherein, The acquiring the second image according to the first blur quality adjustment parameter and the first image includes: acquiring a fourth image according to the first blur quality adjustment parameter and the first image; acquiring the second image according to the scaling factor and the fourth image, the second image having the same size as the first image.

15. The method according to any one of claims 1 to 14, characterized in that, The method further includes: in response to a second blur processing event, acquiring a fourth image and a fourth blur quality adjustment parameter corresponding to the second blur processing event, the fourth blur quality adjustment parameter being different from the first blur quality adjustment parameter, the fourth blur quality adjustment parameter including a second iteration round number and a second single-round iteration sampling number; acquiring a fifth image according to the fourth blur quality adjustment parameter and the fourth image.

16. An electronic device, comprising: including: A processor and a memory coupled with the processor, the memory configured to store computer program code comprising computer instructions that, when read by the processor from the memory, cause the electronic device to perform the method of any one of claims 1-15.

17. A computer readable storage medium characterized by: The computer readable storage medium comprises a computer program that, when running on an electronic device, causes the electronic device to perform the method of any one of claims 1-15.

18. A computer program product, characterised in that, The computer program product, when running on a computer, causes the computer to perform the method of any one of claims 1-15.

Citation Information

Patent Citations

  • Smart home device and control method

    CN111416759A

  • Image processing method and device, electronic equipment and storage medium

    CN113177890A

  • Video processing method and device, electronic equipment and computer readable storage medium

    CN117853980A

  • Apparatus and method for monitoring system health based on fuzzy metric data ranges and fuzzy rules

    US20050065753A1