Image blurring method and device, equipment and storage medium

CN120912461APending Publication Date: 2025-11-07GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510934153.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-07
Publication Date
2025-11-07

Smart Images

  • Figure CN120912461A_ABST
    Figure CN120912461A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses an image blurring method and device, equipment and a storage medium, and the method comprises the steps: firstly detecting a target instruction, the target instruction is used for carrying out the blurring processing of a target layer of a target display image, and the target display image comprises the target layer and other layers; and then, in response to the target instruction, performing fuzzy processing on the target image layer through the DPU, and outputting the image after fuzzy processing through the display screen, the image after fuzzy processing comprising the target image layer after fuzzy processing and other image layers. In the image blurring method, the target layer is blurred through the DPU, so that the power consumption of the terminal equipment for blurring the image can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] Embodiments of the present application relate to image processing technology, and relate to but are not limited to an image blurring method, device, equipment and storage medium. BACKGROUND

[0002] With the development of terminal devices, the application of blur effects in the user interface (UI) and application (app) design of smart phones and tablet terminal devices is becoming more and more widespread. For example, many places in the iOS system use blur effects, the most obvious of which are the control center and the notification center.

[0003] However, the blur processing in the related art is implemented by a central processing unit (CPU) and a graphics processing unit (GPU) software scheme, and in order to achieve a good blur effect, a large blur radius, a blur radius update frequency and a blur duration are used. The implementation by the CPU and the GPU software scheme will bring a large performance and power consumption load to the system, causing system lag, unsmoothness and high power consumption.

[0004] Therefore, how to reduce the power consumption of terminal devices for image blurring is a problem to be solved. SUMMARY

[0005] The image blurring method, device, equipment and storage medium provided by the embodiments of the present application are implemented as follows:

[0006] In an aspect of the embodiments of the present application, an image blurring method is provided, which is applied to a terminal device including a display processor (DPU) and a display screen. The method includes detecting a target instruction for blurring a target layer of a target display image, the target display image including the target layer and other layers; in response to the target instruction, blurring the target layer by the DPU, and outputting the blurred image by the display screen, the blurred image including the blurred target layer and the other layers.

[0007] Another aspect of the embodiment of the present application also provides an image blurring device, which is applied to a terminal device, the terminal device comprising a display processor DPU and a display screen, and the device comprises: a detection module, configured to detect a target instruction, the target instruction being used for blurring processing of a target layer of a target display image, the target display image comprising the target layer and other layers; and a processing module, configured to respond to the target instruction, blur process the target layer through the DPU, and output the image after blurring processing through the display screen, the image after blurring processing comprising the target layer after blurring processing and the other layers.

[0008] The computer device provided by the embodiment of the present application comprises a memory and a processor, the memory stores a computer program capable of running on the processor, and the processor implements the method of the embodiment of the present application when executing the program.

[0009] The computer readable storage medium provided by the embodiment of the present application stores a computer program, and the computer program is executed by a processor to implement the method provided by the embodiment of the present application.

[0010] In the image blurring method, device, equipment and storage medium provided by the embodiment of the present application, first, a target instruction is detected, the target instruction being used for blurring processing of a target layer of a target display image, the target display image comprising the target layer and other layers; then, in response to the target instruction, the target layer is blurred processed through a DPU, and an image after blurring processing is output through a display screen, the image after blurring processing comprising the target layer after blurring processing and the other layers. In the image blurring method, the target layer is blurred processed through the DPU, so that the power consumption of the terminal device for blurring processing of the image can be reduced. BRIEF DESCRIPTION OF DRAWINGS

[0011] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can also be obtained by those skilled in the art without any creative effort on the basis of these drawings.

[0012] Figure 1 A blurring interface display schematic diagram of a notification center is provided for an embodiment of the present application;

[0013] Figure 2 A display effect schematic diagram of a screen after blurring processing is provided for an embodiment of the present application;

[0014] Figure 3 A system architecture schematic diagram of a terminal device is provided for an embodiment of the present application;

[0015] Figure 4 An implementation flowchart of the image blurring method provided by an embodiment of the present application is shown in FIG. 3;

[0016] Figure 5 An implementation flowchart of the image blurring method provided by another embodiment of the present application is shown in FIG. 4;

[0017] Figure 6 An implementation flowchart of the image blurring method provided by yet another embodiment of the present application is shown in FIG. 5;

[0018] Figure 7 An exemplary flowchart of the image blurring method provided by an embodiment of the present application in combination with a GPU is shown in FIG. 6;

[0019] Figure 8 An implementation flowchart of the image blurring method provided by yet another embodiment of the present application is shown in FIG. 7;

[0020] Figure 9 A structure diagram of the display processor DPU provided by an embodiment of the present application is shown in FIG. 8;

[0021] Figure 10 Another structure diagram of the display processor DPU provided by an embodiment of the present application is shown in FIG. 9;

[0022] Figure 11 A flowchart of outputting the target layer after DPU blurring processing provided by an embodiment of the present application is shown in FIG. 10;

[0023] Figure 12 An implementation diagram of the image blurring method provided by an embodiment of the present application in an asynchronous write-back manner is shown in FIG. 11;

[0024] Figure 13 An exemplary diagram of layer superimposed display provided by an embodiment of the present application is shown in FIG. 12;

[0025] Figure 14 An implementation diagram of the image blurring method provided by an embodiment of the present application in a synchronous write-back manner is shown in FIG. 13;

[0026] Figure 15 An exemplary diagram of layer superimposed display provided by another embodiment of the present application is shown in FIG. 14;

[0027] Figure 16 A structure diagram of the image blurring device provided by an embodiment of the present application is shown in FIG. 15;

[0028] Figure 17 A structure diagram of the computer device provided by an embodiment of the present application is shown in FIG. 16. DETAILED DESCRIPTION

[0029] In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the following will further describe the specific technical solutions of the present application with reference to the drawings in the embodiments of the present application. The following embodiments are used to illustrate the present application, but are not used to limit the scope of the present application.

[0030] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used in the specification is for describing the embodiments of the present application only and is not intended to limit the present application.

[0031] In the following description, "some embodiments" are related to a subset of all possible embodiments, but it can be understood that "some embodiments" can be the same subset or different subsets of all possible embodiments, and can be combined with each other without conflict.

[0032] It should be noted that the terms "first", "second", "third" used in the embodiments of the present application are used to distinguish similar or different objects, and do not represent a specific order of the objects. It can be understood that "first", "second", "third" can be interchanged in a specific order or sequence as allowed, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.

[0033] With the development of terminal devices, the application of blur effects in UI and app design of smart phones and tablet terminal devices is becoming more and more widespread. For example, many places in the iOS system use blur effects, the most obvious of which are the control center and the notification center.

[0034] Exemplarily, please refer to Figure 1 The blur interface display schematic diagram of the notification center provided by an embodiment of the present application is shown in Figure 1 As shown in the figure, the interface of the notification center includes a plurality of notification messages, such as a notification showing "playing song XXX"; express notification: you have a new package arriving, please take it away in time; and take-out notification: your coupon is about to expire, come and use it, etc. The notification center does not add blur to the entire background, but adds blur to the area where each notification is located, as shown in Figure 1 The area where each notification is located is dark, which exemplarily represents the effect after blur in dark color. In this way, not only it looks more beautiful, but also the elements are more prominent.

[0035] Some public Application Programming Interfaces (APIs) for implementing window blur processing effects are also provided in Android. Window blur processing or cross-window blur processing is used to blur the screen behind a given window, and there are mainly two window blur processing methods, window background blur processing and blur processing of the background screen, which can be used to achieve different visual effects. For example, assuming that a background desktop is displayed in the screen of a terminal device, and a window is displayed in the middle of the desktop, a window with a blurred background can be created by using window background blur processing, and a frosted glass effect is displayed in the window. For another example, a background desktop is displayed in the screen of a terminal device, and a window is displayed in the middle of the desktop, and a depth-of-field effect can be created by blurring the entire background desktop behind the window, that is, by blurring the background screen behind the window.

[0036] Exemplarily, refer to Figure 2 A display effect diagram of blurring the background screen is provided for an embodiment of the present application, as shown in Figure 2 A background desktop including a plurality of application programs is displayed in the screen of a terminal device, and a window is displayed in the middle of the desktop, and the word "Hello, World" is displayed in the window. A depth-of-field effect can be created by blurring the entire background desktop behind the window, that is, by blurring the background screen behind the window.

[0037] In the related art, common blur application scenarios are divided into two types, static blur and dynamic blur, and a Gaussian blur is generally used for implementation. Static blur is to blur a background or an image according to a fixed blur radius, and then to display the background or the image. Dynamic blur is to dynamically update a blur radius of a background or an image within a target blur duration according to a required blur fade-in and fade-out animation effect.

[0038] However, the blur processing in the related art is implemented by a CPU and a GPU software scheme, and a large blur radius, a blur radius update frequency, and a blur duration are used to achieve a better blur effect. The implementation by the CPU and the GPU software scheme brings a large performance and power consumption load to the system, causing system lag, unsmoothness, and high power consumption.

[0039] Therefore, how to reduce the power consumption of a terminal device for image blur processing is a problem to be solved.

[0040] Therefore, an image blurring method is provided in the embodiments of the present application. The method is applied to a terminal device, and specifically includes the following steps. First, a target instruction is detected. The target instruction is used to perform blurring processing on a target layer of a target display image. The target display image includes the target layer and other layers. Then, in response to the target instruction, the target layer is blurred by a DPU. The image after blurring processing includes the target layer after blurring processing and the other layers.

[0041] It should be understood that the terminal device involved in the embodiments of the present application can be a mobile phone, a tablet computer, a notebook computer, a palm computer, a mobile internet device (MID), a wearable device, a virtual reality (VR) device, an augmented reality (AR) device, a smart screen, an artificial intelligence (AI) sound box, a headset, a terminal in industrial control, a terminal in self driving, a terminal in remote medical surgery, a terminal in a smart grid, a terminal in transportation safety, a terminal in a smart city, a terminal in a smart home, a personal digital assistant (PDA), and the like. The embodiments of the present application are not limited thereto.

[0042] Exemplarily, Figure 3 A system architecture diagram of a terminal device is provided for an embodiment of the present application. As shown in Figure 3 The terminal device includes a processor 310, a memory 320, a transceiver 330, a display unit 340, an input unit 350, a sensor 360, an audio circuit 370, a power module 380, and the like.

[0043] The processor 310 is the control center of the terminal device, connects each part of the whole terminal device by using various interfaces and lines, executes various functions of the terminal device and processes data by running or executing software programs and / or modules stored in the memory 320 and calling data stored in the memory 320, thereby performing overall monitoring on the terminal device. Optionally, the processor 310 can include one or more processing units; optionally, the processor 310 can integrate an application processor, which mainly processes operation devices, user interfaces, and application programs, and of course, can also include other processors, which are not listed here.

[0044] The memory 320 can be used to store software programs and modules, and the processor 310 executes various functions of the terminal device and processes data by running the software programs and modules stored in the memory 320. The memory 320 mainly includes a storage program area and a storage data area, wherein the storage program area can store operation devices, at least one application program required by a function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area can store data created according to the use of the terminal device (such as audio data, a phone book, etc.), and the like. In addition, the memory 320 can include a high-speed random access memory, and can also include a nonvolatile memory, for example, at least one magnetic disk storage device, a flash memory device, or other volatile solid-state memory device.

[0045] The transceiver 330 can provide a wireless communication solution applied on the terminal device, including a wireless local area network (WLAN) (for example, a wireless fidelity (Wi-Fi) network), Bluetooth (BT), a global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared technology (IR), and the like. The transceiver 330 can be one or more devices integrating at least one communication processing module, for example, an antenna and a baseband processor integrated transceiver 330, or an antenna and a modem processor integrated transceiver 330, and the like, which are not limited here.

[0046] The display unit 340 can be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), etc., without being limited to this.

[0047] The input unit 350 can be used to receive inputted digital or character information, and to generate key signal input related to user settings of the terminal device and function control. Specifically, the input unit 350 can collect operations by or near a user and drive a corresponding connection device according to a pre-set program. In addition, the input unit 350 can include a touch panel, which can be implemented in various types such as a resistive type, a capacitive type, an infrared type, and a surface acoustic wave type. In addition to the touch panel, the input unit 350 can include other input devices. Specifically, the other input devices can include one or more of a function key (such as a volume control button, a switch button, etc.), a trackball, a jog wheel, etc.

[0048] The terminal device can further include at least one sensor 360 such as a gyro sensor, a motion sensor, and other sensors. The motion sensor can include an acceleration sensor for detecting the magnitude of acceleration in each direction, and can detect the magnitude and direction of gravity when at rest, and can be used to identify the posture of the terminal device for applications such as landscape / portrait screen switching, related games, magnetometer posture calibration, etc. The terminal device can further include a manometer, a barometer, a hygrometer, a thermometer, an infrared sensor, a fingerprint sensor, and other sensors, which will not be described here.

[0049] The audio circuit 370 can include a speaker and a microphone, and can provide an audio interface between a user and the terminal device. The audio circuit 370 can convert received audio data into an electrical signal and transmit it to the speaker, which converts the electrical signal into an audible signal and outputs it. On the other hand, the microphone collects sound signals and converts them into electrical signals, which are received by the audio circuit 370 and converted into audio data. The audio data is then processed by the processor 310 and output to another terminal device via the video circuit, or output to the memory 320 for further processing.

[0050] The terminal device further includes a power supply module 380 for supplying power to each component. Optionally, the power supply module 380 can be logically connected to the processor 310 through a power management device, so as to manage charging, discharging, and power consumption management through the power management device.

[0051] Although not shown, the terminal device can also include a camera. Optionally, the camera can be front-facing or rear-facing on the terminal device, and the embodiments of the present application do not limit this.

[0052] It can be understood that the structure illustrated in the embodiments of the present application does not constitute a specific limitation on the terminal device. In other embodiments of the present application, the terminal device can include more or fewer components than illustrated, or combine certain components, or split certain components, or different component arrangements. The illustrated components can be implemented in hardware, software, or a combination of software and hardware.

[0053] In order to make the purpose, technical solutions of the present application more clear and intuitive, the image blurring method, device, equipment and storage medium provided by the embodiments of the present application will be described in detail below in combination with the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and do not limit the present application.

[0054] Figure 4 For the implementation flowchart of the image blurring method provided by an embodiment of the present application, please refer to Figure 4 The method comprises:

[0055] S410: detecting a target instruction, the target instruction being used for blurring processing on a target layer of a target display image, the target display image comprising the target layer and other layers.

[0056] Optionally, the execution subject of the method can be the terminal device shown in the above Figure 3 The terminal device comprises a DPU and a display screen.

[0057] In some embodiments, the DPU generally refers to a type of hardware specially used for accelerating data-intensive tasks, focusing on optimizing data flow processing, data parallelism and accelerating various data processing operations; the goal is to release the computing burden of CPU and GPU through efficient data transmission, storage and network processing, and optimize the utilization of computing resources. The DPU has a specific hardware structure and can have multiple output ends, which can be connected to the display screen to realize display output image.

[0058] In some embodiments, the display screen can be a screen for displaying content, such as the screen of a mobile phone, the display of a computer, etc., which is not specifically limited here.

[0059] In some embodiments, the target instruction can include the identification of the target layer to be blurred, the blurring degree, the blurring manner and the blurring duration, etc., and the present application does not limit this. The target layer can be a part of an image or a specific part of multiple layers, and the present application does not limit this.

[0060] Optionally, the target instruction can be a pop-up window request, for example, a request to display a pop-up window interface on a target display image layer of the terminal device. The target display image layer can include multiple layers or only one layer, which is not limited in the present application.

[0061] Optionally, the blurring method for the target display image layer can be Gaussian blurring, or Gaussian blurring combined with up-sampling and down-sampling, or mean blurring, radial blurring, square blurring, median blurring, etc., which is not limited in the present application.

[0062] It should be noted that the target display image can be an image displayed in the display interface of the terminal device, for example, a desktop of the terminal device or an interface of any application program in the terminal device, which is not limited herein. The target display image includes multiple layers, i.e., the target display image layer and other display image layers.

[0063] S420: In response to the target instruction, the DPU blurs the target display image layer, and outputs the blurred image through the display screen. The blurred image includes the blurred target display image layer and other display image layers.

[0064] In some embodiments, the terminal device receives the target instruction, analyzes the target instruction, determines the target display image layer to be blurred and the blurring degree, further extracts the target display image layer, and keeps other display image layers unaffected.

[0065] In a possible implementation, the DPU includes an image blurring module, which can be used to blur the target display image layer. That is, in the DPU, the blurring module executes a corresponding blurring algorithm according to the blurring degree requirement of the target display image layer. For example, Gaussian blurring, mean blurring, median blurring or other appropriate algorithms, etc. The Gaussian blurring is a convolution process of the target display image layer through a Gaussian kernel. The mean blurring calculates the average value of the pixels in the neighborhood and updates each pixel value in the target display image layer. The median blurring processes according to the median of the neighborhood pixels. Since the DPU focuses on data flow and parallel processing, it can greatly improve the efficiency of blurring and reduce the delay.

[0066] Further, after obtaining the blurred target display image layer, the blurred target display image layer is superimposed with other display image layers to generate a final blurred image. Optionally, when superimposing, the transition effect between the target display image layer and other display image layers needs to be natural and no obvious boundary is generated. If the target display image layer has transparent or semi-transparent regions, the transparency of the layer needs to be considered during synthesis to ensure the visual effect of the final image.

[0067] In some embodiments, the blurred image is transmitted to the display screen through the display interface, and some color space conversion, scaling, or resolution adjustment may be needed during the image transmission process. Finally, the blurred image is displayed in real time through the display screen to ensure that the user can see the processed effect.

[0068] Optionally, the user can also adjust the parameters of the blur effect, such as blur intensity or layer selection, through feedback to further optimize the image processing process.

[0069] For example, during the use of the terminal device, the user clicks on a folder containing multiple application programs. The folder displays a preset number of application programs in the form of a pop-up window. Accordingly, the terminal device performs blur processing on the background layer other than the pop-up window, and the target layer is the background layer. Finally, the blurred background layer and the pop-up window are output through the display screen.

[0070] In this embodiment, first, the target instruction is detected, and the target instruction is used to perform blur processing on a target layer of a target display image. The target display image includes the target layer and other layers. Then, in response to the target instruction, the target layer is blurred by the DPU, and the blurred image including the blurred target layer and other layers is output through the display screen. In this image blurring method, the target layer is blurred by the DPU, which can significantly improve the efficiency of image processing. The DPU can perform large-scale parallel computing through hardware acceleration, especially when processing complex images or multiple layers, which can reduce latency and speed up the blur processing process. The DPU can perform specialized blur processing on the target layer without affecting the display effect of other layers, ensuring that the visual effects of each part of the final image are natural and coordinated. The processed image is output through the display screen, which can be viewed in real time to adjust the blur intensity, layer selection, and other parameters. The DPU accelerates the image processing process, which can reduce the pressure on the CPU and memory in high-load image processing tasks, reduce the power consumption of the terminal device for image blur processing, and avoid system delays or stalls due to heavy image processing tasks.

[0071] Based on the above embodiments, Figure 5 For another embodiment of the present application, the implementation flowchart of the image blurring method is shown in Figure 5 The method comprises the following steps:

[0072] S510: detecting a target instruction, the target instruction being used to perform blur processing on a target layer of a target display image, the target display image including the target layer and other layers.

[0073] Optionally, the execution subject of the method can be the above Figure 3The terminal device shown in the figure comprises a DPU and a display screen.

[0074] In some embodiments, the DPU has a specific hardware structure and can have multiple output ends which can be connected to the display screen to realize display output images.

[0075] In some embodiments, the display screen can be a screen for displaying content, such as a screen of a mobile phone, a display of a computer, etc., which is not specifically limited herein.

[0076] In some embodiments, the target instruction can comprise an identification of a target layer requiring blur processing, a blur degree, a blur manner, a blur duration, etc., which are not limited by the present application. The target layer can be a part of an image or a specific part of multiple layers, which are not limited by the present application.

[0077] Optionally, the target instruction can be a pop-up window request, such as a request for displaying a pop-up window interface on a target layer of a target display image of the terminal device. The target layer can comprise multiple layers or only one layer, which are not limited by the present application.

[0078] Optionally, the manner of blur processing on the target layer can be Gaussian blur, or can be Gaussian blur combined with up-sampling and down-sampling, or can be mean blur, radial blur, square blur, median blur, etc., which are not limited by the present application.

[0079] It should be noted that the target display image can be an image displayed in the display interface of the terminal device, such as a desktop of the terminal device or an interface of any application program in the terminal device, which is not specifically limited herein. The target display image comprises multiple layers, i.e., a target layer and other layers.

[0080] S520: In response to the target instruction, the target layer is written back through the DPU, and the target layer is blurred during the writing back process to obtain a DPU-blurred target layer.

[0081] It should be understood that writing back refers to a process of writing the target layer back to the system memory or other storage space of the terminal device, which is mainly for the storage of the data.

[0082] For example, the DPU-blurred target layer can be stored in the system memory or other storage space of the terminal device after the target layer is blurred.

[0083] In some embodiments, the terminal device receives the target instruction and analyzes the target instruction to determine the target layer requiring blur processing and the blur degree, etc. Further, the target layer is extracted and other layers are kept unaffected.

[0084] Optionally, the DPU can write back the target layer in a synchronous write-back manner or an asynchronous write-back manner, and the present application does not limit the same. The asynchronous write-back is independent of the DPU internal display link, and only the target layer that needs to be written back is selected. The asynchronous write-back usually refers to handing over the write-back operation to a separate write-back module or thread for processing after the DPU completes the processing of a certain layer, and the DPU can immediately start the calculation of the next layer. The advantage of this way is that it can improve the utilization rate of the computing resources of the DPU, and the disadvantage is that the implementation complexity is high, and the consistency and synchronization of data need to be handled. The synchronous write-back usually refers to writing the calculation result back to the external memory immediately after the DPU completes the calculation of a certain layer, and then continuing to calculate the next layer. The advantage of this way is that the implementation is simple, and the disadvantage is that it will increase the waiting time of the DPU, because the write-back operation can be time-consuming, which reduces the utilization rate of the computing resources of the DPU.

[0085] In some embodiments, one implementation of the blurring processing on the target layer during the write-back process is that the target layer is blurred according to a target blurring algorithm during the write-back process. The target blurring algorithm can be Gaussian blurring, mean blurring, median blurring, etc. Gaussian blurring, also known as Gaussian smoothing, is used to reduce image details and noise, making the image look smoother and softer. It achieves the blurring effect by weighting and averaging each pixel point in the image with its neighborhood pixels according to the Gaussian function. Mean blurring is a simple image processing technique, which is often used to smooth images, reduce noise, and make images more soft. It blurs the image by calculating the average value of each pixel and its neighborhood pixels. Median blurring is an image smoothing technique that is often used to remove "salt and pepper noise" and some other types of noise in images while preserving edge features. Median blurring replaces the value of the target pixel with the median value of its neighborhood.

[0086] In one possible implementation, the target instruction includes a maximum blurring radius, and one implementation of the blurring processing on the target layer according to the target blurring algorithm is that the target layer is blurred according to the target blurring radius and the target blurring algorithm to obtain the blurred target layer.

[0087] In another possible implementation, in addition to the maximum blurring radius, the target instruction also includes a blurring radius update frequency, which is used to indicate the total number of frames that reach the maximum blurring radius, for example, the blurring radius of an image changes from 0 to 300, and it needs to go through 100 frames. Another implementation of the blurring processing on the target layer according to the target blurring algorithm is that the target layer is blurred based on the blurring radius update frequency, the maximum blurring radius, and the target blurring algorithm to obtain the blurred target layer.

[0088] As an example, assuming that the maximum blur radius is 300 and the blur radius update frequency is 100 frames, it needs to go through a 100-frame blur transformation process to increase the target layer from a blur radius of 0 to 300, which is equivalent to increasing the blur radius by 3 per frame transformation, and then combining the target blur algorithm, continuously performing blur processing on the updated target layer, and finally obtaining the target layer after blur processing after 100 frames of change.

[0089] Another implementation manner of performing blur processing on the target layer in the write-back process is: downsampling the target layer to obtain a downsampled target layer; then performing calculation processing on the downsampled target layer according to the target blur algorithm to obtain a calculation-processed target layer; and finally upsampling the calculation-processed target layer; wherein the sampling rate of upsampling and downsampling is the same.

[0090] As an example, downsampling the target layer can use a multiple BiLinear Interpolation algorithm to realize image scaling, such as 4 times 1 / 2 to realize scaling with a sampling rate of 1 / 16, reducing the required calculation and line buffer resources. Further, the target blur algorithm is used to perform calculation processing on the downsampled target layer, and since the size of the downsampled image is smaller, the system load and power consumption can be reduced when performing blur processing. Alternatively, the target blur algorithm can be Gaussian blur, mean blur, and / or median blur, etc., which is not limited in the present application. Further, the same sampling rate is used to upsample the calculation-processed target layer, and finally the target layer after blur processing is obtained.

[0091] In a possible implementation manner, the target instruction includes a maximum blur radius, and one implementation manner of performing calculation processing on the downsampled target layer according to the target blur algorithm to obtain a calculation-processed target layer is: determining a target blur radius of the target blur algorithm according to the maximum blur radius and the sampling rate; and then performing calculation processing on the downsampled target layer according to the target blur radius and the target blur algorithm to obtain a calculation-processed target layer.

[0092] That is, the target blur radius of the target blur algorithm can be reduced according to the sampling rate of downsampling, for example, when 16 times downsampling, a Gaussian radius of 7 can approximately simulate the blur effect of an original size Gaussian kernel size of 140. The target blur radius and the target blur algorithm are used to perform calculation processing on the downsampled target layer, and since the target blur radius is relatively small compared to the maximum blur radius, and the image size is also reduced, the system load and power consumption are low when performing blur processing.

[0093] Optionally, the maximum blur radius is a maximum blur degree requirement issued by the terminal device, and in a case where the hardware capability of the DPU cannot meet the maximum blur degree requirement, the target layer can also be blurred based on the maximum hardware capability of the DPU, which is not limited in the present application.

[0094] In another possible implementation, in addition to the maximum blur radius, the target instruction also includes a blur radius update frequency, which is used to indicate a total number of frames reaching the maximum blur radius, for example, the blur radius of an image is changed from 0 to 300, and 100 frames are needed. Then, according to the maximum blur radius and the sampling rate, one implementation of determining the target blur radius of the target blur algorithm is as follows:

[0095] The target blur radius is determined based on the blur radius update frequency, the maximum blur radius and the sampling rate.

[0096] As an example, assuming that the maximum blur radius is 300, the blur radius update frequency is 100 frames, and the sampling rate is 1 / 16, the target layer is increased from the blur radius of 0 to 300, and the blur transformation process of 100 frames is needed, which is equivalent to increasing the blur radius by 3 per frame. Then, combined with the sampling rate of 1 / 16, the target blur radius corresponding to each frame is determined.

[0097] S530: After superimposing the target layer blurred by the DPU with other layers, the blurred image is output through the display screen.

[0098] In some embodiments, after obtaining the target layer blurred, the target layer blurred is superimposed with other layers to generate a final blurred image. Optionally, when superimposing, it is necessary to ensure that the transition effect between the target layer and other layers is natural and no obvious boundary is generated. If the target layer has a transparent or semi-transparent region, the transparency of the layer is considered when synthesizing to ensure the visual effect of the final image.

[0099] In some embodiments, the blurred image is transmitted to the display screen through the display interface, and in the image transmission process, some color space conversion, scaling, or resolution adjustment operations may be needed; finally, the blurred image is displayed in real time through the display screen to ensure that the user can see the processed effect.

[0100] Optionally, the user can also adjust the parameters of the blur effect, such as the blur strength or the layer selection, through feedback, to further optimize the image processing process.

[0101] In this embodiment, first, a target instruction is detected, the target instruction is used for blurring a target layer of a target display image, the target display image includes the target layer and other layers, then in response to the target instruction, the target layer is written back through the DPU, the target layer is blurred in the writing back process, and a DPU blurred target layer is obtained, finally, the DPU blurred target layer and the other layers are superimposed, and the blurred image is output through the display screen. By blurring the target layer through the DPU, the efficiency of image processing can be significantly improved, the DPU can realize large-scale parallel computing through hardware acceleration, especially when processing complex images or multiple layers, the delay can be reduced and the blurring process can be accelerated; the target layer is blurred in the writing back process, which can ensure that the blurring effect only acts on the target layer and does not affect other layers, so that the processing effect of each layer can be accurately controlled, and the image quality can be ensured; the processed image is output through the display screen, the change of the blurring effect can be viewed in real time, so that the user can adjust the blurring intensity, layer selection and other parameters; the DPU accelerates the image processing process, which can reduce the pressure of CPU and memory in high-load image processing tasks, reduce the power consumption of the terminal device for blurring the image, and avoid delay or lag of the system due to heavy image processing tasks.

[0102] On the basis of the above-mentioned embodiments, Figure 6 For another embodiment of the present application, the implementation flowchart of the image blurring method is shown in Figure 6 The method comprises the following steps:

[0103] S610: detecting a target instruction, the target instruction is used for blurring a target layer of a target display image, the target display image includes the target layer and other layers.

[0104] Optionally, the execution subject of the method can be the terminal device shown in the above-mentioned Figure 3 The terminal device includes a DPU and a display screen.

[0105] In some embodiments, the DPU has a specific hardware structure, and can have multiple output ends which can be connected with the display screen to realize display output of the image.

[0106] In some embodiments, the display screen can be a screen for displaying content, for example, a screen of a mobile phone, a display of a computer, etc., which is not limited here.

[0107] In some embodiments, the target instruction can include an identifier of the target layer to be blurred, a blurring degree, a blurring manner, a blurring time length, etc., which is not limited by the present application. The target layer can be a part of an image or a specific part of multiple layers, which is also not limited by the present application.

[0108] Optionally, the target instruction can be a pop-up window request, for example, a request to display a pop-up window interface on a target layer of the target display image of the terminal device. The target layer can include multiple layers or only one layer, which is not limited in the present application.

[0109] Optionally, the blurring method for the target layer can be Gaussian blurring, or Gaussian blurring combined with up-sampling and down-sampling, or mean blurring, radial blurring, square blurring, median blurring, etc., which is not limited in the present application.

[0110] It should be noted that the target display image can be an image displayed in the display interface of the terminal device, for example, the desktop of the terminal device or the interface of any application program in the terminal device, etc., which is not limited herein. The target display image includes multiple layers, i.e., the target layer and other layers.

[0111] S620: In response to the target instruction, the target layer is written back through the DPU, and the target layer is blurred during the writing back process to obtain the DPU blurred target layer.

[0112] It should be understood that writing back refers to the process of writing the target layer back to the system memory or other storage space of the terminal device, which is mainly to realize the storage of the data.

[0113] For example, the DPU blurred target layer can be stored in the system memory or other storage space of the terminal device after blurring the target layer.

[0114] In some embodiments, the terminal device receives the target instruction and analyzes the target instruction to determine the target layer that needs to be blurred and the blurring degree, etc. Further, the target layer is extracted and the other layers are kept unaffected.

[0115] Optionally, the DPU can write back the target layer in a synchronous write-back manner or an asynchronous write-back manner, and the present application does not limit the same. The asynchronous write-back is independent of the DPU internal display link, and only the target layer that needs to be written back is selected. The asynchronous write-back usually refers to that after the DPU completes the processing of a certain layer, the write-back operation is handed over to a separate write-back module or thread for processing, and the DPU can immediately start the calculation of the next layer. The advantage of this way is that it can improve the utilization rate of the computing resources of the DPU, and the disadvantage is that the implementation complexity is high, and the consistency and synchronization of data need to be handled. The synchronous write-back usually refers to that after the DPU completes the calculation of a certain layer, the calculation result is immediately written back to the external memory, and then the calculation of the next layer is continued. The advantage of this way is that the implementation is simple, and the disadvantage is that the waiting time of the DPU is increased, because the write-back operation can be time-consuming, which reduces the utilization rate of the computing resources of the DPU.

[0116] In some embodiments, one implementation of the blurring processing of the target layer in the write-back process is that the target layer is blurred according to a target blurring algorithm in the write-back process. The target blurring algorithm can be Gaussian blurring, mean blurring, median blurring, etc. Gaussian blurring, also known as Gaussian smoothing, is used to reduce image details and noise, making the image look smoother and softer. It achieves the blurring effect by weighting and averaging each pixel point in the image and its neighborhood according to the Gaussian function. Mean blurring is a simple image processing technique, commonly used for smoothing images, reducing noise, and making images more soft. It blurs the image by calculating the average value of each pixel and its neighborhood. Median blurring is an image smoothing technique commonly used to remove "salt and pepper noise" and some other types of noise while preserving edge features. Median blurring replaces the value of the target pixel by taking the median value of its neighborhood.

[0117] Another implementation of the blurring processing of the target layer in the write-back process is that the target layer is down-sampled to obtain a down-sampled target layer; then the down-sampled target layer is calculated and processed according to a target blurring algorithm to obtain a calculated and processed target layer; finally, the calculated and processed target layer is up-sampled to obtain a DPU-blurred target layer; wherein the up-sampling and down-sampling have the same sampling rate.

[0118] S630: blurring the DPU-blurred target layer by the GPU to obtain a GPU-blurred target layer.

[0119] In some embodiments, after the target layer is blurred by the DPU to obtain a DPU-blurred target layer, the DPU-blurred target layer can be further blurred by the GPU to obtain a GPU-blurred target layer.

[0120] In a possible implementation, the target instruction includes a maximum blur radius. When the maximum blur radius is greater than a threshold value, the DPU-blurred target layer is blurred by the GPU to obtain a GPU-blurred target layer, where the threshold value is determined according to a maximum value of the blur radius supported by the DPU.

[0121] That is, the DPU hardware has a maximum blur capability. If the maximum value of the blur radius supported by the DPU cannot meet the maximum blur radius, the DPU-blurred target layer can be further blurred by the GPU to meet the requirement of the maximum blur radius. The blur processing method of the DPU combined with the GPU can significantly reduce the system power consumption and load compared with the blur processing method using only the GPU.

[0122] In another possible implementation, the target instruction includes a maximum blur radius and a blur radius update frequency. The blur radius update frequency is used to indicate a total number of frames reaching the maximum blur radius. When the maximum blur radius is greater than a threshold value, the DPU can blur the target layer based on the blur radius update frequency, the maximum value of the blur radius supported by the DPU, and a target blur algorithm to obtain a DPU-blurred target layer. Further, the GPU blurs the DPU-blurred target layer based on the maximum value of the blur radius supported by the DPU and the maximum blur radius to obtain a GPU-blurred target layer.

[0123] In this way, because the DPU cannot perform continuous change of the blur radius due to its characteristics, GPU blur can be added between two adjacent blur effects to make the transition between two adjacent blur images more natural, so as to achieve dynamic dimming of the blur effect.

[0124] For example, it is assumed that the blur radius of the current frame is 20 and the blur radius of the next frame is 30 during the blur processing of the DPU. Because the interval between the blur radius 20 and the blur radius 30 is large, GPU blur can be added between the blur radius 20 and the blur radius 30 to make the change of the blur effect more smooth.

[0125] S640: After the GPU-blurred target layer is superimposed with other layers, the blurred image is output through the display screen.

[0126] In some embodiments, after the target layer is processed by the GPU blur processing, the target layer processed by the GPU blur processing is superimposed with other layers to generate a final image processed by the blur. Optionally, when superimposed, the transition effect between the target layer and other layers needs to be ensured to be natural, and no obvious boundary is generated. If the target layer has a transparent or semi-transparent region, the transparency of the layer needs to be considered during the synthesis to ensure the visual effect of the final image.

[0127] In some embodiments, the image processed by the blur is transmitted to the display screen through the display interface, and during the image transmission process, some color space conversion, scaling, or resolution adjustment operations may be required; finally, the image processed by the blur is displayed in real time through the display screen to ensure that the user can see the processed effect.

[0128] Optionally, the user can also adjust the parameters of the blur effect, such as blur intensity or layer selection, to further optimize the image processing process.

[0129] In this embodiment, first, a target instruction is detected, the target instruction is used to perform blur processing on a target layer of a target display image, the target display image includes the target layer and other layers, then in response to the target instruction, the target layer is written back through the DPU, and the target layer is processed by the blur during the writing back process to obtain a target layer processed by the DPU blur, further, the target layer processed by the DPU blur is processed by the GPU to obtain a target layer processed by the GPU blur, finally, the target layer processed by the GPU blur is superimposed with other layers, and the image processed by the blur is output through the display screen. In this image blur method, the target layer is processed by the blur during the writing back process, which can ensure that the blur effect only acts on the target layer and does not affect other layers, so that the processing effect of each layer can be accurately controlled, and the image quality can be guaranteed; the processed image is output through the display screen, the change of the blur effect can be viewed in real time, so that the user can adjust the parameters such as blur intensity and layer selection; the target layer is processed by the DPU combined with the GPU, which can reduce the power consumption of the terminal device for image blur processing, avoid delay or lag of the system due to heavy image processing tasks, and improve the efficiency of the blur processing.

[0130] On the basis of the above embodiments, the blur processing algorithm is combined with the Gaussian blur algorithm for upsampling and downsampling, the target instruction includes a maximum Gaussian blur radius, a blur radius update frequency, and a blur duration, and the maximum blur radius is greater than the maximum value of the blur radius supported by the DPU. For example, please refer to Figure 7 The DPU combined with the GPU for image blur processing provided by this embodiment is an example of a flowchart of the method, which includes:

[0131] S710: The system issues a target instruction, and the target instruction includes a maximum Gaussian blur radius, a blur radius update frequency, and a blur duration.

[0132] The blur duration is a display duration of the image after the blur processing.

[0133] S720: In response to the target instruction, the DPU performs Gaussian blur processing on a target layer of the target display image according to a sampling ratio of up-sampling and down-sampling, the blur radius update frequency, and a maximum value of the blur radius supported by the DPU, to obtain a target layer of the image after DPU blur processing.

[0134] S730: The GPU performs Gaussian blur processing on the target layer of the image after DPU blur processing according to the maximum Gaussian blur radius and the maximum value of the blur radius supported by the DPU, to obtain a target layer of the image after GPU blur processing.

[0135] S740: The DPU drive control module writes back the target layer of the image after DPU blur processing.

[0136] S750: After superimposing the target layer of the image after GPU blur processing and other layers, the display screen outputs the image after blur processing within the blur duration.

[0137] It should be noted that the specific implementation of the steps in this embodiment can refer to the implementation process of the above-mentioned Figure 4 to Figure 6 embodiments, and the repeated parts will not be described here.

[0138] Based on the above-mentioned embodiments, Figure 8 the implementation flowchart of the image blur method provided in another embodiment of the present application is shown in Figure 8 , and the method comprises the following steps.

[0139] S810: A target instruction is detected, and the target instruction is used to perform blur processing on a target layer of a target display image. The target display image includes the target layer and other layers.

[0140] Optionally, the execution subject of the method can be the terminal device shown in the above-mentioned Figure 3 The DPU includes at least two output ends, a target output end of the at least two output ends is connected with the display screen, and other output ends of the at least two output ends except the target output end are connected with the memory.

[0141] Figure 9 The structure diagram of the display processor DPU provided in the embodiment of the present application is shown in Figure 9The DPU 910 includes at least two outputs, a target output O1 of the at least two outputs is connected to the display 920, and an output O2 other than the target output of the at least two outputs is connected to the memory 930. The DPU 910 can perform layer superimposition processing.

[0142] Optionally, a plurality of layers that need to be superimposed can be input into the display DPU 910, the DPU 910 performs superimposition processing on the layers, and the resulting result can be output to the display 920 and the memory 930.

[0143] It should be noted that the DPU 910 can have multiple outputs. If there are two outputs, the DPU 910 can include one target output O1 and one other output O2. If there are multiple outputs, the DPU 910 can include one target output O1 and multiple other outputs O2. Figure 9 In the above embodiment, one other output is taken as an example. In actual implementation, the DPU 910 can also include multiple other outputs.

[0144] The display image can be output through the target output O1 and transmitted to the display. The write-back image can also be output through the other output O2 and stored in the memory 930.

[0145] In some embodiments, the display 920 can be a screen for displaying content, such as a screen of a mobile phone, a display of a computer, etc., which is not limited here.

[0146] The memory 930 can be a storage space for storing data, which can be a system memory of a terminal device, such as a storage space of a mobile phone, a storage space of a computer, etc. Alternatively, the memory 930 can be a storage space of another device connected externally, such as a U disk, a mobile hard disk, etc., which is not limited here and can be set according to actual needs.

[0147] Based on the above hardware structure of the DPU 910, the relationship between each device in the image blurring method provided in the embodiments of the present application can be obtained.

[0148] It should be noted that the DPU and the display can be a display link, and the image write-back process of the specified layer can be implemented based on the display link.

[0149] In some embodiments, the target instruction can include an identifier of a target layer that needs to be blurred, a blurring degree, a blurring manner, and a blurring duration, etc., which are not limited by the present application. The target layer can be a part of an image or a specific part of multiple layers, which are not limited by the present application.

[0150] Optionally, the target instruction can be a pop-up request, such as requesting to display a pop-up interface on the target layer of the target display image on the terminal device. The target layer may include multiple layers or only one layer, and this application does not limit this.

[0151] Optionally, the target layer can be blurred by Gaussian blur, or by combining upsampling and downsampling for Gaussian blur, or by using mean blur, radial blur, square blur and median blur, etc. This application does not limit this.

[0152] It should be noted that the target display image can be an image displayed on the terminal device's display interface, such as the terminal device's desktop or the interface of any application on the terminal device, without specific limitations. The target display image includes multiple layers, namely the target layer and other layers.

[0153] S820: In response to the target instruction, it acquires the target layer through the DPU, blurs the target layer, and outputs the blurred target layer to the memory through other output terminals.

[0154] It should be noted that the blurring of the target layer occurs during the DPU's write-back process of the target layer, and the target layer consists of multiple layers of the target number.

[0155] In some embodiments, multiple layers can be overlaid by a DPU in a preset order, and when the number of overlaid layers reaches a target number, the multiple overlaid layers are blurred, and the target layer blurred by the DPU is output to the memory through other output terminals.

[0156] Optionally, the preset order can be from the bottom layer to the top layer. For example, if the order of the layers from the bottom layer to the top layer is layer 1 to layer 6, then the preset order can be the order of layer 1, layer 2, layer 3, layer 4, layer 5, and layer 6.

[0157] It should be noted that the target quantity can be determined before the layer overlay process; for example, it can be a fixed quantity.

[0158] Alternatively, it could be a variable quantity.

[0159] If the quantity is fixed, it can be the fixed quantity set at the factory when the DPU leaves the factory; if the quantity is variable, it can be determined according to the current usage scenario of the terminal device, or it can be determined based on the user's settings, without specific restrictions.

[0160] In this embodiment of the application, the explanation can be based on the example that the target quantity is a variable quantity.

[0161] In the process of layer superimposition, if the target number of layers is superimposed, the target layer is obtained. Further, in the process of writing back, the target layer is blurred, and the DPU blurred target layer is output to the memory through other output terminals.

[0162] In order to more clearly explain the display processor provided in the embodiments of the present application, another possible structure of the display processor will be explained below.

[0163] Figure 10 For another structure diagram of the display processor DPU provided in the embodiments of the present application, please refer to Figure 10 The DPU 910 further comprises a counting module 911, which is used to count the number of layers superimposed by the DPU.

[0164] It should be noted that the counting module 911 can be a counter, for example. After initialization, the value of the counter can be set to 1. After superimposing each layer, the count is incremented by 1. That is to say, after superimposing layer 1 and layer 2, the count is incremented by 1, and the corresponding counter value is 2. The value of the counter can represent the total number of layers superimposed by the DPU.

[0165] In the process of layer superimposition, the number of times of layer superimposition can be determined according to the counting result of the counter, so that whether the target number is reached can be determined, and finally the target layer is obtained.

[0166] The following explains one possible implementation process of obtaining a write-back image by a terminal device provided in the embodiments of the present application based on the structure of the display processor described above.

[0167] Figure 11 For a flowchart of outputting the DPU blurred target layer provided in the embodiments of the present application, please refer to Figure 11 In the case where the number of superimposed layers reaches the target number, that is, the target layer is obtained, the target layer is blurred, and the DPU blurred target layer is output to the memory through other output terminals.

[0168] S1110: Obtain the counting result of the counting module.

[0169] Optionally, the DPU can obtain the counting result in the counting module, which can be obtained once every certain period of time, or the counting result can be obtained once every time it is refreshed, or the counting result of the counting module can be obtained in real time, which is not limited here.

[0170] The counting result can be a specific number, which is used to represent the number of superimposed layers. For example, if the counting result is 2, it means that layer 1 and layer 2 have been superimposed; if the counting result is 4, it means that layer 1, layer 2, layer 3 and layer 4 have been superimposed.

[0171] In S1120, when the counting result is equal to the target number, the target layer is obtained, the target layer is blurred, and the DPU blurred target layer is output to the memory through the other output end.

[0172] It should be noted that after obtaining the counting result, it can be determined whether the counting result is equal to the target number. If not, the counting result of the counting module can be continuously obtained. If it is equal to the target number, it can be determined that the current target layer condition is met, and then the target layer is blurred and the DPU blurred target layer is output to the memory through the other output end.

[0173] In the image processing method provided by the embodiment of the application, the counting result of the counting module can be obtained; in the case where the counting result is equal to the target number, the target layer is blurred, and the DPU blurred target layer is output to the memory through the other output end. Wherein, the target layer is quickly and accurately determined based on whether the counting result reaches the target number, which can improve the accuracy of the output DPU blurred target layer.

[0174] It should be noted that the aforementioned target number can be a variable number. After the DPU is shipped, the corresponding target number in the DPU can be set. The following explains one of the feasible implementation manners for determining the target number provided in the embodiment of the application.

[0175] In one embodiment, before the DPU superimposes the plurality of layers in the preset order, the method further comprises: determining the target number according to the current running scene of the terminal device; or determining the target number according to the number of target layers in the plurality of layers included in the target display image, the target layer including a background layer.

[0176] It should be noted that the current running scene can be a program currently running on the terminal device. For example, if the terminal device is currently running a game application, the current running scene can be a game scene; if the terminal device is currently running a social application, the current running scene can be a chat scene. Correspondingly, for different applications, the corresponding current running scene can be different. Different running scenes can correspond to different target numbers. The mapping relationship can be set to determine the target number corresponding to different running scenes, so as to determine the target number.

[0177] In an embodiment, the current running scenario is determined according to a target application program corresponding to the current displayed image, and the target number is determined according to the current running scenario of the terminal device, including: determining the target number according to a mapping relationship between preset identifiers and the target number and a target identifier of the target application program.

[0178] It should be noted that the target application program can be an application program currently running on the terminal device, for example, a game application, a chat application, etc. Each application program can be configured with a corresponding identifier, and the identifier of the target application program is the target identifier.

[0179] The mapping relationship can record the relationship between the preset identifiers and the target number, and after the target identifier of the target application program is determined, the corresponding target number can be found through the mapping relationship, wherein the mapping relationship can be represented in the manner shown in Table 1 below:

[0180] Table 1

[0181] Preset identifier Target number Identifier A 2 Identifier B 3 Identifier C 2

[0182] The mapping relationship between the preset identifiers and the target number shown in Table 1 is that the target number corresponding to identifier A can be 2, the target number corresponding to identifier B can be 3, and the target number corresponding to identifier C can also be 2.

[0183] It should be noted that the target layer can be a specific type of layer, wherein the plurality of layers can be layers output by a graphics processor or a central processing unit, and these layers can be set with corresponding types, and the layer types corresponding to different layers can also be different, wherein the target layer can be a certain specific type of layer, for example, a background layer.

[0184] It should be noted that the background layer is only one example, and other types of layers can also be included in actual applications, for example, some types of layers are usually located at the top or near the top, such as layers corresponding to controls, layers corresponding to pop-ups, etc.; some types of layers are usually located at the bottom or near the bottom, including the above-mentioned background layer and solid color layer, etc., which are not limited here, and in actual implementation, in addition to the background layer, other layers that can be located at the bottom or near the bottom can also be used as target layers.

[0185] S830: After superimposing the target layer after DPU blur processing and other layers, output the image after blur processing through the display screen.

[0186] It should be noted that after outputting the target layer after DPU blur processing, layer superposition can be continued, for example, taking the target layer superimposed with layer 1 and layer 2 as an example, the target layer after blur processing can be output, and at the same time, layer 3 can be continued to be superimposed, and after all layers in the plurality of layers are superimposed, the image after blur processing can be obtained.

[0187] Optionally, if the total number of layers of the target display image is reached, the image after blur processing can be output to the display screen through the target output end.

[0188] Wherein, the target number is less than the total number of layers of the target display image. For example, the target number is 2 layers, and the total number of layers of the target display image is 6 layers.

[0189] In this embodiment, first, the target instruction is detected, the target instruction is used for blur processing on the target layer of the target display image, the target display image includes the target layer and other layers, then in response to the target instruction, the target layer is acquired through the DPU, and the target layer is blurred, and the target layer after DPU blur processing is output to the memory through the other output end; finally, after the target layer after DPU blur processing and the other layers are superimposed, the image after blur processing is output through the display screen. In this image blur method, the target layer is blurred through the DPU, which can significantly improve the efficiency of image processing. The DPU can realize large-scale parallel computing through hardware acceleration, especially when processing complex images or multiple layers, which can reduce the delay and speed up the blur processing process; the target layer after DPU blur processing can be output to the memory through the other output end, so that the user can adjust the blur strength, layer selection and other parameters in real time; the DPU accelerates the image processing process, which can reduce the pressure on CPU and memory in high-load image processing tasks, reduce the power consumption of the terminal device for image blur processing, and avoid delay or lag due to heavy image processing tasks.

[0190] On the basis of the above embodiment, it is assumed that the target layer is a desktop background image, the other layer is layer N, the write-back mode in the DPU is asynchronous write-back, the blur processing on the target layer in the write-back process adopts the up-sampling and Gaussian blur algorithm, and in the case that the maximum blur radius in the target instruction is greater than the maximum value of the blur radius supported by the DPU, please refer to Figure 12 is a schematic diagram of an image blur method implemented in an asynchronous write-back mode provided by an embodiment of the present application. As shown in Figure 12As shown, the target layer currently acquired by the DPU, namely the desktop background image 1210, is a clear image. The desktop background image 1210 can include multiple layers. Since the desktop background image 1210 of the current frame has not been blurred, the current frame image 1220 output to the display screen through the target output terminal is the image after the desktop background image 1210 is overlaid with layer N.

[0191] In another write-back link, the DPU performs layer overlay on the desktop background image 1210 before entering the write-back process. Here, layer overlay refers to the overlay of the desktop background image 1210 itself, so the desktop background image 1210 remains unchanged after overlay. During the write-back process, the desktop background image 1210 is first halved twice to achieve a sampling rate of 1 / 4 downsampling. Then, the downsampled image is Gaussian blurred. Further, the Gaussian blurred image is halved twice to achieve a sampling rate of 1 / 4 upsampling, resulting in the desktop background image 1230 after DPU blurring. Since the maximum blur radius is greater than the maximum value of the blur radius supported by the DPU, the DPU further sends the DPU-blurred desktop background image 1230 to the GPU for Gaussian blurring, resulting in the final GPU-blurred image 1240.

[0192] Further, please refer to Figure 13 This is an exemplary schematic diagram of layer overlay display provided in one embodiment of this application. Figure 12 Based on this, the GPU transmits the GPU-blurred image 1240 to the DPU. The DPU then overlays the GPU-blurred image 1240 with layer N to obtain the blurred image 1250, which is then output to the display screen through the target output terminal.

[0193] In another example, assuming the target layer is the desktop background image and the other layers are layer N, the write-back is implemented synchronously in the DPU. During the write-back process, the target layer is blurred using an algorithm combining upsampling, subsampling, and Gaussian blur. If the maximum blur radius in the target command exceeds the maximum blur radius supported by the DPU, please refer to [the relevant documentation / reference]. Figure 14 This is a schematic diagram illustrating an image blurring method implemented using synchronous write-back, according to an embodiment of this application. Figure 14 As shown, the target layer currently acquired by the DPU, namely the desktop background image 1410, is a clear image. The desktop background image 1410 can include multiple layers. Since the desktop background image 1410 of the current frame has not been blurred, the current frame image 1420 output to the display screen through the target output terminal is the image after the desktop background image 1410 is overlaid with layer N.

[0194] In another backwrite link, the DPU enters the backwrite process after layer superimposition of the desktop background image 1410, where the layer superimposition refers to layer superimposition of the desktop background image 1410 itself, so the desktop background image 1410 remains unchanged after superimposition. In the backwrite process, the desktop background image 1410 is first halved twice to achieve downsampling with a sampling rate of 1 / 4, then the downsampled image is subjected to Gaussian blur processing, and further, the Gaussian blur processed image is halved twice to achieve upsampling with a sampling rate of 1 / 4, to obtain the DPU blur processed desktop background image 1430. Since the maximum blur radius is greater than the maximum value of the blur radius supported by the DPU, the DPU further sends the DPU blur processed desktop background image 1430 to the GPU for Gaussian blur processing to obtain the final GPU blur processed image 1440.

[0195] Further, please refer to Figure 15 , an exemplary schematic diagram of layer superimposition display provided by another embodiment of the present application. On the basis of Figure 14 , the GPU transmits the GPU blur processed image 1440 to the DPU, the DPU superimposes the GPU blur processed image 1440 with the layer N to obtain the blur processed image 1450, and outputs the blur processed image 1450 to the display screen through the target output end for display.

[0196] In summary, in the image blur method provided by the embodiments of the present application, the DPU performs blur processing on the specified layer, i.e., the target layer, which can significantly improve the efficiency of image processing. The DPU can achieve large-scale parallel computing through hardware acceleration, which can reduce the delay and speed up the blur processing process, especially when processing complex images or multiple layers. The DPU can perform specialized blur processing on the target layer, such as lightweight blur processing combined with upsampling and Gaussian blur, without affecting the display effect of other layers, ensuring that the visual effects of each part of the final image are natural and coordinated. By outputting the processed image through the display screen, the user can view the changes in blur effect in real time, thereby facilitating the user to adjust parameters such as blur intensity and layer selection. The DPU accelerates the image processing process, which can reduce the pressure on CPU and memory in high-load image processing tasks, improve system smoothness while maintaining the competitiveness of blur animation effects, and reduce system power consumption.

[0197] It should be understood that although each step in the above flowcharts is shown in sequence according to the direction of the arrow, these steps are not necessarily executed in the order indicated by the arrow. Unless explicitly stated herein, there is no strict order limitation for the execution of these steps, and these steps can be executed in other orders. Moreover, at least part of the steps in the above flowcharts can include multiple sub-steps or multiple stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution order of these sub-steps or stages is not necessarily sequential, but can be alternately executed with at least part of other steps or sub-steps or stages of other steps.

[0198] Based on the foregoing embodiments, the embodiments of the present application provide an image blurring device, which comprises the modules included therein and the units included in the modules, and can be implemented by a processor; of course, it can also be implemented by a specific logic circuit; in the implementation process, the processor can be a central processing unit (CPU), a microprocessor (MPU), a digital signal processor (DSP), or a field programmable gate array (FPGA), etc.

[0199] Figure 16 For the structural schematic diagram of the image blurring device provided in the embodiments of the present application, please refer to Figure 16 The image blurring device comprises:

[0200] a detection module 1610 and a processing module 1620;

[0201] The detection module 1610 is configured to detect a target instruction, the target instruction being used for blurring processing of a target layer of a target display image, the target display image comprising the target layer and other layers; the processing module 1620 is configured to, in response to the target instruction, perform blurring processing on the target layer by the DPU, and output an image after blurring processing by the display screen, the image after blurring processing comprising a target layer after blurring processing and the other layers.

[0202] In an embodiment, the processing module 1620 is specifically configured to: perform write-back on the target layer by the DPU, perform blurring processing on the target layer in the write-back process, and obtain a target layer after DPU blurring processing; and superimpose the target layer after DPU blurring processing and the other layers, and output the image after blurring processing by the display screen.

[0203] In an embodiment, the processing module 1620 is specifically further configured to: perform blurring processing on the target layer according to a target blurring algorithm in the write-back process.

[0204] In an embodiment, the processing module 1620 is further configured to: down-sample the target layer to obtain a down-sampled target layer; perform calculation processing on the down-sampled target layer according to a target blur algorithm to obtain a calculation-processed target layer; and up-sample the calculation-processed target layer, wherein the up-sampling has the same sampling rate as the down-sampling.

[0205] In an embodiment, the target instruction includes a maximum blur radius, and the processing module 1620 is further configured to: determine a target blur radius of the target blur algorithm according to the maximum blur radius and the sampling rate; and perform calculation processing on the down-sampled target layer according to the target blur radius and the target blur algorithm to obtain the calculation-processed target layer.

[0206] In an embodiment, the target instruction further includes a blur radius update frequency, and the blur radius update frequency is used to indicate a total number of frames reaching the maximum blur radius; and the apparatus further includes a determination module.

[0207] The determination module is configured to determine the target blur radius based on the blur radius update frequency, the maximum blur radius, and the sampling rate.

[0208] In an embodiment, the terminal device further includes a graphics processing unit (GPU), and the processing module 1620 is configured to: perform write-back on the target layer by the DPU, and perform blur processing on the target layer during the write-back to obtain a DPU blur-processed target layer; perform blur processing on the DPU blur-processed target layer by the GPU to obtain a GPU blur-processed target layer; and superimpose the GPU blur-processed target layer and the other layers to output a blur-processed image by the display screen.

[0209] In an embodiment, the target instruction includes a maximum blur radius, and the processing module 1620 is further configured to: when the maximum blur radius is greater than a threshold value, perform blur processing on the DPU blur-processed target layer by the GPU to obtain a GPU blur-processed target layer, wherein the threshold value is determined according to a maximum value of a blur radius supported by the DPU.

[0210] In one embodiment, the terminal device further includes a memory, and the DPU includes at least two output terminals. A target output terminal of the at least two output terminals is connected to the display screen, and the other output terminals of the at least two output terminals, excluding the target output terminal, are connected to the memory. The processing module 1620 is further configured to: acquire the target layer through the DPU, blur the target layer, and output the blurred target layer to the memory through the other output terminals.

[0211] In one embodiment, the target layer is a target number of multiple layers, and the processing module 1620 is further configured to: perform superposition processing on the multiple layers in a preset order by the DPU, and when the number of superimposed layers reaches the target number, perform blur processing on the superimposed multiple layers, and output the target layer after blurring by the DPU to the memory through the other output terminal.

[0212] In the image blurring device provided in this application embodiment, a target instruction can be detected first. The target instruction is used to blur a target layer of a target display image, which includes the target layer and other layers. Then, in response to the target instruction, the target layer is blurred using a DPU, and the blurred image is output to the display screen. The blurred image includes the blurred target layer and other layers. In this image blurring method, blurring the target layer using a DPU can reduce the power consumption of the terminal device when blurring the image.

[0213] The descriptions of the above device embodiments are similar to those of the above method embodiments, and have similar beneficial effects. For technical details not disclosed in the device embodiments of this application, please refer to the descriptions of the method embodiments of this application for understanding.

[0214] It should be noted that, in the embodiments of this application... Figure 16 The module division shown is illustrative and represents only one logical functional division; in actual implementation, other division methods may be used. Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, exist as separate physical units, or be integrated into one unit from two or more units. The integrated units can be implemented in hardware, as software functional units, or a combination of both.

[0215] It should be noted that, in the embodiments of the present application, if the above-mentioned method is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application can be embodied in the form of a software product, and the computer software product is stored in a storage medium, and includes a plurality of instructions for causing an electronic device to execute all or part of the methods described in the embodiments of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a magnetic disk or an optical disk, and various media that can store program codes. Thus, the embodiments of the present application are not limited to any specific hardware and software combination.

[0216] Figure 17 For the structural schematic diagram of the computer device provided in the embodiments of the present application, please refer to Figure 17 The embodiments of the present application provide a computer device, which can be the terminal device described above, and the internal structure diagram thereof can be as shown in Figure 17 The computer device includes a processor 1720, a memory and a network interface 1740 connected through a system bus 1710. The processor 1720 of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium 1731 and an internal memory 1732. The non-volatile storage medium 1731 stores an operating system, a computer program and a database. The internal memory 1732 provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium 1731. The database of the computer device is configured to store data. The network interface 1740 of the computer device is configured to communicate with an external terminal through a network connection. The computer program is executed by the processor to implement the above-mentioned method.

[0217] The embodiments of the present application provide a computer readable storage medium, which stores a computer program. The computer program is executed by a processor to implement the steps in the method provided in the above-mentioned embodiments.

[0218] The embodiments of the present application provide a computer program product containing instructions, which, when executed on a computer, cause the computer to perform the steps in the method provided by the above-mentioned method embodiments.

[0219] Those skilled in the art can understand that Figure 17 The structure shown in the above-mentioned embodiments of the present application is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific computer device can include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0220] In one embodiment, the image blurring apparatus provided in the present application can be implemented in the form of a computer program, which can run on a computer device as shown in the figure. The memory of the computer device can store various program modules constituting the above apparatus. The computer program constituted by various program modules makes the processor execute the steps in the method of various embodiments of the present application described in the specification. Figure 17

[0221] It should be noted that the above description of the storage medium and device embodiments is similar to the description of the above method embodiments, and has similar beneficial effects as the method embodiments. For technical details of the storage medium, storage medium and device embodiments of the present application that are not disclosed, please refer to the description of the method embodiments of the present application for understanding.

[0222] It should be understood that the "one embodiment" or "an embodiment" or "some embodiments" mentioned throughout the specification means that the specific features, structures or characteristics related to the embodiments are included in at least one embodiment of the present application. Therefore, "in one embodiment" or "in an embodiment" or "in some embodiments" appearing throughout the specification does not necessarily mean the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. It should be understood that in various embodiments of the present application, the size of the sequence number of the above processes does not mean the execution order, and the execution order of the processes should be determined according to its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present application. The above sequence number of the embodiments of the present application is only for description, not representing the advantages and disadvantages of the embodiments. The above description of each embodiment tends to emphasize the differences between each embodiment, and the same or similar parts can be referred to each other, and for the sake of brevity, this paper will not be repeated here.

[0223] The term "and / or" in this paper is only a description of the association relationship of the associated objects, which means that there can be three kinds of relationships, for example, object A and / or object B, which can represent the three cases of the existence of object A alone, the existence of object A and object B at the same time, and the existence of object B alone.

[0224] It should be noted that in this paper, the term "include", "contain" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed, or includes elements inherent to such process, method, article or device. Without more limitations, the element defined by the sentence "including a…" does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0225] ​In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other manners. The above described embodiments are merely exemplary, for example, the division of the modules is only a logical function division, and there can be another division manner for the actual implementation, for example, a plurality of modules or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the various components shown or discussed can be indirect coupling or communication connection through some interfaces, devices or modules, and can be electrical, mechanical or other forms.

[0226] The modules described above as separate components may or may not be physically separate, and the components shown as modules may or may not be physical modules; they can be located in one place or distributed on multiple network units; and some or all of the modules can be selected according to actual needs to achieve the purpose of the embodiments.

[0227] In addition, each functional module in each embodiment of the present application can be integrated into one processing unit, or each module can be a separate unit, or two or more modules can be integrated into one unit; the integrated module can be realized in the form of hardware or hardware plus software functional unit.

[0228] Those of ordinary skill in the art can understand that all or part of the steps of the above-mentioned method embodiments can be completed by a program instructing related hardware, and the aforementioned program can be stored in a computer readable storage medium, and the program executes the steps of the above-mentioned method embodiments when executed; and the aforementioned storage medium includes mobile storage devices, read only memory (ROM), magnetic discs or optical discs and various storage media that can store program codes.

[0229] Alternatively, the integrated units of the present application, if implemented in the form of software functional modules and sold or used as independent products, can also be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the embodiments of the present application can be embodied in the form of a software product, and the computer software product is stored in a storage medium, and includes a plurality of instructions for causing an electronic device to execute all or part of the methods described in the embodiments of the present application. The aforementioned storage medium includes mobile storage devices, ROM, magnetic discs or optical discs and various storage media that can store program codes.

[0230] The methods disclosed in the several method embodiments provided in the present application can be combined arbitrarily without conflict, to obtain new method embodiments.

[0231] The features disclosed in several product embodiments provided by the present application can be arbitrarily combined, without conflict, to obtain new product embodiments.

[0232] The features disclosed in several method or device embodiments provided by the present application can be arbitrarily combined, without conflict, to obtain new method embodiments or device embodiments.

[0233] The above description is merely illustrative of the application, and the scope of the application is not limited thereto. Any variations and modifications of the application, which would occur to those skilled in the art, are to be considered within the scope of the application. Therefore, the scope of the application is to be determined by the claims.

Claims

1. An image blurring method characterized by, Applied to a terminal device, the terminal device comprising a display processor (DPU) and a display screen, the method comprising: detecting a target instruction, the target instruction being used for performing blur processing on a target layer of a target display image, the target display image comprising the target layer and other layers; in response to the target instruction, performing blur processing on the target layer by the DPU, and outputting a blur-processed image by the display screen, the blur-processed image comprising a blur-processed target layer and the other layers.

2. The method of claim 1, wherein, The blur processing on the target layer by the DPU and the outputting of the blur-processed image by the display screen comprise: writing back the target layer by the DPU, and performing blur processing on the target layer in the writing back process to obtain a DPU blur-processed target layer; superimposing the DPU blur-processed target layer and the other layers, and outputting the blur-processed image by the display screen.

3. The method of claim 2, wherein, The blur processing on the target layer in the writing back process comprises: performing blur processing on the target layer according to a target blur algorithm in the writing back process.

4. The method of claim 2, wherein, The blur processing on the target layer in the writing back process comprises: down-sampling the target layer to obtain a down-sampled target layer; performing calculation processing on the down-sampled target layer according to a target blur algorithm to obtain a calculation-processed target layer; up-sampling the calculation-processed target layer; wherein the up-sampling and the down-sampling have the same sampling rate.

5. The method of claim 4, wherein, The target instruction comprises a maximum blur radius, and the calculation processing on the down-sampled target layer according to a target blur algorithm to obtain a calculation-processed target layer comprises: determining a target blur radius of the target blur algorithm according to the maximum blur radius and the sampling rate; performing calculation processing on the down-sampled target layer according to the target blur radius and the target blur algorithm to obtain the calculation-processed target layer.

6. The method of claim 5, wherein, The target instruction further comprises a blur radius update frequency, the blur radius update frequency being used for indicating a total frame number reaching the maximum blur radius; The determination of the target blur radius according to the maximum blur radius and the sampling rate comprises: determining the target blur radius based on the blur radius update frequency, the maximum blur radius and the sampling rate.

7. The method of claim 1, wherein, The terminal device further comprises a graphics processor (GPU), and the blur processing on the target layer by the DPU and the outputting of the blur-processed image by the display screen comprise: writing back the target layer by the DPU, and performing blur processing on the target layer in the writing back process to obtain a DPU blur-processed target layer; performing blur processing on the DPU blur-processed target layer by the GPU to obtain a GPU blur-processed target layer; Superimpose the target image layer processed by the GPU with the other image layers, and output the processed image through the display screen.

8. The method of claim 7, wherein, The target instruction includes a maximum blur radius, and the processing of the target image layer processed by the DPU by the GPU includes: When the maximum blur radius is greater than a threshold value, processing the target image layer processed by the DPU by the GPU to obtain a target image layer processed by the GPU, the threshold value being determined according to a maximum value of the blur radius supported by the DPU.

9. The method of claim 2, wherein, The terminal device further includes a memory, the DPU includes at least two output terminals, a target output terminal of the at least two output terminals being connected with the display screen, and other output terminals of the at least two output terminals except the target output terminal being connected with the memory, and the processing of the target image layer by the DPU includes: The DPU acquires the target image layer, processes the target image layer, and outputs the target image layer processed by the DPU to the memory through the other output terminals.

10. The method of claim 9, wherein, The target image layer is a plurality of image layers of a target number, and the processing of the target image layer by the DPU includes: The DPU superimposes a plurality of image layers in a preset order, processes the plurality of image layers processed by superimposition when the number of the superimposed image layers reaches the target number, and outputs the target image layer processed by the DPU to the memory through the other output terminals.

11. An image blurring device characterized by comprising: The terminal device includes a display processor (DPU) and a display screen, and the device includes: A detection module detects a target instruction, the target instruction being used for processing a target image layer of a target display image, the target display image including the target image layer and other image layers; A processing module processes the target image layer by the DPU in response to the target instruction, and outputs an image processed by blur through the display screen, the image processed by blur including a target image layer processed by blur and the other image layers.

12. A computer device comprising a memory and a processor, the memory storing a computer program capable of running on the processor, characterized in that, The processor executes the program to implement the steps of the method in any one of claims 1 to 10.

13. A computer readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the method in any one of claims 1 to 10.