A guided filter denoising application compatible with raw domain and yuv domain
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-07
- Publication Date
- 2026-08-11
AI Technical Summary
[0004]然而,现有的兼容RAW域与YUV域的导向滤波降噪应用在使用的过程中存在以下的问题:在现有技术中,导向滤波对RAW域及YUV域图像的处理涉略甚少,导致导向滤波这类优秀的降噪算法在ISP流程中尚无用武之地
[0015] This invention provides a guided filtering noise reduction application compatible with both RAW and YUV domains. It features the following:
Smart Images

Figure CN116012252B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of guided filtering noise reduction application technology, specifically a guided filtering noise reduction application compatible with both RAW and YUV domains. Background Technology
[0002] Guided filtering is a commonly used edge-preserving filter. Compared with general filtering algorithms, guided filtering has advantages such as preserving edges and being fast. Moreover, compared with bilateral filtering, it can avoid gradient flipping.
[0003] In existing technologies, such as Figure 1 As shown, guided filtering is commonly used for image dehazing, image matting, and noise reduction in the RGB domain. Currently, no instances of guided filtering being applied to the ISP workflow, i.e., guided filtering noise reduction applications compatible with both RAW and YUV domains, have been found.
[0004] However, existing guided filtering denoising applications compatible with both RAW and YUV domains suffer from the following problems: Current technologies handle RAW and YUV image processing very little, leaving this excellent denoising algorithm largely unused in ISP workflows. In fact, tests have shown that guided filtering performs well in ISPs, exhibiting significant edge preservation compared to traditional simple filters such as mean, Gaussian, median, and multi-level median filters. Furthermore, compared to more computationally intensive advanced algorithms including PCA denoising, NLM, and BM3D, guided filtering offers advantages such as speed, simplicity of implementation, and low resource consumption. Therefore, it is truly regrettable that guided filtering has not been applied to image denoising in both RAW and YUV domains. Summary of the Invention
[0005] (a) Technical problems to be solved
[0006] To address the shortcomings of existing technologies, this invention provides a guided filtering noise reduction application that is compatible with both RAW and YUV domains, thus solving the problems in the background technology.
[0007] (II) Technical Solution
[0008] To achieve the above objectives, the present invention provides the following technical solution: a guided filtering noise reduction application compatible with both RAW and YUV domains, comprising input parameters for each domain, input image color gamut conversion, an expansion module, a window template, a noise reduction module, and an output filtered result image. The input parameters for each domain are: for the YUV domain, coefficient C = 1, and all values in the mask template are 1; for the RAW domain, coefficient C = 2, and the mask template contains zero terms. The input image color gamut conversion is required if the input image at the YUV domain input is an RGB domain image, requiring an RGB-to-YUV color gamut conversion. The expansion module has a total expansion row count of r*2 rows for RAW domain noise reduction and r rows for Y domain noise reduction. The window template and mask template have the same size, ws*ws. The noise reduction module uses a guided filtering algorithm with its own guide image, and the algorithm implementation remains unchanged. The output filtered result image is required if the original input image is an RGB domain image, requiring the YUV domain image to be converted to an RGB domain image before output.
[0009] As a further preferred embodiment of the present invention, the mask template in the input parameters of each domain is specifically designed so that, since the RAW domain image is arranged in a checkerboard pattern, the RAW domain image needs to be split into R, G, and G domains during filtering. r G b The image has four channels (the reason for having four channels is that, in hardware implementation, images are read line by line, so the correlation between data in the same line is greater). Therefore, for a window of size ws*ws centered on any pixel, by retaining only the data in the same channel as the center pixel within the window and setting the data in the other channels to 0, the effect of channel splitting within the window can be achieved without explicitly splitting the channels.
[0010] As a further preferred embodiment of the present invention, the subsequent processing of the input image color gamut conversion is all for the Y channel of a single-channel image: a RAW domain image or a YUV domain image.
[0011] As a further preferred embodiment of the present invention, r in the expansion module is a radius parameter, which refers to the window radius excluding the center pixel. If it is a RAW domain, it needs to be doubled.
[0012] As a further preferred embodiment of the present invention, in the window template, ws = 2 × r + 1 for YUV domain images and ws = 4 × r + 1 for RAW domain images, which are unified as ws = 2 × C × r + 1. The coefficient C achieves compatibility between the RAW and YUV domain window sizes. On the other hand, the mask template also achieves compatibility in obtaining the window template.
[0013] As a further preferred embodiment of the present invention, the guide image and the image to be filtered required by the algorithm in the noise reduction module are both processed in the form of window templates, and the zero items in the window images have no effect on the summation operation. The number of non-zero items can also be calculated by the value of r. Therefore, as long as the window images that match the color gamut being processed are input, subsequent operations related to the summation operation, such as calculating the mean, the square of the mean, and the mean of the squares, can be performed smoothly.
[0014] (III) Beneficial Effects
[0015] This invention provides a guided filtering noise reduction application compatible with both RAW and YUV domains. It features the following:
[0016] Beneficial effects:
[0017] This invention achieves implicit splitting of the four channels in the RAW domain by using a mask template; by defining different mask template parameters (mask) and coefficient parameters (C), it achieves compatibility in image expansion and window image extraction across two color domains; by obtaining each window image, it achieves filtering operations without difference across the two color domains, thus realizing the compatibility of guided filtering with the guide image as itself in both the RAW and YUV color domains, and achieving image noise reduction of guided filtering in both the RAW and YUV domains. It can effectively adapt to the ISP workflow and achieves filtering processing compatible with two color domains without refactoring the code. Attached Figure Description
[0018] Figure 1 This is a schematic diagram of the overall structure of the present invention;
[0019] Figure 2 This is a schematic diagram of the entry parameters of each domain described in this invention;
[0020] Figure 3 This is a schematic diagram of the filtering process described in this invention. Detailed Implementation
[0021] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0022] Please see Figure 1-3This invention provides a technical solution: a guided filtering noise reduction application compatible with both RAW and YUV domains, including: 1. Input parameters for each domain: For the YUV domain, coefficient C = 1, and all values in the mask template are 1; for the RAW domain, coefficient C = 2, and the mask template contains zero terms. A detailed explanation of the mask template is as follows: Since the RAW domain image is arranged in a checkerboard pattern, as shown in the figure below, during filtering, the RAW domain image needs to be split into R, G... r G b The image has four channels (the reason for having four channels is that, in hardware implementation, the image is read row by row, so the correlation between data in the same row is greater). Therefore, for a window of size ws*ws centered on any pixel, by keeping only the data in the same channel as the center pixel within the window and setting the data in the other channels to 0, the effect of channel splitting within the window can be achieved without explicitly splitting the channels. This is reflected in the values of the mask template, that is, the template data corresponding to the required values is 1, and the template data corresponding to the unwanted values is 0. In the RAW domain entry, the window size ws can be determined by specifying the window radius parameter r, and then the ws*ws mask template is traversed, with odd-numbered rows and odd-numbered columns set to 1, and the rest set to 0. The mask template is applied by placing the mask template on the image, multiplying the template by the pixel value of the corresponding pixel in the image to obtain the window image, which serves as one of the input windows for subsequent guided filtering.
[0023] 2. Input Image Color Gamut Conversion: If the input image entering the YUV domain is an RGB domain image, RGB to YUV color gamut conversion is required. Subsequent processing applies to single-channel images: the Y channel of a RAW domain image or a YUV domain image.
[0024] 3. Edge Expansion Module: For edge expansion size, the total number of edge expansion rows for RAW domain noise reduction is r*2 rows, and the total number of edge expansion rows for Y domain noise reduction is r rows, where r is the radius parameter, which refers to the window radius excluding the center pixel. If it is RAW domain, it needs to be doubled. See the next module description for details.
[0025] 4. Window Module: The window template and mask template have the same size, ws*ws. For YUV domain images, ws = 2 × r + 1, while for RAW domain images, ws = 4 × r + 1. Unified, this is ws = 2 × C × r + 1. The coefficient C ensures compatibility between RAW and YUV domain window sizes. Furthermore, the mask template ensures compatibility in obtaining the window template.
[0026] 5. Noise Reduction Module: The noise reduction module uses a guided filtering algorithm with its own guide image. The algorithm implementation remains unchanged, so it will not be elaborated here. The focus is on how to achieve compatibility with two different color gamuts. Both the guide image and the image to be filtered are processed as window templates. Zero terms in the window image have no effect on the summation operation, and the number of non-zero terms can be calculated using the value of r. Therefore, as long as the input window images match the color gamut being processed, subsequent operations related to the summation operation, such as calculating the mean, the square of the mean, and the mean of the squares, can be performed smoothly. The window images are obtained as follows: Traverse the image, starting from the first row and first column of pixels (excluding pixels with extended borders), take a ws*ws window, multiply it by the corresponding pixel value of the mask template for that color gamut, and use this as the window image, which is then input into the noise reduction module. After processing by the noise reduction module, repeat the same operation on the first row and second column of pixels, and so on, until the last row and last column of pixels (again, excluding pixels with extended borders) are reached.
[0027] 6. Output filtered image: If the original input image is an RGB domain image, it is necessary to convert the YUV domain image to an RGB domain image before outputting it.
[0028] Working Principle: This invention proposes a guided filtering noise reduction application scheme compatible with both RAW and YUV domains. This scheme not only achieves guided filtering image noise reduction in both RAW and YUV domains, but also supports filtering processing in both color domains without refactoring the code. The following sections of this patent will focus on explaining the code's structural logic to illustrate how the proposed scheme is compatible with guided filtering processes in two different color domains. Figure 3 As shown, the guided filtering algorithm applied to the ISP process uses the image to be filtered itself as the guide image. Guided filtering applications in the RAW and YUV domains are divided into two inputs with different parameters. In the RAW domain, the input mask template has zero terms, and the coefficient C is twice that of the YUV domain. In the YUV domain, all values of the input mask template are 1. The size of the mask template is consistent with the window template size selected for subsequent guided filtering applications. This window size is determined by the user-set window radius parameter r (details of each parameter will be explained in the process description). Based on the given window radius parameter r and the specified coefficient C and mask template in each color gamut input, the subsequent edge-expanding image can be derived. Further calculations are then performed to obtain the window template images required for the noise reduction process. After these differentiated processing steps, guided filtering applications in both color gamuts are perfectly compatible, eliminating the distinction between color gamuts. The final filtered image for each color gamut can be obtained using the exact same algorithm process.
[0029] All components of this invention are general standard parts or parts known to those skilled in the art, and their structures and principles can be learned by those skilled in the art through technical manuals or conventional experimental methods.
[0030] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the invention can be implemented in other specific forms without departing from its spirit or essential characteristics. Therefore, the embodiments should be considered illustrative and non-limiting in all respects, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be included within the present invention. No reference numerals in the claims should be construed as limiting the scope of the claims.
[0031] Furthermore, it should be understood that although this specification describes embodiments, not every embodiment contains only one independent technical solution. This narrative style is merely for clarity. Those skilled in the art should consider the specification as a whole, and the technical solutions in each embodiment can also be appropriately combined to form other embodiments that can be understood by those skilled in the art.
Claims
1. A guided filter noise reduction device compatible with both RAW and YUV domains, characterized in that: It includes a RAW domain input, a YUV domain input, an input image color gamut conversion module, an edge expansion module, a window template module, a noise reduction module, and an output filtered result image module. The coefficient C of the YUV domain input is 1, and the value of all items in the mask template is 1. The coefficient C=2 for the RAW domain ingress, and the mask template contains zero terms. The input image color gamut conversion module is configured to perform RGB-to-YUV color gamut conversion if the input image for the YUV domain ingress is an RGB domain image. The edge expansion module has a total of r×2 rows for RAW domain noise reduction and r rows for YUV domain noise reduction, where r is a specified window radius parameter, which is the window radius excluding the center pixel. The window template in the window template module has the same size as the mask template, which is ws×ws, where ws=2×C×r+1. For YUV domain images, ws=2×r+1, and for RAW domain images, ws=4×r+1. The noise reduction module uses a guided filtering algorithm with its own guided image. The output filtered image module is configured to convert the YUV domain image to an RGB domain image before outputting if the original input image is an RGB domain image.
Citation Information
Patent Citations
Low-light-level image enhancement algorithm based on parabolic function
CN104240194A
RAW domain image denoising method, computer device and computer readable storage medium
CN111784603A