Method for generating damaged two-dimensional code image
By pre-processing, damaged processing, fusion processing and augmented reality effect processing, highly realistic damaged QR code samples are generated, which solves the problems of low authenticity and insufficient diversity of damaged QR codes in the existing technology, and significantly improves the visual reality and adaptability of QR code images.
Patent Information
- Application Number
- CN202510187093.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-20
- Publication Date
- 2025-04-25
AI Technical Summary
The damaged QR codes generated by the prior art are not very authentic, lack of diversity and low reproduction rate, making it difficult to meet the real simulation requirements for the damaged characteristics of QR codes in diversified and complex environments.
By obtaining ideal QR codes and background images, pre-processing, damaged processing, fusion processing and augmented reality effects processing, generate highly realistic damaged QR code samples. The specific steps include converting the ideal QR code into a dot matrix QR code and performing low contrast processing; randomly generating stains and blurring; fusing the QR code with the background image, and performing affine transformation and perspective transformation to augment the reality effect.
The generated damaged QR code images have significantly enhanced visual reality, which can show a high degree of adaptability and rich expression in diverse application scenarios, improving the readability and expressiveness of QR code images.
Smart Images

Figure CN119886184A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of barcode generation, and in particular to a method for generating a damaged two-dimensional code image. Background Art
[0002] With its efficient information storage and transmission capabilities, QR codes are widely used in areas such as product identification, payment, logistics tracking, and information sharing, becoming a key tool for modern business. However, in actual applications, QR codes are often affected by adverse environmental factors such as dirt, scratches, and wear, which reduce their image quality and thus affect image scanning and recognition. These damages not only affect the visual perception of the QR code to the user, but may also result in the inability to accurately identify the information it carries, causing inconvenience to users and economic losses, such as retail checkout delays and logistics package losses or delays.
[0003] Current technologies mainly focus on generating ideal QR code images, but are unable to simulate actual QR code damage scenarios, resulting in a lack of sufficient and real data samples to support the research on the degree of QR code damage. In view of this, there is an urgent need for a method that can fully simulate the damage characteristics of QR codes in diverse and complex environments, so as to generate highly realistic damaged QR code samples. Summary of the invention
[0004] The present invention provides a method for generating a damaged two-dimensional code image, which is used to solve the defects of damaged two-dimensional codes generated by the prior art, such as low authenticity, insufficient diversity and low reproduction rate, and provides sufficient and real data samples for the research on the damaged characteristics of two-dimensional code images.
[0005] The present invention provides a method for generating a damaged two-dimensional code image, comprising:
[0006] Get the ideal QR code and background image;
[0007] Preprocess the ideal QR code;
[0008] Perform damage processing on the pre-processed QR code;
[0009] Merge the damaged QR code with the background image;
[0010] Performing augmented reality effect processing on the fused QR code image;
[0011] Output the damaged QR code image.
[0012] According to a method for generating a damaged two-dimensional code image provided by the present invention, the preprocessing of the ideal two-dimensional code includes:
[0013] Convert the ideal QR code into a dot matrix QR code consisting of regularly arranged dots;
[0014] Perform low contrast processing on dot matrix QR codes.
[0015] According to a method for generating a damaged two-dimensional code image provided by the present invention, the method of converting an ideal two-dimensional code into a dot matrix two-dimensional code composed of regularly arranged dots comprises:
[0016] Convert the ideal QR code to a grayscale QR code;
[0017] Set the dot parameters of the dot matrix QR code and the preset threshold of the grayscale QR code;
[0018] Traverse the pixel points on the grayscale QR code. If the grayscale value of a pixel point on the grayscale QR code is lower than the preset threshold, draw a dot at the position corresponding to the pixel point.
[0019] The drawn dots generate a dot matrix QR code according to the dot parameters.
[0020] According to a method for generating a damaged two-dimensional code image provided by the present invention, the damaged processing of the pre-processed two-dimensional code includes:
[0021] Randomly generate multiple irregular stain shapes and perform a first fuzzy process;
[0022] Overlay stains onto random locations of the QR code and adjust the transparency of the stains;
[0023] Performing a second blurring process on the QR code after the stains are superimposed;
[0024] Apply fading effect to the QR code;
[0025] Apply wrinkle effect to the QR code.
[0026] According to a method for generating a damaged two-dimensional code image provided by the present invention, when stains are superimposed on the two-dimensional code, formula (1) is used:
[0027]
[0028] Among them, Stain(x,y) is the grayscale value of the stain, I(x,y,c) is the color channel of the QR code before adding the stain, I′(x,y,c) is the color channel of the QR code after adding the stain, C is a random color, α is the transparency of the stain, and its adjustment range is between 0.3 and 0.8.
[0029] According to a method for generating a damaged two-dimensional code image provided by the present invention, the first and second blurring processes are both performed using formula (2):
[0030]
[0031] Among them, I′(x,y) is the pixel value at the position (x,y) of the stain or QR code after blurring, I(x,y) is the pixel value at the position (x,y) of the stain or QR code before blurring, and G(i,j) is a Gaussian kernel of size (2k+1)×(2k+1).
[0032] According to a method for generating a damaged two-dimensional code image provided by the present invention, the damaged two-dimensional code is fused with the background image using formula (3):
[0033]
[0034] Where: I output (x, y) represents the pixel value of the fused QR code image at position (x, y), I source (x′, y′) represents the pixel value of the QR code at position (x′, y′) before fusion. is a normalization factor, λ is a parameter that controls the smoothness of the fusion, and Ω represents the range of the neighborhood considered during the fusion process.
[0035] According to a method for generating a damaged two-dimensional code image provided by the present invention, after the two-dimensional code and the background image are fused, the method further includes adjusting the brightness, hue and saturation of the fused two-dimensional code image.
[0036] According to a method for generating a damaged two-dimensional code image provided by the present invention, the step of performing augmented reality effect processing on the fused two-dimensional code image comprises:
[0037] Perform affine transformation and perspective transformation on the QR code image;
[0038] Adding random noise to the two-dimensional code image to form a noisy two-dimensional code image;
[0039] Performing a third fuzzy process on the noise two-dimensional code image to form a fuzzy two-dimensional code image;
[0040] Adjust the contrast, brightness and grayscale of the blurred QR code image.
[0041] According to a method for generating a damaged two-dimensional code image provided by the present invention, the third blurring process is implemented by using formula (4):
[0042]
[0043] Where: I noisy (u,v) is the pixel value of the noise QR code image at position (u,v), I blurred (x, y) is the pixel value of the noise QR code image at position (x, y) after the third blurring process. is the Gaussian kernel function, σ is the blur degree parameter; K is the normalization constant, and Ω is the neighborhood range considered in the blur process.
[0044] The present invention provides a method for generating a damaged two-dimensional code image, which effectively simulates various damaged features such as wrinkles, stains and wear by combining traditional image processing technology, thereby generating a damaged two-dimensional code image that is closer to actual usage and significantly enhancing its visual realism. In this process, the present scheme also comprehensively considers the combined effects of various damaged features to ensure that the generated two-dimensional code image can show high adaptability and rich expression forms in a variety of application scenarios. In terms of the visual effect finally presented by the two-dimensional code image, the present scheme retains the fine-grained feature information of the two-dimensional code image to the greatest extent to improve the readability and expressiveness of small-sized damaged two-dimensional codes. In addition, the present scheme also adopts a Poisson's ratio fusion algorithm to effectively smooth the boundary traces between the two-dimensional code image and the background image, so that the fused two-dimensional code image is more natural and harmonious in visual effect. By using affine transformation and perspective transformation technology, the realism of the two-dimensional code is further improved, ensuring that the damaged effect of the two-dimensional code image is natural and realistic. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0046] Figure 1 It is a flow chart of a method for generating a damaged two-dimensional code image provided by the present invention;
[0047] Figure 2 It is a schematic diagram of the process of converting an ideal QR code into a dot matrix QR code;
[0048] Figure 3 It is a schematic diagram of the process of damaging the pre-processed QR code;
[0049] Figure 4 It is a schematic diagram of the process of performing augmented reality effect processing on the fused QR code image;
[0050] Figure 5 It is a schematic diagram of a system for generating a damaged two-dimensional code image provided by the present invention. DETAILED DESCRIPTION
[0051] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0052] Combine the following Figure 1 A method for generating a damaged two-dimensional code image according to the present invention is described, comprising:
[0053] Get the ideal QR code and background image;
[0054] Preprocess the ideal QR code;
[0055] Perform damage processing on the pre-processed QR code;
[0056] Merge the damaged QR code with the background image;
[0057] Performing augmented reality effect processing on the fused QR code image;
[0058] Output the damaged QR code image.
[0059] The ideal two-dimensional code is preprocessed, and the specific steps are: first, the ideal two-dimensional code is converted into a dot matrix two-dimensional code composed of regularly arranged dots; then, the dot matrix two-dimensional code is processed with low contrast.
[0060] Furthermore, if Figure 2 As shown, the ideal two-dimensional code is converted into a dot matrix two-dimensional code composed of regularly arranged dots, including: first, grayscale processing is performed on the ideal two-dimensional code to convert the ideal two-dimensional code into a grayscale two-dimensional code; then, the dot parameters of the dot matrix two-dimensional code are set, including the size, shape, spacing, etc. of the dots, and the preset threshold of the grayscale two-dimensional code is set to determine the drawing position of the dots; next, all pixel points on the grayscale two-dimensional code are traversed, and if the grayscale value of a pixel point on the grayscale two-dimensional code is lower than the preset threshold, a dot is drawn at the position corresponding to the pixel point; finally, the drawn dots generate a dot matrix two-dimensional code according to the dot parameters.
[0061] Furthermore, after converting the ideal QR code into a dot matrix QR code, the dot matrix QR code is further subjected to low contrast processing. Specifically, the contrast of the dot matrix QR code is changed by linearly scaling each pixel value on the dot matrix QR code, thereby improving its readability in complex backgrounds and optimizing the visual effect.
[0062] The pre-processed QR code is damaged. The specific steps are as follows: Figure 3As shown, a random number generator is used to create multiple irregular polygonal areas to simulate stains of different shapes, and the stain shapes are first blurred to make their shapes smooth; the stains are superimposed on random positions of the QR code and the transparency of the stains is adjusted using formula (1):
[0063]
[0064] Among them, Stain(x,y) is the grayscale value of the stain, I(x,y,c) is the color channel of the QR code before adding the stain, I′(x,y,c) is the color channel of the QR code after adding the stain, C is a random color, α is the transparency of the stain, and its adjustment range is between 0.3 and 0.8.
[0065] Furthermore, a second blurring process is performed on the two-dimensional code after the stain is superimposed. It should be noted that both the first blurring process and the second blurring process are performed using formula (2):
[0066]
[0067] Among them, I′(x,y) is the pixel value at the position (x,y) of the stain or QR code after blurring, I(x,y) is the pixel value at the position (x,y) of the stain or QR code before blurring, and G(i,j) is a Gaussian kernel of size (2k+1)×(2k+1).
[0068] Furthermore, the damage processing of the QR code also includes fading effect processing of the QR code, that is, reducing the contrast of the QR code and simulating the fading effect of the QR code, using formula (5):
[0069]
[0070] Among them, I(x, y) is the pixel value before the QR code fading effect is processed, I′(x, y) is the pixel value after the QR code fading effect is processed, and C original is the contrast of the QR code before fading effect processing, and C is the contrast of the QR code after fading effect processing, and the adjustment range is between 0.5 and 0.8.
[0071] Furthermore, the damage processing of the QR code also includes processing the QR code with a wrinkle effect, that is, by drawing random lines on the QR code to simulate the wrinkle effect of the QR code. Specifically, the starting points x1, x2, x3... and the ending points y1, y2, y3... of the lines are randomly generated on the QR code, and then the lines are drawn and the color, thickness, style and other characteristics of the lines are randomly set to simulate the wrinkle effect of the QR code, using formula (6):
[0072] I′(x,y)=I(x,y)+Line((x1,y1),(x2,y2),(x3,y3)……) (6)
[0073] Among them, I(x,y) is the pixel value before the QR code is processed with the folding effect, I′(x,y) is the pixel value after the QR code is processed with the folding effect, and Line((x1,y1),(x2,y2),(x3,y3)…) is the line simulating the folding effect.
[0074] After completing the damage processing of the QR code, the next step is to fuse the QR code with the background image to obtain a QR code image that contains both background image information and QR code information. Before fusing the QR code with the background image, in order to ensure their compatibility in the subsequent fusion process, the size of the QR code and the background image should be adjusted to the same size, and a mask of the same size should be created for the QR code. The mask is used to specify the fusion area, which can ensure that the QR code is correctly placed at the expected position in the background image. After determining the size and fusion area of the QR code and the background image, the Poisson's ratio fusion algorithm is applied to fuse the QR code with the background image, using formula (3):
[0075]
[0076] Where: I output (x, y) represents the pixel value of the fused QR code image at position (x, y), I source (x′, y′) represents the pixel value of the QR code at position (x′, y′) before fusion. is a normalization factor, λ is a parameter that controls the smoothness of the fusion, and Ω represents the range of the neighborhood considered during the fusion process.
[0077] The Poisson's ratio fusion algorithm can effectively eliminate the boundary difference between the two-dimensional code and the background image, making the fused two-dimensional code image more natural and coordinated visually.
[0078] Furthermore, after the fusion of the QR code and the background image is completed, the brightness, hue and saturation of the fused QR code image need to be optimized and adjusted to further enhance the visual consistency between the QR code and the background image.
[0079] In addition to ensuring that the fusion effect of the QR code and the background image is harmonious and natural, this application also aims to improve the user's actual effect of the damaged QR code image in specific application scenarios.
[0080] The fused QR code image is processed with augmented reality effect. The specific implementation steps are as follows: Figure 4As shown, affine transformation and perspective transformation are applied to simulate the visual effect of the QR code image in actual applications. This process ensures the natural presentation of the QR code image under different viewing angles by adjusting the geometric viewing angle of the QR code image. The affine transformation processing of the QR code image includes translation, scaling, flipping, rotation and shearing, which are performed using formula (7):
[0081]
[0082] Among them, (x, y) is the coordinate of the two-dimensional code image before transformation, (x′, y′) is the coordinate of the two-dimensional code image after transformation, a, b, c, d are the elements of the affine transformation matrix, t x ,t y are the translation components of the two-dimensional code image in the X direction and the Y direction respectively.
[0083] The perspective transformation of the two-dimensional code image uses the principle that the perspective center, image point, and target point are collinear. The two-dimensional code image is mapped into three-dimensional space and then reversely mapped into a two-dimensional plane using formula (8):
[0084]
[0085] Among them, (x, y, 1) is the coordinate of the QR code image before transformation, (x′, y′, w′) is the coordinate of the QR code image after transformation, is the perspective transformation matrix.
[0086] Furthermore, in order to further enhance the realistic effect of the two-dimensional code image, random noise is generated and added to the two-dimensional code image to enhance the blurriness of the two-dimensional code image and form a noisy two-dimensional code image, using formula (9):
[0087] I noisy (x,y)=I(x,y)+N(x,y) (9)
[0088] Where I(x,y) is the pixel value of the QR code image at position (x,y) when no noise is added, and I noisy (x, y) is the pixel value of the noise two-dimensional code image at position (x, y), and N(x, y) is the random noise value (mean is 0 and standard deviation is 5).
[0089] Furthermore, the noise two-dimensional code image is subjected to a third blurring process to form a blurred two-dimensional code image, ensuring that the blurring effect is natural and smooth, using formula (4):
[0090]
[0091] Where: Inoisy (u,v) is the pixel value of the noise QR code image at position (u,v), I blurred (x, y) is the pixel value of the noise QR code image at position (x, y) after the third blurring process. is the Gaussian kernel function, σ is the blur degree parameter; K is the normalization constant, and Ω is the neighborhood range considered in the blur process.
[0092] The contrast, brightness and grayscale of the blurred two-dimensional code image are adjusted to finally form and output a damaged two-dimensional code image.
[0093] Furthermore, the contrast of the blurred two-dimensional code image is changed by adjusting the brightness histogram of the blurred two-dimensional code image, so that the damaged two-dimensional code image finally outputted still has a certain readability in a blurred state.
[0094] The present invention also provides a system for generating a damaged two-dimensional code image. The system for generating a damaged two-dimensional code image described below and the method for generating a damaged two-dimensional code image described above can refer to each other.
[0095] like Figure 5 As shown, a system for generating a damaged two-dimensional code image includes:
[0096] Input module: used to input ideal QR code and background image, supporting standard QR code format and multiple image formats (such as PNG, JPEG, etc.).
[0097] Preprocessing module: used to preprocess the input ideal QR code to generate an ideal QR code image close to the real scene, including the following two sub-modules:
[0098] Dot matrix QR code generation module: creates a dot matrix effect of a QR code, redraws the QR code image by setting the dot size, density and grayscale threshold, and outputs a QR code composed of regularly arranged dots;
[0099] Low contrast processing module: By performing low contrast processing on the dot matrix QR code, the dot matrix QR code can be integrated more naturally under different backgrounds.
[0100] Damage effect processing module: used to process the pre-processed QR code for damage, including the following five sub-modules:
[0101] Stain generation module: Use a random number generator to create multiple irregular polygonal areas to simulate stains of different shapes;
[0102] Stain overlay module: Overlay multiple stains of different shapes onto random positions of the QR code and adjust the transparency of the stains to control the intensity of the stain effect, ensuring that the stains and QR code are naturally overlaid;
[0103] The first and second fuzzy processing modules: perform the first fuzzy processing on the generated stain shape to make the stain shape smoother; perform the second fuzzy processing on the QR code after the stain is superimposed to smooth the boundaries between multiple stain shapes and QR codes, eliminate superposition traces, and make the superposition effect more natural;
[0104] Fading effect processing module: simulates the fading effect of the QR code by reducing the contrast of the QR code;
[0105] Wrinkle effect processing module: By drawing random lines on the QR code and setting different colors, thicknesses, styles and other features for all random lines, the wrinkle effect of the QR code is simulated.
[0106] Background fusion module: used to fuse the damaged QR code with the background image, including the following two sub-modules:
[0107] Size adjustment module: used to adjust and unify the size of the QR code and the background image before merging them to ensure compatibility in the subsequent fusion process; create a mask of the same size for the QR code to determine the fusion area of the QR code and the background image;
[0108] Image fusion module: Use the Poisson's ratio fusion algorithm to fuse the QR code with the background image, effectively eliminating the boundary difference between the QR code and the background image; adjust the brightness, hue and saturation of the fused QR code image to make the fused QR code image more natural and coordinated in visual presentation.
[0109] Reality effect processing module: used to perform augmented reality effect processing on the fused QR code image, including the following five sub-modules:
[0110] Affine transformation module: Affine transformation is a transformation of the spatial rectangular coordinate system, transforming from one two-dimensional coordinate system to another two-dimensional coordinate system. Affine transformation is a linear transformation that maintains the "parallelism" and "straightness" of the QR code image, that is, the original straight lines and parallel lines in the QR code image remain the same after the transformation. The more commonly used special transformations of affine transformation are translation, scaling, flipping, rotation, and shearing.
[0111] Perspective transformation module: Perspective transformation refers to the transformation that uses the condition that the perspective center, image point and target point are collinear, and according to the law of perspective rotation, the receiving surface (perspective surface) is rotated around the trace line (perspective axis) by a certain angle, thereby destroying the original projection light beam, while still keeping the projected geometric figures on the receiving surface unchanged.
[0112] Noise adding module: used to add random noise to the QR code image to form a noisy QR code image;
[0113] The third fuzzy processing module is used to perform a third fuzzy processing on the noise two-dimensional code image to form a fuzzy two-dimensional code image;
[0114] Image overall effect adjustment module: used to adjust the contrast, brightness and grayscale of the blurred QR code image, and finally form a damaged QR code image.
[0115] Output module: used to output damaged QR code images, supporting standard QR code formats and multiple image formats (such as PNG, JPEG, etc.).
[0116] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for generating a damaged two-dimensional code image, characterized in that: include: Get the ideal QR code and background image; Preprocess the ideal QR code; Perform damage processing on the pre-processed QR code; Merge the damaged QR code with the background image; Performing augmented reality effect processing on the fused QR code image; Output the damaged QR code image.
2. The method for generating a damaged two-dimensional code image according to claim 1, characterized in that: The preprocessing of the ideal two-dimensional code includes: Convert the ideal QR code into a dot matrix QR code consisting of regularly arranged dots; Perform low contrast processing on dot matrix QR codes.
3. The method for generating a damaged two-dimensional code image according to claim 2, characterized in that: The method of converting the ideal two-dimensional code into a dot matrix two-dimensional code composed of regularly arranged dots includes: Convert the ideal QR code to a grayscale QR code; Set the dot parameters of the dot matrix QR code and the preset threshold of the grayscale QR code; Traverse the pixel points on the grayscale QR code. If the grayscale value of a pixel point on the grayscale QR code is lower than the preset threshold, draw a dot at the position corresponding to the pixel point. The drawn dots generate a dot matrix QR code according to the dot parameters.
4. The method for generating a damaged two-dimensional code image according to claim 1, characterized in that: The damaged processing of the pre-processed two-dimensional code includes: Randomly generate multiple irregular stain shapes and perform a first fuzzy process; Overlay stains onto random locations of the QR code and adjust the transparency of the stains; Performing a second blurring process on the QR code after the stains are superimposed; Apply fading effect to QR code; Apply wrinkle effect to the QR code.
5. The method for generating a damaged two-dimensional code image according to claim 4, characterized in that: When stains are superimposed on the QR code, formula (1) is used: Among them, Stain(x,y) is the grayscale value of the stain, I(x,y,c) is the color channel of the QR code before adding the stain, I′(x,y,c) is the color channel of the QR code after adding the stain, C is a random color, α is the transparency of the stain, and its adjustment range is between 0.3 and 0.
8.
6. The method for generating a damaged two-dimensional code image according to claim 4, characterized in that: The first and second fuzzy processing are both performed using formula (2): Among them, I′(x,y) is the pixel value at the position (x,y) of the stain or QR code after blurring, I(x,y) is the pixel value at the position (x,y) of the stain or QR code before blurring, and G(i,j) is a Gaussian kernel of size (2k+1)×(2k+1).
7. The method for generating a damaged two-dimensional code image according to claim 1, characterized in that: The damaged two-dimensional code is fused with the background image using formula (3): Where: I output (x, y) represents the pixel value of the fused QR code image at position (x, y), I source (x′, y′) represents the pixel value of the QR code at position (x′, y′) before fusion. is a normalization factor, λ is a parameter that controls the smoothness of the fusion, and Ω represents the range of the neighborhood considered during the fusion process.
8. The method for generating a damaged two-dimensional code image according to claim 7, characterized in that: After the two-dimensional code and the background image are merged, the brightness, hue and saturation of the merged two-dimensional code image are adjusted.
9. The method for generating a damaged two-dimensional code image according to claim 1, characterized in that: The performing augmented reality effect processing on the fused two-dimensional code image includes: Perform affine transformation and perspective transformation on the QR code image; Adding random noise to the two-dimensional code image to form a noisy two-dimensional code image; Performing a third fuzzy process on the noise two-dimensional code image to form a fuzzy two-dimensional code image; Adjust the contrast, brightness and grayscale of the blurred QR code image.
10. The method for generating a damaged two-dimensional code image according to claim 9, characterized in that: The third fuzzy processing is implemented using formula (4): Where: I noisy (u,v) is the pixel value of the noise QR code image at position (u,v), I blurred (x, y) is the pixel value of the noise QR code image at position (x, y) after the third blurring process. is the Gaussian kernel function, σ is the blur degree parameter; K is the normalization constant, and Ω is the neighborhood range considered in the blur process.