Methods, apparatuses, electronic devices and media for local blurring of images

By performing local blurring on the target area in the target image and using multiple preset layers for rendering and fusion, the limitations of global blurring in existing technologies are solved, and effective blurring of local areas of the image is achieved.

CN115439342BActive Publication Date: 2026-07-17BEIJING CO WHEELS TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING CO WHEELS TECH CO LTD
Filing Date
2022-06-17
Publication Date
2026-07-17

AI Technical Summary

Technical Problem

Existing image blurring techniques mainly blur the entire image globally, with a high degree of limitation in the blurred area, making it difficult to effectively blur a specific region of the image.

Method used

By acquiring the target region in the target image, rendering and blurring the data in the target region using at least two preset layers, a blurred image is obtained. The target image and the blurred image are then merged to achieve a local blurring result.

Benefits of technology

It reduces the limitations of blurry region processing, expands the applicable scenarios of blur processing, and can perform local blur processing on a specified rectangular area in an image.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115439342B_ABST
    Figure CN115439342B_ABST
Patent Text Reader

Abstract

This disclosure relates to a method, apparatus, electronic device, and medium for local blurring of an image. The method includes: acquiring a target image, the target image including a target region, the target region being the area in the target image to be blurred; performing rendering blurring on data in the target region based on at least two preset layers to obtain a blurred image corresponding to the target image; wherein the blurred image includes: a first region and a second region, the first region corresponding to the rendered blurred data of the target region, and the second region corresponding to empty data; fusing the target image and the blurred image to obtain a locally blurred result of the target image. This disclosure, by blurring a specified rectangular region in a target image, achieves local blurring of an image, reducing the limitations of blurring region processing and enriching the applicable scenarios for blurring processing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of image processing technology, and in particular to a method, apparatus, electronic device, and medium for local blurring of an image. Background Technology

[0002] Image blurring technology can blur the entire image, making it easier to extract objects of interest. For example, blurring technology can be used to filter out small or low-brightness objects in an image, effectively extracting the parts of interest.

[0003] In related technologies, image blurring is mainly achieved by setting a certain blur radius to blur the entire image. The blur radius can change the sharpness of the original image. The smaller the blur radius, the less the original image is lost in sharpness; the larger the blur radius, the greater the loss in sharpness, that is, the more blurred the image becomes.

[0004] However, existing image blurring techniques mainly blur the entire image globally, resulting in a high degree of limitation in the blurred area. Summary of the Invention

[0005] To address the aforementioned technical problems, this disclosure provides a method, apparatus, electronic device, and medium for local blurring of images.

[0006] In a first aspect, this disclosure provides a method for local blurring of an image, comprising:

[0007] Acquire a target image, wherein the target image includes a target region, and the target region is the region in the target image to be blurred.

[0008] The data in the target area is rendered and blurred based on at least two preset layers to obtain a blurred image corresponding to the target image; wherein, the blurred image includes: a first region and a second region, the first region corresponds to the rendered blurred data of the target area, and the second region corresponds to empty data;

[0009] The target image and the blurred image are fused together to obtain a locally blurred result of the target image.

[0010] Optionally, the step of rendering and blurring the data in the target area based on at least two preset layers to obtain a blurred image corresponding to the target image includes:

[0011] The data in the target area is fused into the overlay layer to obtain the target fused data;

[0012] Based on the blurred layer, the target fusion data is blurred and superimposed to obtain the blurred image corresponding to the target image.

[0013] Optionally, before performing blur overlay on the target fusion data based on the blur layer to obtain the blurred image corresponding to the target image, the method further includes:

[0014] Obtain the preset blur radius;

[0015] The step of performing a blur overlay on the target fusion data based on the blur layer to obtain a blurred image corresponding to the target image includes:

[0016] Based on the blurred layer, the target fused data is blurred according to the preset blurred radius to obtain target blurred data;

[0017] The target blurred data is superimposed on the blurred layer to obtain the blurred image corresponding to the target image.

[0018] Optionally, before overlaying the target blurred data with the blurred layer to obtain the blurred image corresponding to the target image, the method further includes:

[0019] Obtain a preset buffer layer, wherein the buffer layer includes empty data;

[0020] The step of overlaying the target blurred data with the blurred layer to obtain the blurred image corresponding to the target image includes:

[0021] The target blurred data is overlaid on the blurred layer;

[0022] The blurred layer is then overlaid with the preset buffer layer to obtain the blurred image corresponding to the target image.

[0023] Optionally, the step of overlaying the target blurred data with the blurred layer to obtain a blurred image corresponding to the target image includes:

[0024] The target blurred data is overlaid on the blurred layer;

[0025] The blurred region corresponding to the target region is obtained from the superimposed blurred layer, and the data in the blurred region is superimposed with the preset buffer layer to obtain the blurred image corresponding to the target image.

[0026] Optionally, the overlay layer includes: a first layer, a second layer, and a third layer; the step of fusing the data in the target area into the overlay layer to obtain target fused data includes:

[0027] The data in the target area is rendered into the first layer to obtain the rendered first layer;

[0028] The rendered first layer and the second layer are merged to obtain the merged second layer;

[0029] The merged second layer is then merged with the third layer to obtain the target merged data.

[0030] Optionally, it is characterized by further comprising:

[0031] Obtain response information of the local blurring result of the target image, wherein the response information is used to describe the application of the local blurring result of the target image;

[0032] Based on the response information of the local blurring result of the target image, the local blurring of the target image is adjusted.

[0033] Secondly, this disclosure provides a local blurring device for an image, comprising:

[0034] The acquisition module is used to acquire a target image, wherein the target image includes a target region, and the target region is the region in the target image to be blurred.

[0035] The processing module is used to perform rendering blurring processing on the data in the target area based on at least two preset layers to obtain a blurred image corresponding to the target image; wherein, the blurred image includes: a first area and a second area, the first area corresponds to the rendered blurred data of the target area, and the second area corresponds to empty data;

[0036] The fusion module is used to fuse the target image with the blurred image to obtain a locally blurred result of the target image.

[0037] Optional, the processing module includes: a fusion unit and a stacking unit;

[0038] The fusion unit is used to fuse the data in the target area into the overlay layer to obtain the target fused data;

[0039] The overlay unit is used to perform blur overlay on the target fusion data based on the blur layer to obtain a blurred image corresponding to the target image.

[0040] Optionally, the acquisition module is also used to acquire a preset fuzzy radius;

[0041] Stacking units, specifically used for:

[0042] Based on the blurred layer, the target fused data is blurred according to the preset blurred radius to obtain target blurred data;

[0043] The target blurred data is superimposed on the blurred layer to obtain the blurred image corresponding to the target image.

[0044] Optionally, the acquisition module is also used to acquire a preset buffer layer, wherein the buffer layer includes empty data;

[0045] Stacking units, specifically used for:

[0046] The target blurred data is overlaid on the blurred layer;

[0047] The blurred layer is then overlaid with the preset buffer layer to obtain the blurred image corresponding to the target image.

[0048] Optional, stacking units, specifically used for:

[0049] The target blurred data is overlaid on the blurred layer;

[0050] The blurred region corresponding to the target region is obtained from the superimposed blurred layer, and the data in the blurred region is superimposed with the preset buffer layer to obtain the blurred image corresponding to the target image.

[0051] Optionally, the overlay layers include: a first layer, a second layer, and a third layer;

[0052] The fusion unit is specifically used for:

[0053] The data in the target area is rendered into the first layer to obtain the rendered first layer;

[0054] The rendered first layer and the second layer are merged to obtain the merged second layer;

[0055] The merged second layer is then merged with the third layer to obtain the target merged data.

[0056] Optionally, it may also include: an adjustment module;

[0057] The acquisition module is also used to acquire response information of the local blurring result of the target image, the response information being used to describe the application of the local blurring result of the target image;

[0058] An adjustment module is used to adjust the local blurring result of the target image based on response information of the local blurring result of the target image.

[0059] Thirdly, this disclosure also provides an electronic device, including:

[0060] One or more processors;

[0061] Storage device for storing one or more programs.

[0062] When the one or more programs are executed by the one or more processors, the one or more processors implement any of the image local blurring methods described in the embodiments of the present invention.

[0063] Fourthly, this disclosure also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any of the image local blurring methods described in the embodiments of the present invention.

[0064] Compared with the prior art, the technical solution provided by this disclosure has the following advantages: By acquiring a target image, wherein the target image includes a target region, the target region is a rectangular region in the target image to be blurred, and rendering blurring is performed on the data in the target region based on at least two preset layers to obtain a blurred image corresponding to the target image, wherein the blurred image may include two regions, a first region and a second region, the first region may correspond to the rendered blurred data of the target region, and the second region may correspond to empty data, so as to highlight the target region after blurring, and the target image and the blurred image are fused to obtain the local blurring result of the target image. Thus, by blurring a specified rectangular region in the target image, the blurring of a local region in the image is achieved, reducing the limitations of blurring region processing and enriching the applicable scenarios of blurring processing. Attached Figure Description

[0065] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.

[0066] To more clearly illustrate the technical solutions in the embodiments of this disclosure or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0067] Figure 1 This is a schematic flowchart of a method for local blurring of an image provided in an embodiment of this disclosure;

[0068] Figure 2 This is a flowchart illustrating another method for local blurring of an image provided in an embodiment of this disclosure;

[0069] Figure 3 This is a schematic diagram of a multi-layer overlay processing procedure provided in an embodiment of the present disclosure;

[0070] Figure 4This is a schematic diagram of the structure of a partial blurring device for an image provided in an embodiment of this disclosure;

[0071] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Detailed Implementation

[0072] To better understand the above-mentioned objectives, features, and advantages of this disclosure, the solutions disclosed herein will be further described below. It should be noted that, unless otherwise specified, the embodiments and features described herein can be combined with each other.

[0073] Numerous specific details are set forth in the following description in order to provide a full understanding of this disclosure, but this disclosure may also be implemented in other ways different from those described herein; obviously, the embodiments in the specification are only some, and not all, of the embodiments of this disclosure.

[0074] This embodiment can be applied to image blurring.

[0075] For example, an image may include multiple rectangular regions. When blurring is required, a blur radius can be set based on the image, and all rectangular regions in the image can be blurred using the blur radius, thereby changing the visibility of the image.

[0076] However, the above-mentioned methods of image blurring mainly involve global blurring of the entire image, which has a high degree of limitation in the blurred area and makes it difficult to effectively blur a specific area of ​​the image.

[0077] For example, this disclosure provides a method, apparatus, electronic device, and medium for local blurring of an image. By acquiring a target image, wherein the target image includes a target region, which is a rectangular region in the target image to be blurred, rendering blurring is performed on the data in the target region based on at least two preset layers to obtain a blurred image corresponding to the target image. The blurred image may include two regions, a first region and a second region. The first region may correspond to the rendered blurred data of the target region, and the second region may correspond to empty data, thereby highlighting the blurred target region. The target image and the blurred image are then fused to obtain a locally blurred result of the target image. Thus, by blurring a specified rectangular region in the target image, local blurring of the image is achieved, reducing the limitations of blur region processing and enriching the applicable scenarios of blurring processing.

[0078] See details Figure 1 As shown in the example.

[0079] Figure 1This is a schematic flowchart illustrating a method for localizing image blurring according to an embodiment of this disclosure. The method in this embodiment can be executed by an image localization device, which can be implemented in hardware / software and configured in an electronic device. The image localization method described in any embodiment of this application can be implemented. Figure 1 As shown, the method specifically includes the following:

[0080] S110. Acquire the target image, which includes the target region.

[0081] The target image can be an image drawn by the application layer that needs to be locally blurred. For example, the target image can be a display interface in an application (APP).

[0082] The target region is the area in the target image that needs to be blurred.

[0083] Based on the above examples, when the target image is a display interface in an app, the display interface can be composed of multiple rectangular areas, and the target area can be one or more rectangular areas in the display interface.

[0084] Specifically, the display interface includes: area 1 corresponding to icon A, area 2 corresponding to icon B, area 3 corresponding to icon C, area 4 corresponding to icon D, area 5 corresponding to icon E, and area 6 corresponding to icon F; when the target area is a rectangular area in the display interface, the target area can be area 1 / area 2 / area 3 / area 4 / area 5 / area 6; when the target area is multiple rectangular areas in the display interface, the target area can be area 1 and area 2, or area 1 and area 3, or area 2 and area 3, or area 1, area 2 and area 3.

[0085] It should be noted that the area to be blurred can be determined based on the display requirements of the APP. For example, in a certain display scenario, if multiple rectangular areas need to be blurred, the target area can correspond to multiple rectangular areas. This disclosure does not make any specific limitations on this.

[0086] S120. Based on at least two preset layers, render and blur the data in the target area to obtain a blurred image corresponding to the target image.

[0087] Among them, at least two preset layers may include multiple overlay layers and a blur layer. The overlay layers can be used to sequentially overlay data in the target area, and the blur layer can be used to blur and blend the data after it has been processed by the overlay layers.

[0088] The blurred image may include: a first region and a second region, wherein the first region corresponds to the rendered blurred data of the target region, and the second region corresponds to empty data;

[0089] Based on the above example, when the target area is area 1 corresponding to icon A, the resulting blurred image can include two areas, namely the first area and the second area. The first area can correspond to the rendered blurred data of the target area after blurring, and the second area can be empty data, which can be used as a transparent background.

[0090] S130. The target image and the blurred image are fused to obtain a locally blurred result of the target image.

[0091] The process of fusing the target image with the blurred image to obtain a local blurred result of the target image may include: superimposing data included in the blurred image (such as data corresponding to the blurred region / global data) onto the target image to obtain a local blurred result of the target image.

[0092] It should be noted that the size of the blurred image can be the same as that of the target image, that is, the length and width are equal, which makes it easier to improve the fusion efficiency of the target image and the blurred image.

[0093] In addition, when the size of the blurred image is different from that of the target image, the target image and the blurred image can be fused based on the position of the target region in the target image and the position of the blurred region corresponding to the target region in the blurred image, thereby improving the fusion accuracy of the target image and the blurred image.

[0094] The local blurring method for images provided in this embodiment obtains a target image, which includes a target region, a rectangular area in the target image to be blurred. Based on at least two preset layers, the data in the target region is rendered and blurred to obtain a blurred image corresponding to the target image. The blurred image may include two regions, a first region and a second region. The first region may correspond to the rendered blurred data of the target region, and the second region may correspond to empty data, so as to highlight the target region after blurring. The target image and the blurred image are then fused to obtain a local blurring result of the target image. Thus, by blurring a specified rectangular area in the target image, local blurring of the image is achieved, reducing the limitations of blurring area processing and enriching the applicable scenarios of blurring processing.

[0095] It should be noted that when the target area corresponds to multiple rectangular areas, the blurring of the target image can be performed sequentially on the data in the multiple rectangular areas to finally obtain the blurred image corresponding to the target image.

[0096] Based on the above examples, when the target region can be region 1, region 2, and region 3, the data in region 1 is first blurred based on the above steps S110-S130. For the processing result of region 1, the data in region 2 is blurred based on the above steps S110-S130. For the processing result of region 2, the data in region 3 is blurred based on the above steps S110-S130, thus obtaining the blurred image corresponding to the final target image.

[0097] Figure 2 This is a flowchart illustrating another method for local blurring of an image provided in this embodiment. This embodiment is based on the above embodiments, and one possible implementation of step S120 is as follows:

[0098] S1201. Merge the data in the target area into the overlay layer to obtain the target fused data.

[0099] Overlay layers can include one or more layers.

[0100] Specifically, when the overlay layer includes a layer, the data in the target area is merged into the overlay layer to obtain the target merged data. This may include: merging the data in the target area into the layer mentioned above to obtain the target merged data.

[0101] When the overlay layer includes multiple layers, the data in the target area is merged into the overlay layer to obtain the target merged data. This can include: sequentially concatenating and merging the data in the target area into the overlay layer to obtain the target merged data.

[0102] In this embodiment, optionally, the overlay layer includes: a first layer, a second layer, and a third layer; fusing the data in the target area into the overlay layer to obtain target fused data includes:

[0103] The data in the target area is rendered into the first layer, resulting in the rendered first layer;

[0104] The rendered first layer is blended with the second layer to obtain the blended second layer;

[0105] The merged second layer is then merged with the third layer to obtain the target merged data.

[0106] like Figure 3As shown in the example, the data in the target area can be rendered to the layer corresponding to Layer1 to obtain the first rendered layer. Then, the first rendered layer is merged with the layer corresponding to Layer2 to obtain the merged second layer. The merged second layer is then merged with the layer corresponding to Layer3 to obtain the target merged data. Here, the area corresponding to BlurRect is identified as the target area.

[0107] Among them, 1.1mix can be used to describe the fusion process between the layer corresponding to Layer1 and the layer corresponding to Layer2, 2.1mix can be used to describe the fusion process between the layer corresponding to Layer2 and the layer corresponding to Layer3, and 3.1blur / mix can be used to describe the blurring and fusion process between the layer corresponding to Layer3 and the layer corresponding to Layer4.

[0108] 4.1 blit can be used to describe transferring a small rectangular region corresponding to a FrameBuffer to a large rectangular region corresponding to a FrameBuffer.

[0109] It should be noted that the first, second, and third layers have the same size, and the target area is located in the same position in the first layer, the second layer, and the third layer.

[0110] S1202. Based on the blur layer, blur the target fusion data to obtain the blur image corresponding to the target image.

[0111] Among them, the blurred layer can be as follows Figure 3 The layer corresponding to Layer4 in the example has the function of blurring and blending layers, that is, blurring first and then blending.

[0112] For example, the target fusion data is blurred, and then the processed target fusion data is superimposed on the blurred layer to obtain the blurred image corresponding to the target image.

[0113] It should be noted that in a blurred image, only the area corresponding to the target region has blurred data, while the remaining areas have no data filling and can be regarded as a transparent background.

[0114] In this embodiment, optionally, before performing blur overlay on the target fusion data based on the blur layer to obtain the blurred image corresponding to the target image, the method of this embodiment may further include:

[0115] Obtain the preset blur radius;

[0116] Based on the blur layer, the target fusion data is blurred and overlaid to obtain a blurred image corresponding to the target image, including:

[0117] Based on the blur layer, the target fusion data is blurred according to the preset blur radius to obtain the target blurred data;

[0118] The target blurred data is overlaid with the blurred layer to obtain the blurred image corresponding to the target image.

[0119] The fuzzy radius can be preset in the application layer.

[0120] Specifically, after setting the blur radius and target area at the application layer, it can be called through the calling layer (such as the JNI layer) to enter the blur layer (such as the SurfaceFlinger layer) across processes and set the blur radius and target area in the SurfaceFlinger layer.

[0121] Therefore, by using the pre-obtained blur radius, the target fusion data is blurred to obtain target blurred data, thereby achieving data blurring. The target blurred data is then superimposed on the blur layer to obtain the blurred image corresponding to the target image, thus improving the blurring effect in local areas of the target image.

[0122] In particular, when overlaying the target blurred data with the blurred layer to obtain the blurred image corresponding to the target image, the target blurred data can be overlaid with the blurred layer based on the display position of the target blurred data in the blurred layer to obtain the blurred image corresponding to the target image, thereby further improving the blur processing effect.

[0123] In this embodiment, optionally, before overlaying the target blurred data with the blurred layer to obtain the blurred image corresponding to the target image, the method of this embodiment may further include:

[0124] Retrieve the preset buffer layer, which includes empty data;

[0125] The target blurred data is overlaid with the blurred layer to obtain the blurred image corresponding to the target image, including:

[0126] Overlay the target blurred data with the blurred layer;

[0127] The blurred layer is superimposed on the preset buffer layer to obtain the blurred image corresponding to the target image.

[0128] The preset buffer layer can be used for data fusion / layer overlay, and it can be a transparent background of empty data.

[0129] The process of overlaying the blurred layer with a preset buffer layer to obtain a blurred image corresponding to the target image may include: based on the display position of the target area in the overlaid blurred layer and the display position of the target area in the preset buffer layer, overlaying the blurred layer with the preset buffer layer accordingly to obtain a blurred image corresponding to the target image.

[0130] In this embodiment, optionally, the target blurred data is superimposed on the blurred layer to obtain a blurred image corresponding to the target image, including:

[0131] Overlay the target blurred data with the blurred layer;

[0132] The blurred region corresponding to the target area is obtained from the superimposed blurred layer. The data in the blurred region is superimposed with the preset buffer layer to obtain the blurred image corresponding to the target image.

[0133] This process involves overlaying the target blurred data with a blurred layer to obtain an overlaid blurred layer. This overlaid layer has the same size as the original blurred layer, and the display position of the target region in the target image corresponds to the blurred area in the overlaid blurred layer. The blurred area can correspond to, for example,... Figure 3 The example shows the display area corresponding to the frame buffer.

[0134] In the superimposed blurred layer, the data in the blurred area is the data that needs to be displayed. Therefore, directly superimposing the data in the blurred area with the preset buffer layer can further improve the superimposition effect of the blurred image.

[0135] In this embodiment, optionally, the device further includes:

[0136] Obtain response information of the local blurring result of the target image. The response information is used to describe the application of the local blurring result of the target image.

[0137] Based on the response information of the local blurring result of the target image, adjust the local blurring result of the target image.

[0138] After determining the local blurring result of the target image, it can be displayed to the user through the corresponding APP. At the same time, user application feedback can be collected, and the local blurring result of the target image can be adjusted based on the application feedback to improve the applicability of image local blurring processing.

[0139] The process of adjusting the local blurring result of the target image based on the response information of the local blurring result of the target image may include: adjusting the blur radius based on the response information of the local blurring result of the target image, so as to obtain a new local blurring effect of the target image based on the above implementation method.

[0140] Figure 4 This is a schematic diagram of an image partial blurring device provided in an embodiment of this disclosure; the device is configured in an electronic device and can implement the image partial blurring method described in any embodiment of this application. The device specifically includes the following:

[0141] The acquisition module 410 is used to acquire a target image, wherein the target image includes a target region, and the target region is the region in the target image to be blurred.

[0142] The processing module 420 is used to perform rendering blurring processing on the data in the target area based on at least two preset layers to obtain a blurred image corresponding to the target image; wherein, the blurred image includes: a first area and a second area, the first area corresponds to the rendered blurred data of the target area, and the second area corresponds to empty data;

[0143] The fusion module 430 is used to fuse the target image with the blurred image to obtain a local blurred result of the target image.

[0144] In this embodiment, optionally, the processing module 420 includes: a fusion unit and a superposition unit;

[0145] The fusion unit is used to fuse the data in the target area into the overlay layer to obtain the target fused data;

[0146] The overlay unit is used to perform blur overlay on the target fusion data based on the blur layer to obtain a blurred image corresponding to the target image.

[0147] In this embodiment, optionally, the acquisition module 410 is also used to acquire a preset fuzzy radius;

[0148] Stacking units, specifically used for:

[0149] Based on the blurred layer, the target fused data is blurred according to the preset blurred radius to obtain target blurred data;

[0150] The target blurred data is superimposed on the blurred layer to obtain the blurred image corresponding to the target image.

[0151] In this embodiment, optionally, the acquisition module 410 is further configured to acquire a preset buffer layer, wherein the buffer layer includes empty data;

[0152] Stacking units, specifically used for:

[0153] The target blurred data is overlaid on the blurred layer;

[0154] The blurred layer is then overlaid with the preset buffer layer to obtain the blurred image corresponding to the target image.

[0155] In this embodiment, optionally, the stacking unit is specifically used for:

[0156] The target blurred data is overlaid on the blurred layer;

[0157] The blurred region corresponding to the target region is obtained from the superimposed blurred layer, and the data in the blurred region is superimposed with the preset buffer layer to obtain the blurred image corresponding to the target image.

[0158] In this embodiment, optionally, the overlay layers include: a first layer, a second layer, and a third layer;

[0159] The fusion unit is specifically used for:

[0160] The data in the target area is rendered into the first layer to obtain the rendered first layer;

[0161] The rendered first layer and the second layer are merged to obtain the merged second layer;

[0162] The merged second layer is then merged with the third layer to obtain the target merged data.

[0163] In this embodiment, optionally, it also includes: an adjustment module;

[0164] The acquisition module 410 is further configured to acquire response information of the local blurring result of the target image, wherein the response information is used to describe the application of the local blurring result of the target image;

[0165] An adjustment module is used to adjust the local blurring result of the target image based on response information of the local blurring result of the target image.

[0166] The image local blurring device of this invention obtains a target image, wherein the target image includes a target region, which is a rectangular region in the target image to be blurred. Based on at least two preset layers, the data in the target region is rendered and blurred to obtain a blurred image corresponding to the target image. The blurred image may include two regions, a first region and a second region. The first region may correspond to the rendered blurred data of the target region, and the second region may correspond to empty data, so as to highlight the target region after blurring. The target image and the blurred image are then fused to obtain a local blurring result of the target image. Thus, by blurring a specified rectangular region in the target image, local blurring of the image is achieved, reducing the limitations of blurring region processing and enriching the applicable scenarios of blurring processing.

[0167] The image local blurring device provided in the embodiments of the present invention can execute the image local blurring method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the method execution.

[0168] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. For example... Figure 5 As shown, the electronic device includes a processor 510, a memory 520, an input device 530, and an output device 540; the number of processors 510 in the electronic device can be one or more. Figure 5 Taking a processor 510 as an example; the processor 510, memory 520, input device 530, and output device 540 in the electronic device can be connected via a bus or other means. Figure 5 Taking the example of a connection between China and Israel via a bus.

[0169] The memory 520, as a computer-readable storage medium, can be used to store software programs, computer-executable programs, and modules, such as the program instructions / modules corresponding to the image local blurring method in this embodiment of the invention. The processor 510 executes various functional applications and data processing of the electronic device by running the software programs, instructions, and modules stored in the memory 520, thereby implementing the image local blurring method provided in this embodiment of the invention.

[0170] The memory 520 may primarily include a program storage area and a data storage area. The program storage area may store the operating system and at least one application program required for a given function; the data storage area may store data created based on terminal usage. Furthermore, the memory 520 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state storage device. In some instances, the memory 520 may further include memory remotely located relative to the processor 510, which can be connected to the electronic device via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0171] Input device 530 can be used to receive input digital or character information, and to generate key signal inputs related to user settings and function control of the electronic device, and may include a keyboard, mouse, etc. Output device 540 may include a display device such as a screen.

[0172] This disclosure also provides a storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to implement the image local blurring method provided in this embodiment of the invention.

[0173] Of course, the computer-executable instructions provided in the embodiments of the present invention are not limited to the method operations described above, but can also perform related operations in the image local blurring method provided in any embodiment of the present invention.

[0174] Based on the above description of the implementation methods, those skilled in the art can clearly understand that the present invention can be implemented using software and necessary general-purpose hardware, and of course, it can also be implemented using hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ROM), random access memory (RAM), flash memory, hard disk, or optical disk, etc., including several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments of the present invention.

[0175] It is worth noting that in the embodiments of the search device described above, the various units and modules included are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be achieved; in addition, the specific names of each functional unit are only for easy differentiation and are not used to limit the scope of protection of the present invention.

[0176] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0177] The above description is merely a specific embodiment of this disclosure, enabling those skilled in the art to understand or implement it. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this disclosure. Therefore, this disclosure is not to be limited to the embodiments described herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for local blurring of an image, characterized in that, include: Acquire a target image, wherein the target image includes a target region, and the target region is a rectangular region in the target image to be blurred; The data in the target area is rendered and blurred based on at least two preset layers to obtain a blurred image corresponding to the target image; wherein, the blurred image includes: a first region and a second region, the first region corresponds to the rendered blurred data of the target area, and the second region corresponds to empty data; the at least two preset layers include multiple overlay layers and a blur layer, the overlay layers are used to sequentially overlay the data in the target area, and the blur layer is used to perform blur fusion processing on the data processed by the overlay layers; The target image and the blurred image are fused together to obtain a locally blurred result of the target image.

2. The method according to claim 1, characterized in that, The step of rendering and blurring the data in the target area based on at least two preset layers to obtain a blurred image corresponding to the target image includes: The data in the target area is fused into the overlay layer to obtain the target fused data; Based on the blurred layer, the target fusion data is blurred and superimposed to obtain the blurred image corresponding to the target image.

3. The method according to claim 2, characterized in that, Before performing blur overlay on the target fusion data based on the blur layer to obtain the blurred image corresponding to the target image, the method further includes: Obtain the preset blur radius; The step of performing a blur overlay on the target fusion data based on the blur layer to obtain a blurred image corresponding to the target image includes: Based on the blurred layer, the target fused data is blurred according to the preset blurred radius to obtain target blurred data; The target blurred data is superimposed on the blurred layer to obtain the blurred image corresponding to the target image.

4. The method according to claim 3, characterized in that, Before overlaying the target blurred data with the blurred layer to obtain the blurred image corresponding to the target image, the method further includes: Obtain a preset buffer layer, wherein the buffer layer includes empty data; The step of overlaying the target blurred data with the blurred layer to obtain the blurred image corresponding to the target image includes: The target blurred data is overlaid on the blurred layer; The blurred layer is then overlaid with the preset buffer layer to obtain the blurred image corresponding to the target image.

5. The method according to claim 3, characterized in that, The step of overlaying the target blurred data with the blurred layer to obtain the blurred image corresponding to the target image includes: The target blurred data is overlaid on the blurred layer; The blurred region corresponding to the target region is obtained from the superimposed blurred layer, and the data in the blurred region is superimposed with the preset buffer layer to obtain the blurred image corresponding to the target image.

6. The method according to claim 2, characterized in that, The overlay layer includes: a first layer, a second layer, and a third layer; the process of fusing data from the target area into the overlay layer to obtain target fused data includes: The data in the target area is rendered into the first layer to obtain the rendered first layer; The rendered first layer and the second layer are merged to obtain the merged second layer; The merged second layer is then merged with the third layer to obtain the target merged data.

7. The method according to any one of claims 1-6, characterized in that, Also includes: Obtain response information of the local blurring result of the target image, wherein the response information is used to describe the application of the local blurring result of the target image; Based on the response information of the local blurring result of the target image, the local blurring result of the target image is adjusted.

8. A local blurring device for an image, characterized in that, include: The acquisition module is used to acquire a target image, wherein the target image includes a target region, and the target region is the region in the target image to be blurred. A processing module is configured to perform rendering blurring processing on data in the target area based on at least two preset layers to obtain a blurred image corresponding to the target image; wherein, the blurred image includes: a first region and a second region, the first region corresponds to the rendered blurred data of the target area, the second region corresponds to empty data, the at least two preset layers include multiple overlay layers and a blur layer, the overlay layers are used to perform sequential overlay processing on the data in the target area, and the blur layer is used to perform blur fusion processing on the data processed by the overlay layers; The fusion module is used to fuse the target image with the blurred image to obtain a locally blurred result of the target image.

9. An electronic device, characterized in that, include: One or more processors; Storage device for storing one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the local blurring method for an image as described in any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the program implements the local blurring method for images as described in any one of claims 1 to 7.