Image fuzzy processing method and device, equipment and storage medium

By introducing additional spot color information into the image blurring process, the color weight values ​​of the target pixel and its adjacent pixels are obtained, the problem of single spot color in the prior art is solved, and the various color toning effects inside the spot are achieved.

CN118918025APending Publication Date: 2024-11-08BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202310431545.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-04-20
Publication Date
2024-11-08

AI Technical Summary

Technical Problem

The color of the spot generated by the existing image blur processing technology is relatively single, and the color changes inside the spot cannot be controlled.

Method used

In the image blur process, additional spot color information is introduced. By obtaining the color weight values ​​of the target pixel and its adjacent pixels, the image to be processed is blurred to generate spots with multiple color tone effects.

Benefits of technology

The color-to-color effect of multiple colors inside the spot is achieved, and the problem of single color of the spot in the prior art is solved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118918025A_ABST
    Figure CN118918025A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides an image fuzzy processing method and device, equipment and a storage medium. The method comprises the following steps: acquiring a to-be-processed image, and determining a target pixel in the to-be-processed image; acquiring a shape mask corresponding to the target pixel in the to-be-processed image; the shape of the shape shade corresponds to the shape of the light spot; determining an adjacent pixel corresponding to the target pixel according to the shape mask; acquiring light spot color information corresponding to the target pixel, and determining color weight values of the target pixel and adjacent pixels according to the light spot color information; and performing fuzzy processing on the to-be-processed image according to the color weight values of the target pixel and the adjacent pixels thereof to obtain a target image. According to the technical scheme provided by the embodiment of the invention, the extra light spot color information is introduced in the image blurring processing process, so that the color matching effect of multiple colors is realized in the light spot in the processed target image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present disclosure relate to the field of image processing technology, and in particular to an image blur processing method, device, equipment and storage medium. Background Art

[0002] Image blur is an important image processing method in the field of image processing. By blurring the pixels in the image to be processed, a blurred image with light spots is obtained.

[0003] However, in the existing image blur processing method, the color of the light spot is only determined by the image to be processed, or the color of the light spot is mainly affected by the color of the pixel at the center of the light spot. Therefore, the color inside the light spot generated by the existing blur processing technology is relatively single, and the color change inside the light spot cannot be controlled. Summary of the invention

[0004] The present disclosure provides an image blur processing method, device, equipment and storage medium, which introduces additional light spot color information during the image blur processing process, so that a color adjustment effect of multiple colors can be achieved inside the light spot in the processed target image.

[0005] In a first aspect, an embodiment of the present disclosure provides an image blur processing method, comprising:

[0006] Acquire an image to be processed, and determine a target pixel in the image to be processed;

[0007] Acquire a shape mask corresponding to the target pixel in the image to be processed; the shape of the shape mask corresponds to the shape of the light spot;

[0008] Determining neighboring pixels corresponding to the target pixel according to the shape mask;

[0009] Acquire light spot color information corresponding to the target pixel, and determine color weight values ​​of the target pixel and its neighboring pixels according to the light spot color information;

[0010] According to the color weight values ​​of the target pixel and its neighboring pixels, the image to be processed is fuzzy processed to obtain a target image.

[0011] In a second aspect, the present disclosure also provides an image blur processing device, including:

[0012] A first acquisition module is used to acquire an image to be processed and determine a target pixel in the image to be processed;

[0013] A second acquisition module is used to acquire a shape mask corresponding to the target pixel in the image to be processed; the shape of the shape mask corresponds to the shape of the light spot;

[0014] A pixel sampling module, configured to determine neighboring pixels corresponding to the target pixel according to the shape mask;

[0015] A weight determination module, used to obtain light spot color information corresponding to the target pixel, and determine the color weight value of the target pixel and its neighboring pixels according to the light spot color information;

[0016] The fuzzy processing module is used to perform fuzzy processing on the image to be processed according to the color weight values ​​of the target pixel and its neighboring pixels to obtain a target image.

[0017] In a third aspect, an embodiment of the present disclosure further provides an electronic device, the electronic device comprising:

[0018] one or more processors;

[0019] a storage device for storing one or more programs,

[0020] When the one or more programs are executed by the one or more processors, the one or more processors implement the image blur processing method as described in the embodiment of the present disclosure.

[0021] In a fourth aspect, the embodiments of the present disclosure further provide a storage medium comprising computer executable instructions, which, when executed by a computer processor, are used to execute the image blur processing method as described in the embodiments of the present disclosure.

[0022] The disclosed embodiment obtains an image to be processed and determines a target pixel in the image to be processed; obtains a shape mask corresponding to the target pixel in the image to be processed; the shape of the shape mask corresponds to the shape of a light spot; determines neighboring pixels corresponding to the target pixel according to the shape mask; obtains light spot color information corresponding to the target pixel, and determines color weight values ​​of the target pixel and its neighboring pixels according to the light spot color information; blurs the image to be processed according to the color weight values ​​of the target pixel and its neighboring pixels to obtain a target image, which solves the problem that the light spot generated by the existing blur processing technology has a relatively single internal color, and introduces additional light spot color information in the image blur processing process to achieve a multi-color color adjustment effect inside the light spot in the processed target image. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.

[0024] Figure 1It is a flowchart of an image blur processing method provided by an embodiment of the present disclosure;

[0025] Figure 2 is a schematic diagram of an image to be processed provided by an embodiment of the present disclosure;

[0026] Figure 3 is a schematic diagram of a target image provided by an embodiment of the present disclosure;

[0027] Figure 4 is a schematic diagram of a shape mask provided by an embodiment of the present disclosure;

[0028] Figure 5 It is a schematic diagram of a blurred image provided by the prior art;

[0029] Figure 6 is a schematic diagram of light spot color information provided by an embodiment of the present disclosure;

[0030] Figure 7 is a schematic diagram of another type of light spot color information provided by an embodiment of the present disclosure;

[0031] Figure 8 is a flowchart of another image blur processing method provided by an embodiment of the present disclosure;

[0032] Fig. 9 is a structural schematic diagram of an image blur processing device provided by an embodiment of the present disclosure;

[0033] Fig.10 It is a structural schematic diagram of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION

[0034] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.

[0035] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.

[0036] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.

[0037] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0038] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0039] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0040] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.

[0041] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.

[0042] As an optional but non-limiting implementation, in response to receiving an active request from the user, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0043] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet the relevant laws and regulations may also be applied to the implementation of the present disclosure.

[0044] Figure 1This is a flow chart of an image blurring method provided by an embodiment of the present disclosure. The embodiment of the present disclosure is applicable to the case where a blurring process is performed on an image to be processed based on additional light spot color information to obtain a blurred image with a color adjustment effect of multiple colors within the light spot. The method can be executed by an image blurring device, which can be implemented in the form of software and / or hardware. Optionally, it can be implemented by an electronic device, which can be a mobile terminal, a PC or a server, etc. Figure 1 As shown, the method includes:

[0045] S110: Acquire an image to be processed, and determine a target pixel in the image to be processed.

[0046] The image to be processed is Figure 2 The image to be processed is shown as a picture to be blurred. After the blurring process described in this embodiment, the image to be processed will become a target image with a light spot having a multi-color toning effect in the highlight area, such as Figure 3 This embodiment does not limit the method for obtaining the image to be processed. For example, the image to be processed can be a screenshot captured by a user during the playback of a video, a picture taken in real time by a terminal camera, a picture selected by a user from a terminal album, or a picture downloaded from the Internet.

[0047] The target pixel refers to the pixel in the image to be processed that needs to be blurred. When the entire image to be processed needs to be blurred, each pixel in the image to be processed is the target pixel. When a specified area in the image to be processed needs to be blurred, each pixel in the specified area is the target pixel. Alternatively, the pixel that may become the center of the light spot after blurring can be selected from the image to be processed as the target pixel based on the attribute information such as the brightness value and pixel value of each pixel in the image to be processed.

[0048] S120: Obtain a shape mask corresponding to the target pixel in the image to be processed.

[0049] Among them, the mask is used to cover the image content of a part of the area in the image to be processed, and to display the image content of a specific area, which is equivalent to a window. The shape mask can be a circular mask, a star mask, or a diamond mask, etc. The shape mask can be generated by a program, or obtained by reading an external mask image. In this embodiment, the shape of the shape mask corresponds to the shape of the light spot. For example, the shape of the shape mask is the same as the shape of the light spot, or the shape of the part of the area in the shape mask is the same as the shape of the light spot.

[0050] S130: Determine neighboring pixels corresponding to the target pixel according to the shape mask.

[0051] In this embodiment, for each target pixel in the image to be processed, the pixels around it are sampled according to the shape mask to determine the neighboring pixels corresponding to each target pixel. The process of fuzzy processing the image to be processed is to calculate the fuzzy color value of each target pixel according to the color value and fuzzy weight value of each target pixel, and the color value and fuzzy weight value of the neighboring pixels of each target pixel.

[0052] For example, Figure 4 Each square in the shape mask shown represents a pixel. Figure 4 When the shape mask shown is used to determine the neighboring pixels corresponding to each target pixel in the image to be processed, the gray pixel in the center of the shape mask can be aligned with the target pixel being processed in the image to be processed, and the pixels in the image to be processed that are aligned with the white pixels of the shape mask are the neighboring pixels of the target pixel. Among them, the pixels in the image to be processed that are aligned with the black pixels of the shape mask are pixels that do not need to be considered when processing the target pixel. Of course, the pixels in the image to be processed that are outside the coverage range of the shape mask are also pixels that do not need to be considered when processing the target pixel.

[0053] S140: Acquire light spot color information corresponding to the target pixel, and determine color weight values ​​of the target pixel and its neighboring pixels according to the light spot color information.

[0054] The light spot color information may be color values ​​of multiple colors; or may be a picture containing multiple colors, such as Figure 6 The light spot color map shown; or, it can be other types of information containing multiple color values.

[0055] In the prior art, since the internal color of the light spot depends only on the color values ​​of the central pixel and its neighboring pixels, the color is relatively simple, for example Figure 5 Therefore, in order to add a multi-color toning effect to the light spot, this embodiment configures corresponding light spot color information for each target pixel in the image to be processed. Therefore, in the process of blurring the image to be processed, the light spot color information can be integrated on the basis of the original color of the light spot to generate the following image: Figure 3 The light spot shown contains a toning effect of multiple colors.

[0056] In this embodiment, if the light spot color information is a picture containing multiple colors, in an optional implementation, obtaining the light spot color information corresponding to the target pixel includes: in response to a user's click operation on the target color option, obtaining a target color picture corresponding to the target color option; and using the target color picture as the light spot color information corresponding to the target pixel.

[0057] In this embodiment, a light spot color configuration page may be provided to the user, and a plurality of different color options may be pre-set in the light spot color configuration page, each color option corresponding to a different color picture. One of the color options may be set as a default option, and when the user does not select from the plurality of color options, the color picture corresponding to the default option is used as the light spot color information uniformly corresponding to all target pixels in the image to be processed. When the user clicks on the target color option in the light spot color configuration page, the target color picture corresponding to the target color option is used as the light spot color information corresponding to all target pixels in the image to be processed.

[0058] In this embodiment, if the light spot color information is the color value of multiple colors, the light spot color information corresponding to the target pixel can be determined by obtaining data input by the user, or the light spot color information corresponding to the target pixel can be determined based on multiple selection operations of the user on multiple color options provided, or the light spot color information corresponding to the target pixel can be obtained according to other methods.

[0059] In this embodiment, for each target pixel in the image to be processed, when the light spot color information is a color value of multiple colors, the color weight value of the target pixel and its neighboring pixels can be determined according to a preset rule. For example, a color value can be sequentially selected from the light spot color information corresponding to the target pixel, and used as the color weight value of the target pixel and its neighboring pixels in turn. When the light spot color information is a picture containing multiple colors, the color value corresponding to the target pixel and its neighboring pixels is obtained from the light spot color map corresponding to the target pixel as the color weight value, which is used to change the color value of the pixel and the neighboring pixels of the pixel when the pixel is subsequently blurred.

[0060] Optionally, determining the color weight values ​​of the target pixel and its neighboring pixels based on the light spot color information includes: if the light spot color information is a picture, establishing a coordinate mapping relationship between a shape mask and the light spot color information; and determining the color weight values ​​of the target pixel and its neighboring pixels in the light spot color information based on the coordinate mapping relationship between the shape mask and the light spot color information.

[0061] In this embodiment, if the light spot color information is a picture, the light spot color information can be magnified as follows: Figure 7 As shown in , each square represents a pixel. Since the target pixel and its neighboring pixels are within the shape mask, and the shape mask is enlarged as shown in Figure 4As shown, therefore, for the light spot color information corresponding to each target pixel, a coordinate mapping relationship between the shape mask and the light spot color information can be established. Then, according to the position information of each target pixel and its neighboring pixels in the shape mask, the corresponding mapping position is found in the corresponding light spot color information, and the color weight value of the target pixel and its neighboring pixels is obtained according to the mapping position.

[0062] S150 , performing blur processing on the image to be processed according to the color weight values ​​of the target pixel and its neighboring pixels to obtain a target image.

[0063] In this embodiment, for each target pixel in the image to be processed, the color weight values ​​of the target pixel and its neighboring pixels can be used to change their respective fuzzy weight values ​​accordingly, and then the target pixel can be fuzzy processed using the new fuzzy weight values ​​after the target pixel and its neighboring pixels are changed to obtain the fuzzy color value of the target pixel. After the fuzzy processing is completed for all target pixels in the image to be processed, the target image corresponding to the image to be processed can be obtained, and each light spot in the target image has a variety of color toning effects consistent with the corresponding light spot color information. Among them, the fuzzy weight value of the pixel can represent the contribution of the color value of the pixel in the process of calculating the fuzzy color value of the target pixel.

[0064] The technical solution of the disclosed embodiment is as follows: by acquiring an image to be processed, a target pixel in the image to be processed is determined; a shape mask corresponding to the target pixel in the image to be processed is acquired; the shape of the shape mask corresponds to the shape of a light spot; neighboring pixels corresponding to the target pixel are determined according to the shape mask; light spot color information corresponding to the target pixel is acquired, and color weight values ​​of the target pixel and its neighboring pixels are determined according to the light spot color information; blurring the image to be processed according to the color weight values ​​of the target pixel and its neighboring pixels to obtain a target image, which solves the problem that the internal color of the light spot generated by the existing blurring technology is relatively single, and by introducing additional light spot color information in the image blurring process, a multi-color coloring effect is achieved inside the light spot in the processed target image.

[0065] Figure 8 : is a flow chart of another image blurring method provided by an embodiment of the present disclosure. Based on the above embodiment, the embodiment of the present disclosure further provides another implementation method of obtaining the light spot color information corresponding to the target pixel, the specific implementation steps of determining the color weight value of the target pixel and its neighboring pixels according to the light spot color information, and the specific steps of blurring the image to be processed according to the color weight value of the target pixel and its neighboring pixels. Figure 8 As shown, the method includes:

[0066] S810: Acquire an image to be processed, and determine a target pixel in the image to be processed.

[0067] S820: Obtain a shape mask corresponding to the target pixel in the image to be processed, and determine neighboring pixels corresponding to the target pixel according to the shape mask.

[0068] In this embodiment, since the shape of the shape mask corresponds to the shape of the light spot, the shape of the light spot can be controlled by controlling the shape of the shape mask. A light spot shape configuration page can be provided to the user, and a plurality of different shape options can be provided in the light spot shape configuration page, each shape option corresponding to a different shape mask, for example, a circular mask, a star mask, or a diamond mask.

[0069] In an optional embodiment, obtaining a shape mask corresponding to the target pixel in the image to be processed includes: in response to a user's click operation on a target shape option, obtaining a shape mask corresponding to the target shape option as a shape mask corresponding to the target pixel; and determining neighboring pixels corresponding to the target pixel based on the shape mask includes: aligning a central pixel of the shape mask with the target pixel; and sampling surrounding pixels of the target pixel in the image to be processed according to sampling pixels in the shape mask to obtain neighboring pixels corresponding to the target pixel.

[0070] For example, Figure 4 The shape mask shown in the figure, the center pixel of the shape mask is the gray pixel in the figure, and the sampling pixel is the white pixel in the figure. In the image to be processed, the gray pixels of the shape mask are overlapped with the corresponding target pixels, and the pixels in the image to be processed that are aligned with the white pixels of the shape mask are the neighboring pixels of the target pixels.

[0071] In this embodiment, a shape option can also be selected in the spot shape configuration page to be set as the default option. When the user does not select from multiple shape options, the shape mask corresponding to the default option is used to sample the surrounding pixels of each target pixel in the image to be processed to obtain adjacent pixels corresponding to each target pixel.

[0072] S830: Obtain light spot color information corresponding to the target pixel.

[0073] In this embodiment, in the light spot color configuration page, in addition to setting color options that are uniformly applied to all target pixels, custom options can also be set so that users can freely select a color picture to determine the light spot color information of the picture type corresponding to each target pixel, and ultimately achieve a different light spot color picture corresponding to each target pixel.

[0074] In an optional embodiment, obtaining the light spot color information corresponding to the target pixel includes: in response to a user click operation on a custom option, obtaining a color material picture input by the user corresponding to the image to be processed; based on a coordinate mapping relationship between the color material picture and the image to be processed, capturing a local picture corresponding to the target pixel from the color material picture; and using the local picture as the light spot color information corresponding to the target pixel.

[0075] In this embodiment, when the user clicks the custom option in the light spot color configuration page, the color material picture uploaded by the user is obtained. In order to make the color effect inside the light spot in the final generated target image consistent with or similar to the color effect at the corresponding position of the light spot in the color material picture, a coordinate mapping relationship is established between the color material picture and the image to be processed. Then, according to the coordinate mapping relationship, a local picture matching the target pixel is intercepted at the mapping position of the target pixel in the color material picture as the light spot color information corresponding to the target pixel.

[0076] In an optional embodiment, according to the coordinate mapping relationship between the color material picture and the image to be processed, intercepting a local picture corresponding to the target pixel from the color material picture includes: obtaining a first position of the target pixel in the image to be processed; according to the coordinate mapping relationship between the color material picture and the image to be processed, determining a second position corresponding to the first position in the color material picture; and intercepting the color material picture within a preset range centered on the second position as the local picture corresponding to the target pixel.

[0077] In this embodiment, for each target pixel in the image to be processed, the first position represents the position information of the target pixel in the coordinate system of the image to be processed, and the second position represents the position information of the target pixel in the coordinate system of the color material image calculated according to the coordinate mapping relationship. When the local image corresponding to the target pixel is intercepted with the second position as the center, the image with the same size as the shape mask can be intercepted as the local image corresponding to the target pixel, and the image with a larger size than the shape mask can also be intercepted as the local image corresponding to the target pixel.

[0078] S840: If the light spot color information is a picture, establish a coordinate mapping relationship between a shape mask and the light spot color information.

[0079] In this embodiment, the light spot color information of the picture type can be magnified as follows: Figure 7 As shown in , each square represents a pixel. Since each target pixel and its neighboring pixels of the image to be processed are within the shape mask, and the shape mask is enlarged as shown in Figure 4As shown, therefore, a coordinate mapping relationship between the light spot color information corresponding to each target pixel and the shape mask can be established respectively, so that the color weight values ​​of each target pixel and its neighboring pixels can be found in the corresponding light spot color information according to the coordinate mapping relationship.

[0080] S850: Determine color weight values ​​of the target pixel and its neighboring pixels in the light spot color information according to a coordinate mapping relationship between the shape mask and the light spot color information.

[0081] In an optional embodiment, the third position of the target pixel and its neighboring pixels in the shape mask is obtained; based on the coordinate mapping relationship between the shape mask and the light spot color information, the fourth position corresponding to each of the third positions is determined in the light spot color information; and the color value corresponding to each of the fourth positions is obtained in the light spot color information as the color weight value of the target pixel and its neighboring pixels.

[0082] In this embodiment, if the light spot color information is a picture, and the shape mask has the same size as the light spot color information, then the third position of a pixel in the shape mask is the same as the fourth position of the pixel in the corresponding light spot color information. At this time, the color weight value of each pixel can be directly obtained from the light spot color information without using the coordinate mapping relationship. Exemplarily, the color weight value of the pixel located in the first row and sixth column in the shape mask is the color value of the first row and sixth column in the corresponding light spot color information. If the shape mask is different in size from the light spot color information, after determining the position of the target pixel and its neighboring pixels in the shape mask, the corresponding position of each pixel in the corresponding light spot color information is calculated according to the coordinate mapping relationship, and then the color value of the corresponding position is used as the color weight value of the pixel.

[0083] S860: Perform blur processing on the image to be processed according to the color weight values ​​of the target pixel and its neighboring pixels to obtain a target image.

[0084] In this embodiment, for each target pixel and its neighboring pixels of the image to be processed, their respective color weight values ​​can be used to change their respective fuzzy weight values, and then the changed new fuzzy weight values ​​can be used to blur each target pixel to obtain a target image that achieves a multi-color color adjustment effect inside the light spot.

[0085] In an optional embodiment, the image to be processed is blurred according to the color weight values ​​of the target pixel and its neighboring pixels, including: obtaining the fuzzy weight value and pixel color value corresponding to each pixel in the target pixel and its neighboring pixels; multiplying the color weight value and the fuzzy weight value of each pixel to obtain a new fuzzy weight value; multiplying the new fuzzy weight value of each pixel by the pixel color value and adding them up to obtain a first value; taking the accumulated sum of the new fuzzy weight values ​​of each pixel as a second value; and taking the ratio of the first value to the second value as the fuzzy color value of the target pixel.

[0086] In this embodiment, from the perspective of the fuzzy formula, before introducing the light spot color information, the fuzzy formula used in the fuzzy processing of each target pixel in the image to be processed is as follows:

[0087]

[0088] Where C is the blurred color value of the target pixel, h and w are the height and width of the shape mask, respectively, and P i,j Represents the color value of the pixel at the corresponding shape mask position (i, j), W i,j represents the fuzzy weight value of the pixel corresponding to the shape mask position (i, j), and F is the processing function of the fuzzy weight value.

[0089] After introducing the spot color information, the fuzzy formula used in the fuzzy processing of each target pixel in the processed image is as follows:

[0090]

[0091] Among them, CW i,j It is the color weight value of the pixel at the corresponding shape mask position (i, j) in the corresponding light spot color information.

[0092] This embodiment introduces corresponding light spot color information for each target pixel of the image to be processed, so that each light spot in the target image corresponding to the image to be processed has the same color effect as the corresponding light spot color information, that is, customized color changes are achieved within the light spot.

[0093] The technical solution of the embodiment of the present disclosure is to obtain an image to be processed, determine a target pixel in the image to be processed; obtain a shape mask corresponding to the target pixel in the image to be processed; the shape of the shape mask corresponds to the shape of a light spot; determine neighboring pixels corresponding to the target pixel according to the shape mask; obtain light spot color information corresponding to the target pixel, and determine the color weight value of the target pixel and its neighboring pixels according to the light spot color information; blur the image to be processed according to the color weight value of the target pixel and its neighboring pixels to obtain a target image, so as to solve the problem that the internal color of the light spot generated by the existing blur processing technology is relatively single, and introduce additional light spot color information in the image blur processing process to achieve a multi-color color adjustment effect inside the light spot in the processed target image.

[0094] Fig. 9 is a schematic diagram of the structure of an image blur processing device provided by an embodiment of the present disclosure, such as Fig. 9 As shown, the device includes: a first acquisition module 910, a second acquisition module 920, a pixel sampling module 930, a weight determination module 940 and a blur processing module 950.

[0095] A first acquisition module 910 is used to acquire an image to be processed and determine a target pixel in the image to be processed;

[0096] The second acquisition module 920 is used to acquire a shape mask corresponding to the target pixel in the image to be processed; the shape of the shape mask corresponds to the shape of the light spot;

[0097] A pixel sampling module 930, configured to determine neighboring pixels corresponding to the target pixel according to the shape mask;

[0098] A weight determination module 940 is used to obtain light spot color information corresponding to the target pixel, and determine the color weight values ​​of the target pixel and its neighboring pixels according to the light spot color information;

[0099] The fuzzy processing module 950 is used to perform fuzzy processing on the image to be processed according to the color weight values ​​of the target pixel and its neighboring pixels to obtain a target image.

[0100] The technical solution of the embodiment of the present disclosure is to obtain an image to be processed, determine a target pixel in the image to be processed; obtain a shape mask corresponding to the target pixel in the image to be processed; the shape of the shape mask corresponds to the shape of a light spot; determine neighboring pixels corresponding to the target pixel according to the shape mask; obtain light spot color information corresponding to the target pixel, and determine the color weight value of the target pixel and its neighboring pixels according to the light spot color information; blur the image to be processed according to the color weight value of the target pixel and its neighboring pixels to obtain a target image, so as to solve the problem that the internal color of the light spot generated by the existing blur processing technology is relatively single, and introduce additional light spot color information in the image blur processing process to achieve a multi-color color adjustment effect inside the light spot in the processed target image.

[0101] Optionally, the weight determination module 940 includes: a selection unit for

[0102] In response to a user clicking operation on a target color option, acquiring a target color picture corresponding to the target color option;

[0103] The target color picture is used as the light spot color information corresponding to the target pixel.

[0104] Optionally, the weight determination module 940 includes: a custom unit for

[0105] In response to a user clicking operation on a custom option, obtaining a color material picture input by the user corresponding to the image to be processed;

[0106] According to the coordinate mapping relationship between the color material picture and the image to be processed, intercepting a local picture corresponding to the target pixel from the color material picture;

[0107] The local image is used as the light spot color information corresponding to the target pixel.

[0108] Optionally, the custom unit is used to:

[0109] Acquire a first position of the target pixel in the image to be processed;

[0110] Determining a second position corresponding to the first position in the color material picture according to a coordinate mapping relationship between the color material picture and the image to be processed;

[0111] A color material image within a preset range is captured with the second position as the center as a local image corresponding to the target pixel.

[0112] Optionally, the weight determination module 940 includes:

[0113] A mapping unit, configured to establish a coordinate mapping relationship between a shape mask and the light spot color information if the light spot color information is a picture;

[0114] The determination unit is used to determine the color weight values ​​of the target pixel and its neighboring pixels in the light spot color information according to the coordinate mapping relationship between the shape mask and the light spot color information.

[0115] Optionally, determine the unit, including:

[0116] Obtaining a third position of the target pixel and its neighboring pixels in the shape mask;

[0117] determining, in the light spot color information, fourth positions corresponding to the third positions according to a coordinate mapping relationship between the shape mask and the light spot color information;

[0118] The color value corresponding to each of the fourth positions is obtained from the light spot color information as a color weight value of the target pixel and its neighboring pixels.

[0119] Optionally, the fuzzy processing module 950 is used to:

[0120] Obtaining a fuzzy weight value and a pixel color value corresponding to each pixel in the target pixel and its neighboring pixels;

[0121] Multiply the color weight value and fuzzy weight value of each pixel to obtain a new fuzzy weight value;

[0122] Multiplying the new fuzzy weight value of each pixel by the pixel color value and accumulating the values ​​to obtain a first value;

[0123] The accumulated sum of the new fuzzy weight values ​​of each pixel is used as the second value;

[0124] The ratio of the first value to the second value is used as the fuzzy color value of the target pixel.

[0125] Optionally, the second acquisition module 920 is used to:

[0126] In response to a user clicking operation on a target shape option, acquiring a shape mask corresponding to the target shape option as a shape mask corresponding to the target pixel;

[0127] The pixel sampling module 930 is used to:

[0128] According to the sampled pixels in the shape mask, pixels surrounding the target pixel in the image to be processed are sampled to obtain neighboring pixels corresponding to the target pixel.

[0129] The image blur processing device provided in the embodiments of the present disclosure can execute the image blur processing method provided in any embodiment of the present disclosure, and has the corresponding functional modules and beneficial effects of the execution method.

[0130] It is worth noting that the various units and modules included in the above-mentioned device are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the protection scope of the embodiments of the present disclosure.

[0131] Fig.10 This is a schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure. Fig.10 , which shows an electronic device (eg, Fig.10 The terminal device in the embodiment of the present disclosure may include but is not limited to mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Fig.10 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0132] like Fig.10 As shown, the electronic device 500 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage device 508 into a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the electronic device 500 are also stored. The processing device 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An edit / output (I / O) interface 505 is also connected to the bus 504.

[0133] Typically, the following devices may be connected to the I / O interface 505: an input device 506 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 507 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 508 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 509. The communication device 509 may allow the electronic device 500 to communicate with other devices wirelessly or by wire to exchange data. Although Fig.10The electronic device 500 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.

[0134] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 509, or installed from a storage device 508, or installed from a ROM 502. When the computer program is executed by the processing device 501, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.

[0135] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0136] The electronic device provided in the embodiment of the present disclosure and the image blur processing method provided in the above embodiment belong to the same inventive concept. The technical details not fully described in this embodiment can be referred to the above embodiment, and this embodiment has the same beneficial effects as the above embodiment.

[0137] The embodiment of the present disclosure provides a computer storage medium on which a computer program is stored. When the program is executed by a processor, the image blur processing method provided by the above embodiment is implemented.

[0138] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0139] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.

[0140] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0141] The above-mentioned computer-readable medium carries one or more programs. When the above-mentioned one or more programs are executed by the electronic device, the electronic device: obtains the image to be processed, determines the target pixel in the image to be processed; obtains the shape mask corresponding to the target pixel in the image to be processed; the shape of the shape mask corresponds to the shape of the light spot; determines the neighboring pixels corresponding to the target pixel according to the shape mask; obtains the light spot color information corresponding to the target pixel, and determines the color weight value of the target pixel and its neighboring pixels according to the light spot color information; blurs the image to be processed according to the color weight value of the target pixel and its neighboring pixels to obtain the target image.

[0142] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages ​​or combinations thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0143] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0144] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware. The name of a unit does not limit the unit itself in some cases. For example, the first acquisition unit may also be described as a "unit for acquiring at least two Internet Protocol addresses".

[0145] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0146] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0147] According to one or more embodiments of the present disclosure, Example 1 provides an image blur processing method, including:

[0148] Acquire an image to be processed, and determine a target pixel in the image to be processed;

[0149] Acquire a shape mask corresponding to the target pixel in the image to be processed; the shape of the shape mask corresponds to the shape of the light spot;

[0150] Determining neighboring pixels corresponding to the target pixel according to the shape mask;

[0151] Acquire light spot color information corresponding to the target pixel, and determine color weight values ​​of the target pixel and its neighboring pixels according to the light spot color information;

[0152] According to the color weight values ​​of the target pixel and its neighboring pixels, the image to be processed is fuzzy processed to obtain a target image.

[0153] According to one or more embodiments of the present disclosure, Example 2 is a method according to Example 1, wherein obtaining the light spot color information corresponding to the target pixel includes:

[0154] In response to a user clicking operation on a target color option, acquiring a target color picture corresponding to the target color option;

[0155] The target color picture is used as the light spot color information corresponding to the target pixel.

[0156] According to one or more embodiments of the present disclosure, Example 3 is a method according to Example 1, wherein obtaining the light spot color information corresponding to the target pixel includes:

[0157] In response to a user clicking operation on a custom option, obtaining a color material picture input by the user corresponding to the image to be processed;

[0158] According to the coordinate mapping relationship between the color material picture and the image to be processed, intercepting a local picture corresponding to the target pixel from the color material picture;

[0159] The local image is used as the light spot color information corresponding to the target pixel.

[0160] According to one or more embodiments of the present disclosure, Example 4 is the method according to Example 3, wherein the step of intercepting a local image corresponding to the target pixel from the color material image according to a coordinate mapping relationship between the color material image and the image to be processed includes:

[0161] Acquire a first position of the target pixel in the image to be processed;

[0162] Determining a second position corresponding to the first position in the color material picture according to a coordinate mapping relationship between the color material picture and the image to be processed;

[0163] A color material image within a preset range is captured with the second position as the center as a local image corresponding to the target pixel.

[0164] According to one or more embodiments of the present disclosure, Example 5 is the method according to Example 1, wherein determining the color weight values ​​of the target pixel and its neighboring pixels according to the light spot color information includes:

[0165] If the light spot color information is a picture, establishing a coordinate mapping relationship between the shape mask and the light spot color information;

[0166] According to the coordinate mapping relationship between the shape mask and the light spot color information, the color weight values ​​of the target pixel and its neighboring pixels in the light spot color information are determined.

[0167] According to one or more embodiments of the present disclosure, Example 6 is the method according to Example 5, wherein determining the color weight values ​​of the target pixel and its neighboring pixels in the light spot color information according to the coordinate mapping relationship between the shape mask and the light spot color information includes:

[0168] Obtaining a third position of the target pixel and its neighboring pixels in the shape mask;

[0169] determining, in the light spot color information, fourth positions corresponding to the third positions according to a coordinate mapping relationship between the shape mask and the light spot color information;

[0170] The color value corresponding to each of the fourth positions is obtained from the light spot color information as a color weight value of the target pixel and its neighboring pixels.

[0171] According to one or more embodiments of the present disclosure, Example 7 According to the method described in any one of Examples 1 to 6, blurring the image to be processed according to the color weight values ​​of the target pixel and its neighboring pixels includes:

[0172] Obtaining a fuzzy weight value and a pixel color value corresponding to each pixel in the target pixel and its neighboring pixels;

[0173] Multiply the color weight value and fuzzy weight value of each pixel to obtain a new fuzzy weight value;

[0174] Multiplying the new fuzzy weight value of each pixel by the pixel color value and accumulating the values ​​to obtain a first value;

[0175] The accumulated sum of the new fuzzy weight values ​​of each pixel is used as the second value;

[0176] The ratio of the first value to the second value is used as the fuzzy color value of the target pixel.

[0177] According to one or more embodiments of the present disclosure, Example 8 is a method according to Example 1, wherein obtaining a shape mask corresponding to the target pixel in the image to be processed includes:

[0178] In response to a user clicking operation on a target shape option, acquiring a shape mask corresponding to the target shape option as a shape mask corresponding to the target pixel;

[0179] And, determining the neighboring pixels corresponding to the target pixel according to the shape mask includes:

[0180] Aligning a center pixel of the shape mask with the target pixel;

[0181] According to the sampled pixels in the shape mask, pixels surrounding the target pixel in the image to be processed are sampled to obtain neighboring pixels corresponding to the target pixel.

[0182] According to one or more embodiments of the present disclosure, Example 9 provides an image blur processing device, including:

[0183] A first acquisition module is used to acquire an image to be processed and determine a target pixel in the image to be processed;

[0184] A second acquisition module is used to acquire a shape mask corresponding to the target pixel in the image to be processed; the shape of the shape mask corresponds to the shape of the light spot;

[0185] A pixel sampling module, configured to determine neighboring pixels corresponding to the target pixel according to the shape mask;

[0186] A weight determination module, used to obtain light spot color information corresponding to the target pixel, and determine the color weight value of the target pixel and its neighboring pixels according to the light spot color information;

[0187] The fuzzy processing module is used to perform fuzzy processing on the image to be processed according to the color weight values ​​of the target pixel and its neighboring pixels to obtain a target image.

[0188] According to one or more embodiments of the present disclosure, Example 10 provides an electronic device, the electronic device comprising:

[0189] one or more processors;

[0190] a storage device for storing one or more programs,

[0191] When the one or more programs are executed by the one or more processors, the one or more processors implement the image blur processing method as described in any one of Examples 1-8.

[0192] According to one or more embodiments of the present disclosure, Example 11 provides a storage medium containing computer executable instructions, which, when executed by a computer processor, are used to perform the image blur processing method as described in any one of Examples 1-8.

[0193] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.

[0194] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.

[0195] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.

Claims

1. A method for image blurring, characterized in that: include: Acquire an image to be processed, and determine a target pixel in the image to be processed; Obtaining a shape mask corresponding to the target pixel in the image to be processed; The shape of the shape mask corresponds to the shape of the light spot; Determining neighboring pixels corresponding to the target pixel according to the shape mask; Acquire light spot color information corresponding to the target pixel, and determine color weight values ​​of the target pixel and its neighboring pixels according to the light spot color information; According to the color weight values ​​of the target pixel and its neighboring pixels, the image to be processed is fuzzy processed to obtain a target image.

2. The method according to claim 1, characterized in that The acquiring the light spot color information corresponding to the target pixel includes: In response to a user clicking operation on a target color option, acquiring a target color picture corresponding to the target color option; The target color picture is used as the light spot color information corresponding to the target pixel.

3. The method according to claim 1, characterized in that The acquiring the light spot color information corresponding to the target pixel includes: In response to a user clicking operation on a custom option, obtaining a color material picture input by the user corresponding to the image to be processed; According to the coordinate mapping relationship between the color material picture and the image to be processed, intercepting a local picture corresponding to the target pixel from the color material picture; The local image is used as the light spot color information corresponding to the target pixel.

4. The method according to claim 3, characterized in that The extracting a partial picture corresponding to the target pixel from the color material picture according to the coordinate mapping relationship between the color material picture and the image to be processed comprises: Acquire a first position of the target pixel in the image to be processed; Determining a second position corresponding to the first position in the color material picture according to a coordinate mapping relationship between the color material picture and the image to be processed; A color material image within a preset range is captured with the second position as the center as a local image corresponding to the target pixel.

5. The method according to claim 1, characterized in that The step of determining the color weight values ​​of the target pixel and its neighboring pixels according to the light spot color information includes: If the light spot color information is a picture, establishing a coordinate mapping relationship between the shape mask and the light spot color information; According to the coordinate mapping relationship between the shape mask and the light spot color information, the color weight values ​​of the target pixel and its neighboring pixels in the light spot color information are determined.

6. The method according to claim 5, characterized in that The step of determining the color weight values ​​of the target pixel and its neighboring pixels in the light spot color information according to the coordinate mapping relationship between the shape mask and the light spot color information includes: Obtaining a third position of the target pixel and its neighboring pixels in the shape mask; determining, in the light spot color information, fourth positions corresponding to the third positions according to a coordinate mapping relationship between the shape mask and the light spot color information; The color value corresponding to each of the fourth positions is obtained from the light spot color information as a color weight value of the target pixel and its neighboring pixels.

7. The method according to any one of claims 1 to 6, characterized in that The fuzzy processing of the image to be processed according to the color weight values ​​of the target pixel and its neighboring pixels includes: Obtaining a fuzzy weight value and a pixel color value corresponding to each pixel in the target pixel and its neighboring pixels; Multiply the color weight value and fuzzy weight value of each pixel to obtain a new fuzzy weight value; Multiplying the new fuzzy weight value of each pixel by the pixel color value and accumulating the values ​​to obtain a first value; The accumulated sum of the new fuzzy weight values ​​of each pixel is used as the second value; The ratio of the first value to the second value is used as the fuzzy color value of the target pixel.

8. The method according to claim 1, characterized in that The obtaining of a shape mask corresponding to the target pixel in the image to be processed includes: In response to a user clicking operation on a target shape option, acquiring a shape mask corresponding to the target shape option as a shape mask corresponding to the target pixel; And, determining the neighboring pixels corresponding to the target pixel according to the shape mask includes: Aligning a center pixel of the shape mask with the target pixel; According to the sampled pixels in the shape mask, pixels surrounding the target pixel in the image to be processed are sampled to obtain neighboring pixels corresponding to the target pixel.

9. An image blur processing device, characterized in that: include: A first acquisition module is used to acquire an image to be processed and determine a target pixel in the image to be processed; A second acquisition module is used to acquire a shape mask corresponding to the target pixel in the image to be processed; the shape of the shape mask corresponds to the shape of the light spot; A pixel sampling module, configured to determine neighboring pixels corresponding to the target pixel according to the shape mask; A weight determination module, used to obtain light spot color information corresponding to the target pixel, and determine the color weight value of the target pixel and its neighboring pixels according to the light spot color information; The fuzzy processing module is used to perform fuzzy processing on the image to be processed according to the color weight values ​​of the target pixel and its neighboring pixels to obtain a target image.

10. An electronic device, characterized in that: The electronic device comprises: one or more processors; a 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 image blur processing method as described in any one of claims 1 to 8.

11. A storage medium comprising computer executable instructions, wherein the computer executable instructions are used to perform the image blur processing method according to any one of claims 1 to 8 when executed by a computer processor.

Citation Information

Patent Citations

  • Pixel blurring method and device

    CN105608669A

  • Light spot blurring method and device, storage medium and computer equipment

    CN111583104A

  • Image light spot adding method and device

    CN112561777A

  • High-quality post-rendering depth blur

    US20150279056A1