A method of Bayer image denoising

CN122510120APending Publication Date: 2026-08-04EAST CHINA INST OF OPTOELECTRONICS INTEGRATEDDEVICE
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610751859.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-05-28
Publication Date
2026-08-04

AI Technical Summary

Technical Problem

这样会带来以下几个问题:原始的Bayer信息直接转换成彩色信息的图像时如去马赛克过程,带来新的结构噪声;含噪图像在做其他模块处理时如AWB时,会放大噪声,对图像处理结果影响较大

Benefits of technology

[0077] Compared with existing image denoising methods, the significant advantages of this invention are:

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122510120A_ABST
    Figure CN122510120A_ABST
Patent Text Reader

Abstract

The application discloses a Bayer image denoising method, which comprises the following steps: obtaining a Bayer image and performing a demosaicing operation to obtain an RGB image; converting the format of the RGB image to obtain a YUV image; performing image denoising on the Y channel of the YUV image to obtain Ynr; performing downsampling on the Bayer image to obtain four chrominance subgraphs R1, Gr1, Gb1 and B1; performing downsampling on the Ynr image to obtain four luminance subgraphs YR1, YGr1, YGb1 and YB1; performing guided filtering on the chrominance subgraphs by using the luminance subgraphs to obtain four chrominance filtered images R1nr, Gr1nr, Gb1nr and B1nr; performing guided filtering on each level of the luminance subgraphs and the chrominance subgraphs by using a Gaussian pyramid; and performing upsampling and weighted fusion on each level of the four chrominance filtered images and restoring the images to the original positions to output a Bayer denoised image. The application takes into account low-frequency and high-frequency signals, improves the image signal-to-noise ratio, and retains more image details.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to image processing technology in the field of signal processing, specifically to a Bayer image denoising method. Background Technology

[0002] Typical color imaging devices can directly output image data in RGB or YUV format. This is usually achieved by using CMOS or CCD devices with surface-coated filters to control the spectral response range, allowing light in the red, green, and blue wavelength ranges to pass through the filters and be converted into electrical signals. For example, in a CMOS device, R, G, G, and B are arranged in a fixed 2×2 array and repeatedly distributed on the device surface to form a Bayer array. Then, image processing methods such as depigmentation, white balance, image denoising, image enhancement, and color gamut conversion are used to output color format images, such as RGB or YUV.

[0003] In complex environments, such as low light, low signal-to-noise ratios can occur, affecting image quality and posing challenges to color correction. Current denoising methods primarily operate in the RGB or YUV domains, employing temporal, spatial, and frequency domain approaches. However, this introduces several problems: directly converting the original Bayer information into color information, such as in demosaicing, introduces new structural noise; and when noisy images are processed in other modules, such as AWB, noise is amplified, significantly impacting the final image processing result. To address these issues, denoising is typically performed directly in the RAW domain (Bayer signal). Current RAW processing methods, besides deep learning approaches, generally employ spatial domain methods, such as multi-level median filtering, which often result in poor detail preservation in the denoised image. Furthermore, direct denoising in the RAW domain neglects the correlation between luminance and chrominance information. Summary of the Invention

[0004] The purpose of this invention is to overcome the shortcomings of the prior art and provide a Bayer image denoising method that guides color image denoising based on luminance image and uses a Gaussian pyramid structure to take into account both low-frequency and high-frequency signals, thereby improving the image signal-to-noise ratio while preserving more image details.

[0005] To achieve the above objectives / to solve the above technical problems, the present invention is implemented using the following technical solution:

[0006] A Bayer image denoising method, the method comprising:

[0007] Obtain the Bayer image and perform a depixelation operation on it to obtain an RGB image;

[0008] The RGB image format is converted to obtain a YUV image;

[0009] The Y channel of the YUV image is denoised to obtain Ynr;

[0010] Four chromaticity sub-images, R1, Gr1, Gb1, and B1, are obtained by downsampling the Bayer image.

[0011] Four luminance sub-images, YR1, YGr1, YGb1, and YB1, are obtained by downsampling the Ynr image.

[0012] Four chroma-filtered images, R1nr, Gr1nr, Gb1nr, and B1nr, are obtained by using a luminance submap to perform guided filtering on the chroma submap.

[0013] Gaussian pyramids are used to perform guided filtering on the luminance and chrominance submaps at each level;

[0014] The four chroma-filtered images at each level are upsampled, weighted, and fused to restore them to their original positions, outputting the Bayer-denoised image.

[0015] Optionally, the Bayer image demosaic operation employs a gradient correction-based method, including:

[0016] Centered on the current pixel, a 5×5 area window is selected to calculate the RGB value of the current center position. The center channel is a 5×5 area filter array of different color channels.

[0017] The channel type of the center pixel is determined, and it is divided into four types: R, Gr, Gb, and B. The pixels are then labeled.

[0018] The center channel is the R channel. A 5×5 area is selected, and the color information is encoded as shown in the figure. The R, G, and B values ​​at the center position R33 are calculated using the following formula:

[0019] ;

[0020] ;

[0021] ;

[0022] The center channel is the Gr channel. A 5×5 area is selected to encode the color information. The R, G, and B values ​​at the center position G33 are calculated using the following formula:

[0023] ;

[0024] ;

[0025] ;

[0026] The center channel is the Gb channel. A 5×5 area is selected to encode the color information. The R, G, and B values ​​at the center position G33 are calculated using the following formula:

[0027] ;

[0028] ;

[0029] ;

[0030] The center channel is the B channel. A 5×5 area is selected, and the color information is encoded. The R, G, and B values ​​at the center position G33 are calculated using the following formula:

[0031] ;

[0032] ;

[0033] .

[0034] Optionally, the conversion formula for converting the RGB image to a YUV format image is as follows:

[0035] ;

[0036] ;

[0037] .

[0038] Optionally, the step of downsampling the Bayer image to obtain four chromaticity sub-images R1, Gr1, Gb1, and B1 includes:

[0039] In the original Bayer image, the values ​​of the R channel, Gr channel, Gb channel, and B channel are extracted separately to obtain four chroma sub-images R1, Gr1, Gb1, and B1; the height and width of each chroma sub-image are reduced to half the height and width of the original image.

[0040] Optionally, the downsampling of the Ynr image to obtain four luminance sub-images YR1, YGr1, YGb1, and YB1 includes:

[0041] In the Ynr image, the values ​​corresponding to the R, Gr, Gb, and B channels of the original image are extracted separately to obtain four luminance sub-images: YR1, YGr1, YGb1, and YB1. YR1 represents the luminance sub-image extracted from the corresponding position of the original R channel in the Ynr image, YGr1 represents the luminance sub-image extracted from the corresponding position of the original Gr channel in the Ynr image, YGb1 represents the luminance sub-image extracted from the corresponding position of the original Gb channel in the Ynr image, and YB1 represents the luminance sub-image extracted from the corresponding position of the original B channel in the Ynr image. The height and width of each luminance sub-image are reduced to half the height and width of the original image.

[0042] Optionally, the step of using the luminance sub-image to perform guided filtering on the chrominance sub-image yields four chrominance filtered images R1nr, Gr1nr, Gb1nr, and B1nr;

[0043] Guided filtering is applied to the luminance and chrominance submaps at each level using a Gaussian pyramid;

[0044] The four chroma-filtered images at each level are upsampled, weighted, and fused to restore them to their original positions, outputting the Bayer-denoised image.

[0045] Optionally, the step of using a luminance sub-image to perform guided filtering on a chrominance sub-image to obtain four chrominance filtered images R1nr, Gr1nr, Gb1nr, and B1nr includes:

[0046] Using the chroma subimage R1 as the input image and the luminance subimage YR1 as the guide image, the search radius is r, and the regularization parameter is ε. R1 is denoted by I, and YR1 is denoted by p. The width and height of the I and p images are w and h, respectively, and their calculation formulas are as follows:

[0047] ;

[0048] ;

[0049] ;

[0050] ;

[0051] ;

[0052] ;

[0053] ;

[0054] ;

[0055] ;

[0056] ;

[0057] ;

[0058] In the formula: This indicates that the mean value is calculated within an r×r region centered at the current location, and q represents the output image.

[0059] Each channel is calculated to obtain four chroma-filtered images R1. nr Gr1 nr Gb1 nr B1 nr .

[0060] Optionally, the step of using a Gaussian pyramid to perform guided filtering on the luminance and chrominance sub-maps of each level includes:

[0061] Gaussian filtering is applied to each of the luminance sub-images YR1, YGr1, YGb1, and YB1, with a filtering radius of 5 and a filtering kernel coefficient of kσ, to obtain the first-level luminance Gaussian filtered sub-images YR1_G, YGr1_G, ​​YGb1_G, and YB1_G for each luminance sub-image.

[0062] The first-level luminance Gaussian filter sub-image is subjected to average pooling operation. The mean is calculated in every 2×2 region to obtain the first-level luminance Gaussian pooled sub-images YR1_GC, YGr1_GC, YGb1_GC, and YB1_GC. At this time, the width of the image is W / 2 and the height is H / 2.

[0063] The first-level luminance Gaussian pooling sub-images YR1_GC, YGr1_GC, YGb1_GC, and YB1_GC are subjected to Gaussian filtering with a filtering radius of 5 and a filtering kernel coefficient of k. 2 σ, to obtain the second-level luminance Gaussian filtered sub-maps YR2_G, YGr2_G, YGb2_G, and YB2_G for each luminance sub-map;

[0064] The second-level luminance Gaussian filter sub-image is subjected to average pooling operation. The mean is calculated in every 2×2 region to obtain the second-level luminance Gaussian pooled sub-images YR2_GC, YGr2_GC, YGb2_GC, and YB2_GC. At this time, the width of the image is W / 4 and the height is H / 4.

[0065] The luminance sub-image is decomposed in the manner described above to obtain the first-level chroma Gaussian pooling sub-images R1_GC, Gr1_GC, Gb1_GC, and B1_GC, and the second-level chroma Gaussian pooling sub-images R2_GC, Gr2_GC, Gb2_GC, and B2_GC.

[0066] R2 is obtained by performing guided filtering on these two subgraphs respectively. nr Gr2nr Gb2 nr B2 nr and R3 nr Gr3 nr Gb3 nr B3 nr .

[0067] Optionally, the step of upsampling, weighting, and fusing the four chroma-filtered images at each level and restoring them to their original positions to output the Bayer-denoised image includes:

[0068] The guided filter result R2 of each stage nr Gr2 nr Gb2 nr B2 nr and R3 nr Gr3 nr Gb3 nr B3 nr The images are restored to the same width and height as the four chroma-filtered images R1nr, Gr1nr, Gb1nr, and B1nr, resulting in images R2new, Gr2new, Gb2new, B2new and R3new, Gr3new, Gb3new, and B3new with width W and height H.

[0069] Assign weights w1, w2, and w3 to each level of each channel, and output Rout, Grout, Gbout, and Bout;

[0070] The output Rout, Grout, Gbout, and Bout are restored to their original Bayer image channel positions, and the Bayer-denoised image is output.

[0071] Optionally, the calculation formulas for Rout, Grout, Gbout, and Bout are as follows:

[0072] ;

[0073] ;

[0074] ;

[0075] .

[0076] Compared with the prior art, the beneficial effects achieved by the present invention are as follows:

[0077] Compared with existing image denoising methods, the significant advantages of this invention are:

[0078] 1) Suppress noise at the RAW domain level to prevent noise from being amplified or details from being lost in subsequent image processing;

[0079] 2) Use guided filtering to preserve image brightness edges and structural details;

[0080] 3) Use a Gaussian pyramid structure to remove chromatic noise from the high and low frequency bands. Attached Figure Description

[0081] Figure 1 This is the flowchart of the Bayer image denoising method of the present invention;

[0082] Figure 2 This is a schematic diagram of the Bayer array (RGGB type) arrangement of the present invention;

[0083] Figure 3 This invention is a 5×5 area filter film array with different color channels in the center channel;

[0084] Figure 4 This is a Bayer image and a sub-image obtained by downsampling the Ynr channel in this invention. Detailed Implementation

[0085] To make the technical means, creative features, objectives and effects of this invention easier to understand, the invention will be further described below in conjunction with specific embodiments.

[0086] In the description of this invention, it should be understood that the terms "center," "longitudinal," "lateral," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," and "outer," etc., indicating orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, are used only for the convenience of describing the invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of the invention. Furthermore, the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined with "first," "second," etc., may explicitly or implicitly include one or more of that feature. In the description of this invention, unless otherwise stated, "a plurality of" means two or more.

[0087] In the description of this invention, it should be noted that, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art will understand the specific meaning of the above terms in this invention based on the specific circumstances.

[0088] The method of this invention designs a Bayer image denoising method. Based on this, the entire flowchart is as follows: Figure 1 As shown, it mainly includes the following steps:

[0089] Step 1: Obtain the Bayer image and perform a de-mosaic operation on it to obtain an RGB image;

[0090] Step 2: Convert the RGB image format to obtain a YUV image;

[0091] Step 3: Denoise the Y channel of the YUV image to obtain Ynr;

[0092] Step 4: Downsample the Bayer image to obtain four chromaticity sub-images R1, Gr1, Gb1, and B1;

[0093] Step 5: Downsample the Ynr image to obtain four luminance sub-images YR1, YGr1, YGb1, and YB1;

[0094] Step 6: Use the luminance sub-image to perform guided filtering on the chrominance sub-image to obtain four chrominance filtered images R1nr, Gr1nr, Gb1nr, and B1nr;

[0095] Step 7: Apply Gaussian pyramid to guide filtering of the luminance and chrominance submaps at each level;

[0096] Step 8: Upsample, weight, and fuse the four chroma-filtered images of each level, then restore them to their original positions and output the Bayer-denoised image.

[0097] A Bayer array is formed by depositing filter films that can transmit red, green, blue, and yellow light bands onto the surface of a CMOS or CCD image sensor. These films can be selected from several types, such as RGGB and RYYB, and arranged in a regular pattern. Currently, RGGB is a common coating method, and this invention primarily focuses on Bayer image denoising using this method. An RGGB arrangement is shown below. Figure 2 As shown.

[0098] Step 1: Obtain the Bayer image and perform a de-mosaic operation on it to obtain an RGB image; (The Bayer image is de-mosaiced to obtain an RGB image).

[0099] After demosaicing the single-channel information of the Bayer image, the RGB three-channel information is obtained. Methods such as nearest-neighbor interpolation, bilinear interpolation, and gradient-based correction can be used; the method is not limited. This embodiment uses a gradient-based correction method to implement the demosaic process.

[0100] Centered on the current pixel, a 5×5 area window is selected to calculate the RGB value at the current center position. The center channel is a 5×5 area filter array with different color channels, as shown below. Figure 3 As shown. The channel type of the center pixel is determined, which is divided into four types: R, Gr, Gb, and B, and the pixels are then labeled.

[0101] like Figure 3 As shown in (a), the center channel is the R channel. A 5×5 area is selected, and the color information is encoded as shown in the figure. The center position is R33. The R, G, and B values ​​at this center position are calculated as follows.

[0102]

[0103]

[0104]

[0105] like Figure 3 As shown in (b), the center channel is the G (Gr) channel. A 5×5 area is selected, and the color information is encoded as shown in the figure, with the center position being G33. The R, G, and B values ​​at this center position are calculated as follows.

[0106]

[0107]

[0108]

[0109] like Figure 3 As shown in (c), the center channel is the G (Gb) channel. A 5×5 area is selected, and the color information is encoded as shown in the figure, with the center position being G33. The R, G, and B values ​​at this center position are calculated as follows.

[0110]

[0111]

[0112]

[0113] like Figure 3 As shown in (d), the center channel is channel B. A 5×5 area is selected, and the color information is encoded as shown in the figure, with the center position being G33. The R, G, and B values ​​at this center position are calculated as follows.

[0114]

[0115]

[0116]

[0117] After gradient correction, the Bayer image is converted into an RGB image.

[0118] Step 2: Convert the RGB image format to obtain a YUV image (convert the RGB image format to obtain a YUV image);

[0119] The formula for converting an RGB image to a YUV format image is as follows:

[0120]

[0121]

[0122]

[0123] Step 3: Denoise the Y channel of the YUV image to obtain Ynr (Denoise the Y channel of the YUV image to obtain Ynr);

[0124] Image denoising is performed on the luminance channel Y in YUV format. Image denoising methods can include mean filtering, median filtering, Gaussian filtering, bilateral filtering, etc., and the method is not limited. This embodiment uses bilateral filtering as the filtering method to obtain the filtered image Y. nr .

[0125] Step 4: Downsample the Bayer image to obtain four chromaticity sub-images R1, Gr1, Gb1, and B1 (Downsample the Bayer image to obtain four chromaticity sub-images R1, Gr1, Gb1, and B1);

[0126] In the original Bayer image, the values ​​of the R, Gr, Gb, and B channels are extracted separately to obtain four chroma sub-images: R1, Gr1, Gb1, and B1. For example... Figure 4 As shown in the left part, the height and width of each chroma sub-image are reduced to half the height and width of the original image.

[0127] Step 5: Downsample the Ynr image to obtain four luminance sub-images YR1, YGr1, YGb1, and YB1 (downsample the Ynr image to obtain four luminance sub-images YR1, YGr1, YGb1, and YB1);

[0128] In the Ynr image, the values ​​corresponding to the R, Gr, Gb, and B channels of the original image are extracted separately to obtain four luminance sub-images: YR1, YGr1, YGb1, and YB1. YR1 represents the luminance sub-image extracted from the corresponding position of the original R channel in the Ynr image; YGr1 represents the luminance sub-image extracted from the corresponding position of the original Gr channel in the Ynr image; YGb1 represents the luminance sub-image extracted from the corresponding position of the original Gb channel in the Ynr image; and YB1 represents the luminance sub-image extracted from the corresponding position of the original B channel in the Ynr image. For example... Figure 4 As shown on the right, the height and width of each brightness sub-image are reduced to half the height and width of the original image.

[0129] Step 6: Apply guided filtering to the chroma subimage using the luminance subimage to obtain four chroma-filtered images R1nr, Gr1nr, Gb1nr, and B1nr (using the luminance subimage to apply guided filtering to the chroma subimage to obtain four chroma-filtered images R1...). nr Gr1 nr Gb1 nr B1 nr );

[0130] Using luminance sub-maps YR1, YGr1, YGb1, and YB1 as guide maps, guided filtering is applied to chrominance sub-maps R1, Gr1, Gb1, and B1. Guided filtering methods include luminance-weighted guided filtering and directed filtering, and the method is not limited. This embodiment uses the directed filtering method.

[0131] Using the chroma subimage R1 as the input image and the luminance subimage YR1 as the guide image, the search radius is r, and the regularization parameter is ε. For ease of representation, R1 is denoted by I, and YR1 by p, with the width and height of I and p being w and h, respectively. The calculation process is as follows:

[0132]

[0133]

[0134]

[0135]

[0136]

[0137]

[0138]

[0139]

[0140]

[0141]

[0142]

[0143] In the formula This indicates that the mean value is calculated within an r×r region centered at the current location, and q represents the output image.

[0144] Perform the above calculations for each channel to obtain four chroma-filtered images R1. nr Gr1 nr Gb1 nr B1 nr .

[0145] Step 7: Apply Gaussian pyramid to guide filtering the luminance and chrominance submaps at each level (apply Gaussian pyramid to guide filtering the luminance and chrominance submaps at each level).

[0146] The luminance and chrominance subimages are decomposed into Gaussian pyramids. Each luminance subimage (YR1, YGr1, YGb1, YB1, assuming width W and height H) is subjected to Gaussian filtering with a filter radius of 5 and a kernel coefficient of kσ, resulting in the first-level Gaussian filtered luminance subimages YR1_G, YGr1_G, ​​YGb1_G, and YB1_G. The first-level Gaussian filtered luminance subimages are then subjected to average pooling, with the mean calculated within each 2×2 region, resulting in the first-level Gaussian pooled luminance subimages YR1_GC, YGr1_GC, YGb1_GC, and YB1_GC. At this point, the image width is W / 2 and the height is H / 2. The first-level Gaussian pooled luminance subimages YR1_GC, YGr1_GC, YGb1_GC, and YB1_GC are then subjected to Gaussian filtering with a filter radius of 5 and a kernel coefficient of kσ. 2 σ is used to obtain the second-level Gaussian filtered luminance sub-images YR2_G, YGr2_G, YGb2_G, and YB2_G for each luminance sub-image. Average pooling is then performed on these second-level Gaussian filtered luminance sub-images, calculating the mean within each 2×2 region to obtain the second-level Gaussian pooled luminance sub-images YR2_GC, YGr2_GC, YGb2_GC, and YB2_GC. At this point, the image width is W / 4 and the height is H / 4.

[0147] The luminance sub-image is decomposed as described above to obtain the first-level chroma Gaussian pooling sub-images R1_GC, Gr1_GC, Gb1_GC, and B1_GC, and the second-level chroma Gaussian pooling sub-images R2_GC, Gr2_GC, Gb2_GC, and B2_GC. Guided filtering is then applied to these two sub-images to obtain R2. nr Gr2 nr Gb2 nr B2 nr and R3 nr Gr3 nr Gb3 nr B3 nr .

[0148] Step 8: Upsample, weight, and fuse the four chroma-filtered images of each level, then restore them to their original positions and output the Bayer-denoised image (upsample, weight, and fuse the four chroma-filtered images of each level, then restore them to their original positions and output).

[0149] The guided filter result R2 of each stage nr Gr2 nr Gb2 nr B2 nr and R3 nr Gr3 nr Gb3 nr B3 nr Restored to four chroma-filtered images R1 nr Gr1 nr Gb1 nr B1 nr Images of the same width and height can be reconstructed using methods such as nearest neighbor interpolation, bilinear interpolation, and bicubic interpolation to obtain an R² image with width W and height H. new Gr2 new Gb2 new B2 new and R3 new Gr3 new Gb3 new B3 new Weights w1, w2, and w3 are assigned to each level of each channel. The final output Rout, Grout, Gbout, and Bout are:

[0150] ;

[0151] ;

[0152] ;

[0153] ;

[0154] The output is restored according to the original Bayer image channel positions, and the final output is the Bayer-denoised image.

[0155] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the technical principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. A Bayer image denoising method, characterized in that, The method includes: Obtain the Bayer image and perform a depixelation operation on it to obtain an RGB image; The RGB image format is converted to obtain a YUV image; The Y channel of the YUV image is denoised to obtain Ynr; Four chromaticity sub-images, R1, Gr1, Gb1, and B1, are obtained by downsampling the Bayer image. Four luminance sub-images, YR1, YGr1, YGb1, and YB1, are obtained by downsampling the Ynr image. Four chroma-filtered images, R1nr, Gr1nr, Gb1nr, and B1nr, are obtained by using a luminance submap to perform guided filtering on the chroma submap. Gaussian pyramids are used to perform guided filtering on the luminance and chrominance submaps at each level; The four chroma-filtered images at each level are upsampled, weighted, and fused to restore them to their original positions, outputting the Bayer-denoised image.

2. The Bayer image denoising method according to claim 1, characterized in that, The Bayer image demosaic operation employs a gradient correction-based method, including: Centered on the current pixel, a 5×5 area window is selected to calculate the RGB value of the current center position. The center channel is a 5×5 area filter array of different color channels. The channel type of the center pixel is determined, and it is divided into four types: R, Gr, Gb, and B. The pixels are then labeled. The center channel is the R channel. A 5×5 area is selected, and the color information is encoded as shown in the figure. The R, G, and B values ​​at the center position R33 are calculated using the following formula: ; ; ; The center channel is the Gr channel. A 5×5 area is selected to encode the color information. The R, G, and B values ​​at the center position G33 are calculated using the following formula: ; ; ; The center channel is the Gb channel. A 5×5 area is selected to encode the color information. The R, G, and B values ​​at the center position G33 are calculated using the following formula: ; ; ; The center channel is the B channel. A 5×5 area is selected, and the color information is encoded. The R, G, and B values ​​at the center position G33 are calculated using the following formula: ; ; 。 3. The Bayer image denoising method according to claim 1, characterized in that, The conversion formula for converting an RGB image to a YUV format image is as follows: ; ; 。 4. The Bayer image denoising method according to claim 1, characterized in that, The downsampling based on the Bayer image yields four chromaticity sub-images R1, Gr1, Gb1, and B1, including: In the original Bayer image, the values ​​of the R channel, Gr channel, Gb channel, and B channel are extracted separately to obtain four chroma sub-images R1, Gr1, Gb1, and B1; the height and width of each chroma sub-image are reduced to half the height and width of the original image.

5. The Bayer image denoising method according to claim 1, characterized in that, The downsampling based on the Ynr image yields four luminance sub-images YR1, YGr1, YGb1, and YB1, including: In the Ynr image, the values ​​corresponding to the R, Gr, Gb, and B channels of the original image are extracted separately to obtain four luminance sub-images: YR1, YGr1, YGb1, and YB1. YR1 represents the luminance sub-image extracted from the corresponding position of the original R channel in the Ynr image, YGr1 represents the luminance sub-image extracted from the corresponding position of the original Gr channel in the Ynr image, YGb1 represents the luminance sub-image extracted from the corresponding position of the original Gb channel in the Ynr image, and YB1 represents the luminance sub-image extracted from the corresponding position of the original B channel in the Ynr image. The height and width of each luminance sub-image are reduced to half the height and width of the original image.

6. The Bayer image denoising method according to claim 1, characterized in that, The method involves using a luminance sub-image to perform guided filtering on the chrominance sub-image to obtain four chrominance filtered images: R1nr, Gr1nr, Gb1nr, and B1nr. Guided filtering is applied to the luminance and chrominance submaps at each level using a Gaussian pyramid; The four chroma-filtered images at each level are upsampled, weighted, and fused to restore them to their original positions, outputting the Bayer-denoised image.

7. The Bayer image denoising method according to claim 1, characterized in that, The process of using a luminance sub-image to perform guided filtering on a chrominance sub-image to obtain four chrominance filtered images R1nr, Gr1nr, Gb1nr, and B1nr includes: Using the chroma subimage R1 as the input image and the luminance subimage YR1 as the guide image, the search radius is r, and the regularization parameter is ε. R1 is denoted by I, and YR1 is denoted by p. The width and height of the I and p images are w and h, respectively, and their calculation formulas are as follows: ; ; ; ; ; ; ; ; ; ; ; In the formula: This indicates that the mean value is calculated within an r×r region centered at the current location, and q represents the output image. Each channel is calculated to obtain four chroma-filtered images R1. nr Gr1 nr Gb1 nr B1 nr .

8. The Bayer image denoising method according to claim 1, characterized in that, The method of using Gaussian pyramids to perform guided filtering on the luminance and chrominance submaps of each level includes: Gaussian filtering is applied to each of the luminance sub-images YR1, YGr1, YGb1, and YB1, with a filtering radius of 5 and a filtering kernel coefficient of kσ, to obtain the first-level luminance Gaussian filtered sub-images YR1_G, YGr1_G, ​​YGb1_G, and YB1_G for each luminance sub-image. The first-level luminance Gaussian filter sub-image is subjected to average pooling operation. The mean is calculated in every 2×2 region to obtain the first-level luminance Gaussian pooled sub-images YR1_GC, YGr1_GC, YGb1_GC, and YB1_GC. At this time, the width of the image is W / 2 and the height is H / 2. The first-level luminance Gaussian pooling sub-images YR1_GC, YGr1_GC, YGb1_GC, and YB1_GC are subjected to Gaussian filtering with a filtering radius of 5 and a filtering kernel coefficient of k. 2 σ, to obtain the second-level luminance Gaussian filtered sub-maps YR2_G, YGr2_G, YGb2_G, and YB2_G for each luminance sub-map; The second-level luminance Gaussian filter sub-image is subjected to average pooling operation. The mean is calculated in every 2×2 region to obtain the second-level luminance Gaussian pooled sub-images YR2_GC, YGr2_GC, YGb2_GC, and YB2_GC. At this time, the width of the image is W / 4 and the height is H / 4. The luminance sub-image is decomposed in the manner described above to obtain the first-level chroma Gaussian pooling sub-images R1_GC, Gr1_GC, Gb1_GC, and B1_GC, and the second-level chroma Gaussian pooling sub-images R2_GC, Gr2_GC, Gb2_GC, and B2_GC. R2 is obtained by performing guided filtering on these two subgraphs respectively. nr Gr2 nr Gb2 nr B2 nr and R3 nr Gr3 nr Gb3 nr B3 nr .

9. The Bayer image denoising method according to claim 1, characterized in that, The process of upsampling, weighting, and fusing the four chroma-filtered images at each level, restoring them to their original positions, and outputting the Bayer-denoised image includes: The guided filter result R2 of each stage nr Gr2 nr Gb2 nr B2 nr and R3 nr Gr3 nr Gb3 nr B3 nr The images are restored to the same width and height as the four chroma-filtered images R1nr, Gr1nr, Gb1nr, and B1nr, resulting in images R2new, Gr2new, Gb2new, B2new and R3new, Gr3new, Gb3new, and B3new with width W and height H. Assign weights w1, w2, and w3 to each level of each channel, and output Rout, Grout, Gbout, and Bout; The output Rout, Grout, Gbout, and Bout are restored to their original Bayer image channel positions, and the Bayer-denoised image is output.

10. The Bayer image denoising method according to claim 9, characterized in that, The formulas for calculating Rout, Grout, Gbout, and Bout are as follows: ; ; ; 。