Image noise reduction method, product and vehicle
By dividing the image into pixel matrices of different channels and types, and implementing a combined frequency and spatial domain denoising strategy, the problem that a single algorithm cannot take into account both local image details and overall image processing is solved, resulting in better image denoising performance.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-30
- Publication Date
- 2026-03-31
AI Technical Summary
Existing single noise reduction algorithms have limited applicability and noise reduction capabilities in image processing, resulting in poor image noise reduction effects and an inability to achieve optimal processing of both local image details and the overall image.
The image to be processed is divided into multiple pixel matrices of different channels. Frequency domain denoising strategy is performed according to the type of pixel matrix, and spatial domain denoising is performed in combination with pixel matrices of texture type. Finally, the denoising results are fused.
By employing a noise reduction method that differentiates between channels and types, the characteristics of frequency and spatial domain noise reduction are fully utilized, thereby enhancing the noise reduction effect of the image and improving image quality.
Smart Images

Figure CN121767221A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image processing technology, and more specifically, to an image noise reduction method, product, and vehicle. Background Technology
[0002] Images, as carriers of information, are indispensable in people's daily lives and work, especially in some important applications, such as visual measurement and autonomous driving. Image denoising is a crucial part of image processing, and it directly affects the quality of the output image.
[0003] Currently, when denoising images, a single denoising algorithm is used, such as Gaussian filtering, local adaptive filtering, and nonlocal mean (NLM). However, the applicability and denoising capability of a single denoising algorithm are limited, resulting in insufficient image denoising effect. Summary of the Invention
[0004] This application provides an image denoising method, product, and vehicle, aimed at enhancing the denoising effect of images.
[0005] In a first aspect, embodiments of this application provide an image noise reduction method, the method comprising: The image to be processed is divided into multiple pixel matrices corresponding to different channels; Execute the corresponding frequency domain denoising strategy according to the type of each pixel matrix, and determine the frequency domain denoising result of each pixel in each pixel matrix; Based on the frequency domain denoising results of each pixel in the pixel matrix of each texture type, a spatial domain denoising strategy is executed to determine the spatial domain denoising results of each pixel in the pixel matrix of each texture type. The denoising results of each pixel in the image to be processed, determined in different pixel matrices, are fused to obtain the denoised image corresponding to the image to be processed.
[0006] Optionally, the image to be processed is divided into multiple pixel matrices corresponding to different channels, including: Based on the different channels of the image to be processed, generate channel images corresponding to each channel; Based on a sliding window of preset size and preset step size, select multiple pixel matrices corresponding to each channel in the channel image corresponding to each channel.
[0007] Optionally, the size of the sliding window may be 4*4 or 8*8.
[0008] Optionally, the step size of the sliding window is half the size of the sliding window.
[0009] Optionally, a corresponding frequency domain denoising strategy is executed according to the type of each pixel matrix to determine the frequency domain denoising result of each pixel in each pixel matrix, including: Determine the type of each pixel matrix; Based on the high-frequency coefficient shrinkage threshold corresponding to the type of each pixel matrix, the frequency domain noise reduction result of each pixel in each pixel matrix is determined.
[0010] Optionally, determining the type of each pixel matrix includes: Perform a two-dimensional discrete cosine transform on each pixel matrix to determine the two-dimensional discrete cosine transform coefficient matrix corresponding to each pixel matrix; The type of each pixel matrix is determined based on the two-dimensional discrete cosine transform coefficient matrix corresponding to each pixel matrix.
[0011] Optionally, a two-dimensional discrete cosine transform is performed on each of the pixel matrices to determine the two-dimensional discrete cosine transform coefficient matrix corresponding to each pixel matrix, including: Perform a one-dimensional discrete cosine transform on each column of each pixel matrix to obtain an initial coefficient matrix; After transposing the initial coefficient matrix, a one-dimensional discrete cosine transform is performed on each row of each pixel matrix to generate a two-dimensional discrete cosine transform coefficient matrix corresponding to each pixel matrix.
[0012] Optionally, the formula for the one-dimensional discrete cosine transform is:
[0013] In the formula, c(u) is a constant term:
[0014] in, It is the discrete cosine transform coefficient vector obtained after the one-dimensional discrete cosine transform; u The element index of the one-dimensional discrete cosine transform object; N The number of elements in a one-dimensional discrete cosine transform object; f(n) Indicates the first n The value of each element.
[0015] Optionally, the type of each pixel matrix is determined based on the two-dimensional discrete cosine transform coefficient matrix corresponding to each pixel matrix, including: Based on the set of high-frequency coefficients in the two-dimensional discrete cosine transform coefficient matrix corresponding to each pixel matrix, determine the variance of the set of high-frequency coefficients and the maximum value in the set of high-frequency coefficients; The type of each pixel matrix is determined based on the variance of the high-frequency coefficient set and the maximum value in the high-frequency coefficient set.
[0016] Optionally, the formula for determining the set of high-frequency coefficients in the two-dimensional discrete cosine transform coefficient matrix corresponding to each pixel matrix is as follows:
[0017] in, i , j This refers to any pixel position within each of the pixel matrices; The two-dimensional discrete cosine transform coefficients of any pixel in each pixel matrix; This is the set of low-frequency coefficients for each pixel matrix; This is the set of high-frequency coefficients for each pixel matrix.
[0018] Optionally, the formula for determining the variance of the high-frequency coefficient set includes:
[0019] in, The variance of the set of high-frequency coefficients; M The number of high-frequency coefficients in the set of high-frequency coefficients; The first element in the two-dimensional discrete cosine transform coefficient matrix is... i A high-frequency coefficient.
[0020] Optionally, the type of each pixel matrix is determined based on the variance of the high-frequency coefficient set and the maximum value in the high-frequency coefficient set, including: For any pixel matrix, the pixel matrix is a texture type when the variance of the set of high-frequency coefficients and the maximum value in the set of high-frequency coefficients satisfy the texture type condition.
[0021] Optionally, the type of each pixel matrix is determined based on the variance of the high-frequency coefficient set and the maximum value in the high-frequency coefficient set, including: For any pixel matrix, if the variance of the set of high-frequency coefficients and the maximum value in the set of high-frequency coefficients do not satisfy the texture type condition, the pixel matrix is a non-texture type.
[0022] Optionally, the texture type condition is:
[0023] in, For each of the pixel matrices i =0, j Two-dimensional discrete cosine transform coefficients of pixels with =0; L_ThsThis is a preset low-frequency hard threshold parameter; H_Ths This is a preset high-frequency hard threshold parameter; A max The maximum value in the set of high-frequency coefficients; The variance of the set of high-frequency coefficients; This is the preset high-frequency coefficient variance threshold.
[0024] Optionally, based on the high-frequency coefficient shrinkage threshold corresponding to the type of each pixel matrix, the frequency domain noise reduction result of each pixel in each pixel matrix is determined, including: Based on the current noise level, determine the high-frequency coefficient shrinkage threshold corresponding to the type of each pixel matrix; In the two-dimensional discrete cosine transform coefficient matrix corresponding to each pixel matrix, the coefficients that are less than the high-frequency coefficient shrinkage threshold of the pixel matrix are set to zero to obtain the frequency domain noise reduction coefficient matrix corresponding to each pixel matrix. Based on the frequency domain denoising coefficient matrix corresponding to each pixel matrix, a two-dimensional discrete cosine inverse transform is performed on each pixel matrix to generate the frequency domain denoising result of each pixel in each pixel matrix.
[0025] Optionally, based on the current noise level, a high-frequency coefficient shrinkage threshold corresponding to the type of each pixel matrix is determined, including: Based on the current noise level, the first high-frequency coefficient shrinkage threshold for each texture type pixel matrix and the second high-frequency coefficient shrinkage threshold for each non-texture type pixel matrix are determined from the preset high-frequency coefficient shrinkage threshold library. The preset high-frequency coefficient shrinkage threshold library includes high-frequency coefficient shrinkage thresholds for texture types and non-texture types corresponding to different noise levels.
[0026] Optionally, the method further includes: The current noise level is determined based on the image to be processed and multiple historical images.
[0027] Optionally, determining the current noise level based on the image to be processed and multiple historical images includes: Determine the single-frame noise level estimate for each image in the image to be processed and the multi-frame historical images, respectively; The single-frame noise level estimates of each image are filtered to determine the current noise level.
[0028] Optionally, determining the single-frame noise level estimate for each image in the image to be processed and the multi-frame historical images includes: For each image in the image to be processed and the multi-frame historical images, determine the mean regional noise of multiple preset regions in each image; The mean regional noise of multiple preset regions in each image is filtered to obtain the single-frame noise level estimate of each image.
[0029] Optionally, determining the mean regional noise of multiple preset regions in each image includes: For each image in the image to be processed and the multi-frame historical images, the noise estimation values of multiple regions in each image are calculated respectively; The average of the noise estimates for each region in each image is taken as the average regional noise for each region in each image.
[0030] Optionally, the spatial domain noise reduction strategy includes the NLM algorithm.
[0031] Optionally, based on the frequency domain denoising results of each pixel in the pixel matrix of each texture type, a spatial domain denoising strategy is executed to determine the spatial domain denoising results of each pixel in the pixel matrix of each texture type, including: Using the NLM algorithm, for the frequency domain denoising pixel matrix corresponding to the pixel matrix of each texture type, the frequency domain denoising pixel matrix is divided into multiple neighborhood matrices, and the frequency domain denoising pixel matrix includes the frequency domain denoising result of each pixel in the pixel matrix of the texture type. The spatial domain noise reduction result corresponding to the center pixel of each of the multiple neighborhood matrices is determined respectively.
[0032] Optionally, the denoising results of each pixel in the image to be processed, determined in different pixel matrices, are fused to obtain a denoised image corresponding to the image to be processed, including: For each pixel in the image to be processed, the texture weight and non-texture weight corresponding to each pixel are determined based on the number of frequency domain denoising results determined in pixel matrices of different non-texture types and the number of spatial domain denoising results determined in pixel matrices of different texture types. Based on the texture weights and non-texture weights corresponding to each pixel, all frequency domain denoising results and all spatial domain denoising results corresponding to each pixel are fused to obtain the denoised image corresponding to the image to be processed.
[0033] Optionally, based on the number of frequency domain denoising results determined for each pixel in different non-texture type pixel matrices and the number of spatial domain denoising results determined for each pixel in different texture type pixel matrices, the formula for determining the texture weight and non-texture weight corresponding to each pixel is as follows:
[0034] in, The number of spatial domain noise reduction results determined for each pixel in pixel matrices of different texture types; The number of frequency domain noise reduction results determined for each pixel in different non-texture type pixel matrices; The texture weight; The non-texture weights; A value of 1 indicates a texture type, and a value of 0 indicates a non-texture type; r To focus on processing factors, >1.
[0035] Optionally, based on the texture weights and non-texture weights corresponding to each pixel, all frequency domain denoising results and all spatial domain denoising results corresponding to each pixel are fused to obtain the denoised image corresponding to the image to be processed, including: Based on the texture weight and non-texture weight corresponding to each pixel, the weighted sum of all frequency domain denoising results and all spatial domain denoising results corresponding to each pixel is calculated to determine the fused denoising value corresponding to each pixel. Based on the fused noise reduction values corresponding to each pixel, the noise-reduced image corresponding to the image to be processed is obtained.
[0036] Optionally, based on the texture weights and non-texture weights corresponding to each pixel, a weighted sum is performed on all frequency domain denoising results and all spatial domain denoising results corresponding to each pixel. The formula for determining the fused denoising value corresponding to each pixel is as follows:
[0037] in, BNR The fused noise reduction value corresponds to each pixel; For each pixel corresponding to the first i Denoising results in the spatial domain; For each pixel corresponding to the first j Frequency domain noise reduction results.
[0038] In a second aspect, embodiments of this application provide an electronic device, including: at least one processor and a memory, the memory storing a computer program executable on the processor, wherein the processor executes the computer program to perform the image noise reduction method described in the first aspect of the embodiment.
[0039] Thirdly, embodiments of this application provide a non-volatile readable storage medium storing a computer program, wherein the computer program, when executed by a processor, performs the image noise reduction method described in the first aspect of the embodiment.
[0040] Fourthly, embodiments of this application provide a computer program product, including a computer program / instructions, which, when executed by a processor, implement the image noise reduction method described in the first aspect of the embodiments.
[0041] Fifthly, embodiments of this application provide a vehicle for performing the image noise reduction method described in the first aspect of the embodiments.
[0042] Beneficial effects: This method divides the image to be processed into multiple pixel matrices corresponding to different channels. First, it executes the corresponding frequency domain denoising strategy according to the type of each pixel matrix to determine the frequency domain denoising result of each pixel in each pixel matrix. For texture-type pixel matrices, it further executes the spatial domain denoising strategy according to the frequency domain denoising result of each pixel in each texture-type pixel matrix to determine the spatial domain denoising result of each pixel in each texture-type pixel matrix. Then, it fuses the denoising results of each pixel in the image to be processed in different pixel matrices to obtain the denoised image corresponding to the image to be processed.
[0043] By dividing the image to be processed into multiple pixel matrices corresponding to different channels, frequency domain denoising and spatial domain denoising are performed according to the different types of pixel matrices, giving full play to the characteristics of the frequency domain denoising and spatial domain denoising processes. Finally, the denoising results determined by each pixel in the image to be processed in different types of pixel matrices are fused. Compared with a single denoising algorithm, the denoising effect of the image can be enhanced. Attached Figure Description
[0044] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments of this application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0045] Figure 1 This is a flowchart of the steps of an image denoising method proposed in an embodiment of this application; Figure 2 This is a schematic diagram of the process for determining the type of each pixel matrix according to an embodiment of this application; Figure 3 This is a schematic diagram of the distribution of two-dimensional discrete cosine transform coefficients in a pixel matrix provided in an embodiment of this application; Figure 4 This is a flowchart of an image denoising method proposed in an embodiment of this application; Figure 5This is a schematic diagram of an image noise reduction system proposed in an embodiment of this application; Figure 6 This is a schematic diagram of an electronic device provided in an embodiment of this application; Figure 7 This is a schematic diagram of a non-volatile readable storage medium proposed in an embodiment of this application; Figure 8 This is a schematic diagram of a computer program product proposed in an embodiment of this application. Detailed Implementation
[0046] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0047] CMOS: Complementary Metal Oxide Semiconductor; CFA: Color Filter Array, is a mosaic layer overlaid on an image sensor such as CMOS. It allows only specific wavelengths of light to pass through at specific locations, enabling a monochrome sensor to simultaneously sense different wavelengths of light. Each pixel in a CFA image has only one color component. Bayer CFA is a commonly used color filter array. Bayer domain images are characterized by each pixel containing only one color information, typically with twice the number of green pixels as red or blue pixels. DCT: Discrete Cosine Transform; NLM: Non-Local Means.
[0048] Images, as carriers of information, are indispensable in people's daily lives and work, especially in some important applications, such as visual measurement and autonomous driving. In imaging systems, CMOS sensors are one of the sources of image signal generation, and their manufacturing process and architecture are the root cause of the final imaging quality. However, with the continuous development and maturity of technology in recent years, the situation has been greatly improved.
[0049] The image signal processor (ISP) is the core of the imaging system. Image denoising remains one of the major challenges. The sophistication of denoising algorithms directly affects the image quality output by the system. Therefore, research in this field has never stopped. Currently, most algorithm research is based on processing the ISP output. However, for Bayer domain denoising, due to the special nature of the CFA image format, resource and power consumption factors, existing mature algorithms cannot be directly applied, especially for CMOS sensors with on-chip integrated ISPs.
[0050] In the Bayer domain denoising stage of existing classic ISP Pipelines, most denoising methods still use Gaussian filtering, local adaptive filtering, and nonlocal mean (NLM). The randomness of noise is the basis of these theoretical methods for denoising. However, relying on a single algorithm often fails to take into account both the local details of the image and the optimal processing of the overall image. This is usually one of the biggest problems faced by current denoising algorithms.
[0051] Although significant progress has been made in these traditional denoising algorithms through improvements such as reasonable threshold setting mechanisms, noise estimation, and block self-similarity matching, a single algorithm processing mode still appears weak in some extreme cases and cannot achieve global consideration, resulting in a weak image denoising effect. Therefore, this application provides an image denoising method that can enhance the image denoising effect.
[0052] Reference Figure 1 The diagram illustrates a flowchart of an image denoising method according to an embodiment of this application. The method may specifically include the following steps: S101: Divide the image to be processed into multiple pixel matrices corresponding to different channels.
[0053] The image to be processed can be a Bayer domain CFA image, or an RGB or YUV domain image. Taking a CFA image as an example, a CFA image can be any of BGGR, RGGB, GRBG, or GRBG, and an image includes 4 channels.
[0054] In one feasible implementation, during the process of dividing the image to be processed into multiple pixel matrices corresponding to different channels, channel images corresponding to each channel can be generated according to the different channels of the image to be processed. The channel images include all pixels of the same channel. Then, according to a sliding window of preset size and preset step size, multiple pixel matrices corresponding to each channel are selected in the channel images corresponding to each channel.
[0055] The size and step size of the sliding window can also be set according to the needs of the actual application. For example, in order to reduce the cost of computing resources, the size of the sliding window can be selected as 4*4 or 8*8. For example, when generating multiple pixel matrices for each channel using an 8*8 sliding window, the size of each pixel matrix is 8*8.
[0056] In this embodiment, in order to further reduce the cost of computing resources, the step size of the sliding window is half the size of the sliding window, that is, when generating multiple pixel matrices in each channel image, the sliding window moves 4 pixels per row each time.
[0057] In actual implementation, the image to be processed can be buffered by rows N, and then the current row can be added. The data can be read at intervals on the rising edge of the current clock to obtain the column data of any channel of the image to be processed as a pixel matrix. N can be 7 or 15, thus obtaining multiple 4*4 or 8*8 pixel matrices.
[0058] Since the sliding window generates multiple pixel matrices corresponding to different channels, a pixel in the image to be processed may belong to multiple pixel matrices.
[0059] S102: Execute the corresponding frequency domain denoising strategy according to the type of each pixel matrix, and determine the frequency domain denoising result of each pixel in each pixel matrix.
[0060] Specifically, DCT denoising can be performed on each pixel matrix first to determine the frequency domain denoising result of each pixel in each pixel matrix. In the frequency domain-based DCT denoising process, different high-frequency coefficient shrinkage thresholds are used for different types of pixel matrices.
[0061] Therefore, in the process of implementing the frequency domain noise reduction strategy, it is first necessary to determine the type of each pixel matrix, then determine the high-frequency coefficient shrinkage threshold corresponding to different types of pixel matrices, and then determine the frequency domain noise reduction result of each pixel in each pixel matrix based on the high-frequency coefficient shrinkage threshold corresponding to the type of each pixel matrix.
[0062] Reference Figure 2 This illustration shows a flowchart of an embodiment of the present application for determining the type of each pixel matrix. In one feasible implementation, the process of determining the type of each pixel matrix includes the following steps: A1: Perform a two-dimensional discrete cosine transform on each pixel matrix to determine the two-dimensional discrete cosine transform coefficient matrix corresponding to each pixel matrix.
[0063] The process of two-dimensional discrete cosine transform, or two-dimensional DCT transform, can include two one-dimensional discrete cosine transforms, or one-dimensional DCT transforms.
[0064] Specifically, in the process of performing a two-dimensional discrete cosine transform on each pixel matrix to determine the two-dimensional discrete cosine transform coefficient matrix corresponding to each pixel matrix, a one-dimensional discrete cosine transform is performed on each column of each pixel matrix to obtain an initial coefficient matrix. Then, after transposing the initial coefficient matrix, a one-dimensional discrete cosine transform is performed on each row of each pixel matrix to generate the two-dimensional discrete cosine transform coefficient matrix corresponding to each pixel matrix.
[0065] For example, the formula for the one-dimensional discrete cosine transform is:
[0066] In the formula, c(u) is a constant term:
[0067] in, It is the discrete cosine transform coefficient vector obtained after the one-dimensional discrete cosine transform; u The element index of the one-dimensional discrete cosine transform object; N The number of elements in a one-dimensional discrete cosine transform object; f(n) Indicates the first n The value of each element.
[0068] For example, to reduce the use of multipliers and minimize the area resources required for the transformation process, taking an 8x8 pixel matrix as an example, a one-dimensional discrete cosine transform object can include 8 pixels, i.e. N =8.
[0069] After obtaining the two-dimensional discrete cosine transform coefficient matrix corresponding to each pixel matrix, the type of each pixel matrix can be determined based on the two-dimensional discrete cosine transform coefficient matrix.
[0070] A2: Based on the set of high-frequency coefficients in the two-dimensional discrete cosine transform coefficient matrix corresponding to each pixel matrix, determine the variance of the set of high-frequency coefficients and the maximum value in the set of high-frequency coefficients.
[0071] Reference Figure 3 This illustration shows a schematic diagram of the distribution of two-dimensional discrete cosine transform coefficients in a pixel matrix provided in an embodiment of this application. The two-dimensional discrete cosine transform coefficient matrix of each pixel matrix is divided into a high-frequency coefficient set and a low-frequency coefficient set. The formula for determining the high-frequency coefficient set in the two-dimensional discrete cosine transform coefficient matrix corresponding to each pixel matrix is as follows:
[0072] in, i , j This refers to any pixel position within each of the pixel matrices; The two-dimensional discrete cosine transform coefficients of any pixel in each pixel matrix; This is the set of low-frequency coefficients for each pixel matrix; This is the set of high-frequency coefficients for each pixel matrix.
[0073] Then calculate the variance of the high-frequency coefficient set. Because the general variance formula is complex to calculate and consumes a lot of resources, this embodiment also provides a formula for roughly estimating the variance of a high-frequency coefficient set when the data in the high-frequency coefficient set contains both positive and negative numbers, in order to reduce resource consumption:
[0074] in, The variance of the set of high-frequency coefficients; M The number of high-frequency coefficients in the set of high-frequency coefficients; The first element in the two-dimensional discrete cosine transform coefficient matrix is... i A high-frequency coefficient.
[0075] A3: Determine the type of each pixel matrix based on the variance of the high-frequency coefficient set and the maximum value in the high-frequency coefficient set.
[0076] For any pixel matrix, if the variance of the set of high-frequency coefficients and the maximum value in the set of high-frequency coefficients of the pixel matrix satisfy the texture type condition, the pixel matrix is of texture type; if the variance of the set of high-frequency coefficients and the maximum value in the set of high-frequency coefficients of the pixel matrix do not satisfy the texture type condition, the pixel matrix is of non-texture type.
[0077] Specifically, the texture type condition is:
[0078] in, For each of the pixel matrices i =0, j Two-dimensional discrete cosine transform coefficients of pixels with =0; L_Ths This is a preset low-frequency hard threshold parameter; H_Ths This is a preset high-frequency hard threshold parameter; A max The maximum value in the set of high-frequency coefficients; The variance of the set of high-frequency coefficients; This is the preset high-frequency coefficient variance threshold.
[0079] Low-frequency hard threshold parameters, high-frequency hard threshold parameters, and high-frequency coefficient variance thresholds can be calibrated during practical applications.
[0080] This embodiment determines the type of the pixel matrix in the frequency domain by performing a two-dimensional discrete cosine transform on the pixel matrix. Since noise interference is generally less in the frequency domain, and the two-dimensional discrete cosine transform coefficient matrix of the pixel matrix in the frequency domain is obtained through the two-dimensional DCT transform, the type of the pixel matrix can be determined during the DCT noise reduction process, further saving processing resources.
[0081] In one feasible implementation, the process of determining the frequency domain noise reduction result of each pixel in each pixel matrix according to the high-frequency coefficient shrinkage threshold corresponding to the type of each pixel matrix includes the following steps: B1: Determine the high-frequency coefficient shrinkage threshold corresponding to the type of each pixel matrix based on the current noise level.
[0082] Because the noise level of the image to be processed may vary in the current scene, if a fixed high-frequency coefficient shrinkage threshold is always used, the noise reduction effect of the image will be weakened. Therefore, in this embodiment, the current noise level is determined, and the high-frequency coefficient shrinkage threshold corresponding to different types of pixel matrices that are suitable for the current scene is dynamically selected based on the current noise level.
[0083] In one feasible implementation, when a high-frequency coefficient shrinkage threshold is preset for different types of pixel matrices, the variance of the high-frequency coefficient set in a non-texture type pixel matrix can be used as the numerator of the noise evaluation unit of the current pixel matrix. Then, for a non-texture type pixel matrix, the variance of the high-frequency coefficient set calculated after the pixel matrix undergoes DCT transformation can be mapped to the corresponding high-frequency coefficient shrinkage threshold.
[0084] Generally speaking, in the non-texture pixel matrix of a noisy image, the high-frequency coefficient energy after DCT transformation represents the noise component to some extent. That is, the high-frequency components of the DCT coefficients obtained by cosine transformation in a noisy image are often a superposition of image texture details and noise information.
[0085] in, This represents a vector of high-frequency coefficients containing noise. A vector of high-frequency coefficients representing image details. This represents the high-frequency coefficient vector of noise in the image.
[0086] Based on prior theoretical research, in smooth regions of an image, i.e., non-textured pixel matrices, the detailed information in the smooth regions almost satisfies the following: ~0, that is ~ Therefore, the high-frequency part of the DCT transform coefficients near the smooth block of the image to some extent represents the frequency distribution of noise. Thus, the noise level of the current block can be quantified by the variance of the high-frequency coefficient set obtained from the non-texture type pixel matrix.
[0087] However, to more accurately assess the current noise level, this embodiment provides a method for assessing the current noise level. This method utilizes a single-frame-multi-frame image analysis mechanism to more accurately assess the current noise level. For example, the current noise level can be determined based on the image to be processed and multiple historical images, specifically including the following steps: C1: For each image in the image to be processed and the multi-frame historical images, calculate the noise estimation values for each of the preset regions in each image.
[0088] Specifically, to avoid excessive computation and improve the accuracy of noise estimation, multiple regions can be divided in each image. For example, multiple regions of interest (ROIs) in the image can be predetermined. The distribution, number, and size of the ROIs can be set according to the needs of the actual application. For example, each image can be set to include 9 ROIs, with the largest one in the middle and the remaining 8 ROIs evenly distributed around the middle ROI.
[0089] Then, a fixed number of noise estimates NE(n) are calculated and statistically analyzed for each region, where n is the nth region. The final number of noise level molecules for each region can be set according to the actual application requirements, and this embodiment does not impose any restrictions.
[0090] C2: The average of the noise estimates of multiple preset regions in each image is taken as the average regional noise of multiple regions in each image.
[0091] That is, the noise estimates for each region are averaged to determine the regional noise mean NE for multiple regions. mean (n)=mean(NE(n)), where NE(n) is the vector of noise estimates for the nth region.
[0092] C3: Filter the mean regional noise of multiple preset regions in each image to obtain the single-frame noise level estimate of each image.
[0093] Based on the mean regional noise of each image, a single-frame noise level estimate NE_Frame for each image can be obtained through filtering operations in the current spatial form.
[0094] C4: Filter the single-frame noise level estimates of each image to determine the current noise level.
[0095] Finally, the noise level estimate NE_Frame for each image is filtered to determine the current noise level.
[0096] In practice, the process of filtering a single frame image to obtain a single frame noise level estimate and filtering multiple frames to obtain the current noise level can be done using different filters or by directly using a mean filter.
[0097] After determining the current noise level using the evaluation method provided in this paper, the high-frequency coefficient shrinkage threshold corresponding to different types of pixel matrices can be adaptively configured according to the needs of actual applications.
[0098] For example, for texture-type pixel matrices, the higher the noise level, the more severe the mixing of high-frequency components of detail information with noise will be. Therefore, it is possible to set a very small high-frequency coefficient shrinkage threshold, or not to perform shrinkage processing, that is, the high-frequency coefficient shrinkage threshold is 0. At this time, it is equivalent to not performing DCT denoising on texture-type pixel matrices. Later, the self-similarity matching of the NLM algorithm can be used to achieve denoising processing of texture-type pixel matrices. For non-textured pixel matrices, the coefficient shrinkage threshold can be appropriately increased based on the current noise level to achieve more thorough noise reduction in smooth areas.
[0099] In actual implementation, high-frequency coefficient shrinkage thresholds for different noise levels, as well as for non-texture types, can be pre-stored in a preset high-frequency coefficient shrinkage threshold library.
[0100] After determining the current noise level, based on the preset high-frequency coefficient shrinkage threshold library, the first high-frequency coefficient shrinkage threshold corresponding to the pixel matrix of each texture type and the second high-frequency coefficient shrinkage threshold corresponding to the pixel matrix of each non-texture type are determined.
[0101] B2: In the two-dimensional discrete cosine transform coefficient matrix corresponding to each pixel matrix, set the coefficients that are less than the high-frequency coefficient shrinkage threshold of the pixel matrix to zero to obtain the frequency domain noise reduction coefficient matrix corresponding to each pixel matrix.
[0102] The first high-frequency coefficient shrinkage threshold for textured pixel matrices is small or zero, so weak DCT denoising or no processing is performed on textured pixel matrices; while the second high-frequency coefficient shrinkage threshold for non-texture pixel matrices is relatively large, so strong DCT denoising is performed on non-texture pixel matrices.
[0103] B3: Based on the frequency domain denoising coefficient matrix corresponding to each pixel matrix, perform a two-dimensional discrete cosine inverse transform on each pixel matrix to generate the frequency domain denoising result of each pixel in each pixel matrix.
[0104] The two-dimensional discrete cosine inverse transform, also known as the two-dimensional IDCT transform, is similar to the two-dimensional DCT transform and can be achieved through two one-dimensional IDCT transforms.
[0105] In this embodiment, taking an 8*8 pixel matrix as an example, when performing two-dimensional DCT transformation on each pixel matrix, two one-dimensional DCT transformations are performed on the columns and rows of the pixel matrix. In order to reduce the use of multipliers and minimize the area resources required for the transformation process, the LLM algorithm can be used to perform one-dimensional DCT transformation and IDCT transformation on 8 pixels. Each DCT (IDCT) unit consumes 11 multiplier resources. Under the overall algorithm architecture, the transformation module consumes a total of 3 DCT units and 4 IDCT units, totaling 77 multiplier resources. This setting largely ensures that data overlap is avoided to prevent image block artifacts, while also saving a lot of multiplier resources and improving the system economy.
[0106] In the specific implementation process, each channel of the CFA format image can also be processed separately. Taking the BGGR format as an example, B\GR can be grouped together and GB\R can be grouped together. The processing mode within the same group is consistent, including the number of DCT\IDCT units used and other resources. In addition, only one DCT unit is needed in the first stage of DCT transformation.
[0107] In the DCT noise reduction process, the transformation stage includes four stages: the first stage is column discrete cosine transform, the second stage is row discrete cosine transform, the third stage is column inverse discrete cosine transform, and the fourth stage is row inverse discrete cosine transform. Each stage is connected by a transpose module to ensure the integrity of the data link in the two-dimensional discrete cosine transform and inverse transform process.
[0108] S103: Based on the frequency domain denoising results of each pixel in the pixel matrix of each texture type, execute the spatial domain denoising strategy to determine the spatial domain denoising results of each pixel in the pixel matrix of each texture type.
[0109] If a texture-type pixel matrix has undergone weak DCT denoising or no denoising at all, a spatial domain denoising strategy can be applied to the texture-type pixel matrix after DCT denoising.
[0110] Specifically, the spatial domain noise reduction strategy includes the NLM algorithm.
[0111] After DTC denoising, the generated frequency domain denoised pixel matrix includes the frequency domain denoising results of each pixel in the pixel matrix of the texture type.
[0112] In this embodiment, during the execution of the spatial domain denoising strategy based on the frequency domain denoising results of each pixel in the pixel matrix of each texture type, the NLM algorithm can be used to divide the frequency domain denoising pixel matrix corresponding to the pixel matrix of each texture type into multiple neighborhood matrices, and determine the spatial domain denoising result corresponding to the center pixel of each of the multiple neighborhood matrices.
[0113] For example, taking an 8*8 pixel matrix as an example, the frequency domain denoising pixel matrix obtained after the transformation of the pixel matrix of each texture type through the DTC denoising process is still 8*8. For the frequency domain denoising pixel matrix corresponding to the texture type pixel matrix, it is divided into 4 7*7 neighborhood matrices. Through the NLM algorithm, the spatial domain denoising result corresponding to the center pixel of each 7*7 neighborhood matrix can be obtained. Thus, for the frequency domain denoising pixel matrix corresponding to each 8*8 texture type pixel matrix, the NLM algorithm outputs a 2*2 spatial domain denoising pixel matrix. The spatial domain denoising pixel matrix includes the spatial domain denoising results of the 4 center pixels in the 4 7*7 neighborhood matrices.
[0114] After DCT denoising and NLM-based denoising, DCT denoising is mainly used for non-texture pixel matrices, while NLM denoising is mainly used for texture pixel matrices. This can effectively suppress high-frequency noise, reduce the impact of strong noise in the image, preserve image details, and reduce block artifacts.
[0115] S104: The denoising results of each pixel in the image to be processed, determined in different pixel matrices, are fused to obtain the denoised image corresponding to the image to be processed.
[0116] Due to the sliding window setting, a pixel in the image to be processed can simultaneously be located in multiple textured pixel matrices and multiple non-textured pixel matrices. Therefore, a pixel will have multiple frequency domain denoising results determined in different non-textured pixel matrices, as well as multiple spatial domain denoising results determined in different textured pixel matrices. This overlapping mechanism of denoising results can, on the one hand, fuse the two denoising results to enhance the denoising effect, and on the other hand, can greatly reduce or eliminate the abrupt discontinuity of the image caused by the block effect.
[0117] In one feasible implementation, the process of fusing the denoising results of each pixel in the image to be processed in different pixel matrices to obtain the denoised image corresponding to the image to be processed includes the following steps: D1: For each pixel in the image to be processed, determine the texture weight and non-texture weight corresponding to each pixel based on the number of frequency domain denoising results determined in pixel matrices of different non-texture types and the number of spatial domain denoising results determined in pixel matrices of different texture types.
[0118] Specifically, the formula for determining the texture weight and non-texture weight corresponding to each pixel is as follows:
[0119] in, The number of spatial domain noise reduction results determined for each pixel in pixel matrices of different texture types; The number of frequency domain noise reduction results determined for each pixel in different non-texture type pixel matrices; The texture weight; The non-texture weights; A value of 1 indicates a texture type, and a value of 0 indicates a non-texture type; r To focus on processing factors, >1. In actual implementation, It can be configured according to the actual application requirements.
[0120] when When =1, the weights of the spatial domain denoising results determined in the pixel matrix of the texture type should be non-texture blocks. r In other words, for textured pixel matrices, the fusion result should focus on the NLM denoising result, while for non-texture pixel matrices, the DCT denoising result should be emphasized.
[0121] D2: Based on the texture weights and non-texture weights corresponding to each pixel, fuse all frequency domain denoising results and all spatial domain denoising results corresponding to each pixel to obtain the denoised image corresponding to the image to be processed.
[0122] In one feasible implementation, the process of fusing all frequency domain denoising results and all spatial domain denoising results corresponding to each pixel based on the texture weight and non-texture weight to obtain the denoised image corresponding to the image to be processed includes: Based on the texture weights and non-texture weights corresponding to each pixel, a weighted sum is performed on all frequency domain denoising results and all spatial domain denoising results corresponding to each pixel to determine the fused denoising value corresponding to each pixel; based on the fused denoising value corresponding to each pixel, the denoised image corresponding to the image to be processed is obtained.
[0123] Specifically, based on the texture weights and non-texture weights corresponding to each pixel, a weighted sum is performed on all frequency domain denoising results and all spatial domain denoising results corresponding to each pixel. The formula for determining the fused denoising value corresponding to each pixel is as follows:
[0124] in, BNR The fused noise reduction value corresponds to each pixel; For each pixel corresponding to the first i Denoising results in the spatial domain; For each pixel corresponding to the first j Frequency domain noise reduction results.
[0125] Through fusion, if a pixel has a spatial domain denoising result determined in a pixel matrix of texture type, then the spatial domain denoising result has a greater weight in the fused denoising value.
[0126] Reference Figure 4 The diagram shows a flowchart of the image denoising method provided in the embodiments of this application. The image to be processed is divided into multiple pixel matrices corresponding to different channels. The image undergoes two one-dimensional discrete cosine transforms, i.e., one-dimensional DCT transforms. The two one-dimensional DCT transforms are connected by matrix transpose to ensure the integrity of the data link in the two-dimensional discrete cosine transform process, and the two-dimensional discrete cosine transform coefficient matrix corresponding to each pixel matrix is obtained.
[0127] Based on the two-dimensional discrete cosine transform coefficient matrix, the type of each pixel matrix is determined, the current noise level is evaluated, and the high-frequency coefficient shrinkage threshold corresponding to different types of pixel matrices is determined according to the current noise level. Then, high-frequency coefficient shrinkage is performed using the high-frequency coefficient shrinkage threshold corresponding to different types of pixel matrices. After two one-dimensional inverse discrete cosine transforms, i.e., one-dimensional IDCT transforms, the two one-dimensional IDCT transforms are connected by matrix transpose to ensure the integrity of the data link in the two-dimensional discrete cosine transform process. This yields the frequency domain denoised pixel matrices corresponding to texture type and non-texture type pixel matrices, thus completing DCT denoising.
[0128] For pixel matrices of texture type, the NLM algorithm is used to determine the spatial domain noise reduction result of each pixel in the pixel matrix of each texture type.
[0129] Finally, the denoising results of each pixel in the image to be processed in different pixel matrices are fused to obtain the denoised image corresponding to the image to be processed.
[0130] This method distinguishes between different types of pixel matrices. For textured pixel matrices, it focuses on the NLM algorithm for noise reduction, while for non-texture pixel matrices, it focuses on the DCT algorithm. This fully utilizes the characteristics of both frequency domain noise reduction and spatial domain noise reduction processes. It can adaptively select different noise reduction algorithms based on the differences in local image features, thereby further optimizing the final noise reduction result of the image while balancing noise reduction effect and detail preservation. Compared with a single noise reduction algorithm, it can enhance the noise reduction effect of the image.
[0131] Reference Figure 5 The diagram shows a schematic of an image denoising system provided in an embodiment of this application. The system includes a preprocessing module, a frequency domain denoising module, a spatial domain denoising module, and a denoising fusion module.
[0132] The preprocessing module is used to divide the image to be processed into multiple pixel matrices corresponding to different channels.
[0133] The frequency domain noise reduction module is used to execute the corresponding frequency domain noise reduction strategy according to the type of each pixel matrix, and to determine the frequency domain noise reduction result of each pixel in each pixel matrix.
[0134] The frequency domain noise reduction module mainly includes a DCT_2D forward and inverse transform unit, a transpose unit, a type partitioning unit, a coefficient shrinking unit, a noise level estimation unit, and a data buffer unit.
[0135] The DCT_2D forward and inverse transform unit is used to perform two-dimensional discrete cosine transform and two-dimensional discrete cosine inverse transform of each pixel matrix.
[0136] The transpose unit is used to transpose the process data of the two-dimensional discrete cosine transform and the two-dimensional inverse discrete cosine transform during the DCT noise reduction process, and the data buffer unit is used to temporarily store the process data of the two-dimensional discrete cosine transform and the two-dimensional inverse discrete cosine transform.
[0137] The type division unit is used to determine the type of each pixel matrix based on the two-dimensional discrete cosine transform coefficient matrix corresponding to each pixel matrix.
[0138] The noise level estimation unit is used to more accurately assess the current noise level through a single-frame-multi-frame image analysis mechanism.
[0139] The coefficient shrinking unit is used to determine the high-frequency coefficient shrinking threshold corresponding to the type of each pixel matrix based on the current noise level, and to perform coefficient shrinking.
[0140] The various units of the frequency domain noise reduction module cooperate with each other, and can distinguish the type of pixel matrix during the DCT noise reduction process, and use different high-frequency coefficient shrinkage thresholds for different types of pixel matrices to perform DCT noise reduction.
[0141] Then, the spatial domain denoising module performs denoising on the pixel matrix of each texture type based on the NLM algorithm. Finally, the denoising fusion module fuses the denoising results of each pixel in different pixel matrices to obtain a denoised image.
[0142] Reference Figure 6 The diagram illustrates an electronic device according to an embodiment of this application, including: at least one processor and a memory, the memory storing a computer program executable on the processor, wherein the processor executes the computer program to perform the image noise reduction method described in the embodiment.
[0143] Reference Figure 7 The diagram illustrates a non-volatile readable storage medium provided in an embodiment of this application. The non-volatile readable storage medium stores a computer program, wherein the computer program, when executed by a processor, performs the image noise reduction method described in the embodiment.
[0144] Reference Figure 8 The diagram illustrates a computer program product provided in an embodiment of this application, including a computer program / instructions that, when executed by a processor, implement the image noise reduction method described in the embodiment.
[0145] This application also provides a vehicle for performing the image noise reduction method described in the embodiments.
[0146] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.
[0147] Those skilled in the art will understand that embodiments of this application can be provided as methods, apparatus, or computer program products. Therefore, embodiments of this application can take the form of entirely hardware embodiments, entirely software embodiments, or embodiments combining software and hardware aspects. Furthermore, embodiments of this application can take the form of computer program products implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0148] This application describes embodiments with reference to flowchart illustrations and / or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, as well as combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0149] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing terminal device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0150] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal equipment, causing a series of operational steps to be performed on the computer or other programmable terminal equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable terminal equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0151] Although preferred embodiments of the present application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the embodiments of the present application.
[0152] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes said element.
[0153] This document uses specific examples to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. An image denoising method, characterized in that, The method comprises: dividing the image to be processed into a plurality of pixel matrices corresponding to different channels respectively; performing a corresponding frequency domain noise reduction strategy according to the type of each pixel matrix to determine a frequency domain noise reduction result of each pixel in the pixel matrix; performing a spatial domain noise reduction strategy according to the frequency domain noise reduction result of each pixel in the pixel matrix of each texture type to determine a spatial domain noise reduction result of each pixel in the pixel matrix of each texture type; fusing the noise reduction results determined in different pixel matrices for each pixel in the image to be processed to obtain a noise reduction image corresponding to the image to be processed.
2. The method of claim 1, wherein, The method comprises: generating a channel image corresponding to each channel according to different channels of the image to be processed; selecting a plurality of pixel matrices corresponding to each channel in the channel image corresponding to each channel according to a sliding window with a preset size and a preset step length.
3. The method of claim 2, wherein, The size of the sliding window comprises 4*4 or 8*8.
4. The method of claim 3, wherein, The step length of the sliding window is half of the size of the sliding window.
5. The method of claim 1, wherein, The method comprises: determining the type of each pixel matrix; determining the frequency domain noise reduction result of each pixel in the pixel matrix according to a high frequency coefficient shrinkage threshold value corresponding to the type of each pixel matrix.
6. The method of claim 5, wherein, The method comprises: respectively performing two-dimensional discrete cosine transformation on each pixel matrix to determine a two-dimensional discrete cosine transformation coefficient matrix corresponding to each pixel matrix; determining the type of each pixel matrix according to the two-dimensional discrete cosine transformation coefficient matrix corresponding to each pixel matrix.
7. The method of claim 6, wherein, The method comprises: performing one-dimensional discrete cosine transformation on each column of each pixel matrix to obtain an initial coefficient matrix; after transposing the initial coefficient matrix, performing one-dimensional discrete cosine transformation on each row of each pixel matrix to generate a two-dimensional discrete cosine transformation coefficient matrix corresponding to each pixel matrix.
8. The method of claim 7, wherein, The formula of the one-dimensional discrete cosine transformation is: wherein c(u) is a constant term: in, It is the discrete cosine transform coefficient vector obtained after the one-dimensional discrete cosine transform; u The element index of the one-dimensional discrete cosine transform object; N The number of elements in a one-dimensional discrete cosine transform object; f(n) Indicates the first n The value of each element.
9. The method of claim 8, wherein, The method comprises: determining the variance of a high frequency coefficient set in the two-dimensional discrete cosine transformation coefficient matrix corresponding to each pixel matrix and the maximum value in the high frequency coefficient set; determining the type of each pixel matrix according to the variance of the high frequency coefficient set and the maximum value in the high frequency coefficient set.
10. The method of claim 9, wherein, The formula for determining the high frequency coefficient set in the two-dimensional discrete cosine transformation coefficient matrix corresponding to each pixel matrix is: wherein, i , j is any pixel position in the respective pixel matrix; is a two-dimensional discrete cosine transform coefficient of any pixel in the respective pixel matrix; is a set of low frequency coefficients of the respective pixel matrix; is a set of high frequency coefficients of the respective pixel matrix.
11. The method of claim 9, wherein, The formula for determining the variance of the high frequency coefficient set comprises: wherein, is a variance of the set of high frequency coefficients; M is a number of high frequency coefficients in the set of high frequency coefficients; is a high frequency coefficient in the matrix of two-dimensional discrete cosine transform coefficients at the i th position.
12. The method of claim 9, wherein, determining the type of each pixel matrix according to the variance of the high frequency coefficient set and the maximum value in the high frequency coefficient set. For any pixel matrix, when the variance of the set of high frequency coefficients of the pixel matrix and the maximum value in the set of high frequency coefficients satisfy a texture type condition, the pixel matrix is of a texture type.
13. The method of claim 12, wherein, The type of each pixel matrix is determined according to the variance of the set of high frequency coefficients and the maximum value in the set of high frequency coefficients, including: For any pixel matrix, when the variance of the set of high frequency coefficients of the pixel matrix and the maximum value in the set of high frequency coefficients do not satisfy the texture type condition, the pixel matrix is of a non-texture type.
14. The method of claim 13, wherein, The texture type condition is: wherein, is a two-dimensional discrete cosine transform coefficient of a pixel in the matrix of pixels; i = 0, j = 0; L_ Ths is a preset low frequency hard threshold parameter; H_Ths is a preset high frequency hard threshold parameter; A max is a maximum value in the set of high frequency coefficients; is a variance of the set of high frequency coefficients; is a preset high frequency coefficient variance threshold.
15. The method of claim 6, wherein, The frequency domain denoising result of each pixel in each pixel matrix is determined according to the high frequency coefficient shrinkage threshold corresponding to the type of each pixel matrix, including: The high frequency coefficient shrinkage threshold corresponding to the type of each pixel matrix is determined according to the current noise level; In the two-dimensional discrete cosine transform coefficient matrix corresponding to each pixel matrix, coefficients less than the high frequency coefficient shrinkage threshold of the pixel matrix are set to zero, to obtain a frequency domain denoising coefficient matrix corresponding to each pixel matrix; The two-dimensional discrete cosine inverse transform is performed on each pixel matrix according to the frequency domain denoising coefficient matrix corresponding to each pixel matrix, to generate the frequency domain denoising result of each pixel in each pixel matrix.
16. The method of claim 15, wherein, The high frequency coefficient shrinkage threshold corresponding to the type of each pixel matrix is determined according to the current noise level, including: In a preset high frequency coefficient shrinkage threshold library, a first high frequency coefficient shrinkage threshold corresponding to a pixel matrix of each texture type and a second high frequency coefficient shrinkage threshold corresponding to a pixel matrix of each non-texture type are determined according to the current noise level; The preset high frequency coefficient shrinkage threshold library includes high frequency coefficient shrinkage thresholds of texture types and non-texture types corresponding to different noise levels.
17. The method of claim 15, wherein, The method further includes: The current noise level is determined according to the to-be-processed image and a plurality of historical images.
18. The method of claim 17, wherein, The current noise level is determined according to the to-be-processed image and a plurality of historical images, including: Single-frame noise level estimation values of each image in the to-be-processed image and the plurality of historical images are respectively determined; The single-frame noise level estimation values of each image are filtered to determine the current noise level.
19. The method of claim 18, wherein, Single-frame noise level estimation values of each image in the to-be-processed image and the plurality of historical images are respectively determined, including: For each image in the to-be-processed image and the plurality of historical images, region noise mean values of a plurality of preset regions in the image are determined; The region noise mean values of the plurality of preset regions in each image are filtered to obtain the single-frame noise level estimation value of the image.
20. The method of claim 19, wherein, The region noise mean values of the plurality of preset regions in each image are determined, including: For each image in the to-be-processed image and the plurality of historical images, noise estimation values of a plurality of regions in the image are respectively counted; The mean value of the noise estimation values of the plurality of regions in each image is taken as the region noise mean value of the plurality of regions in the image.
21. The method of claim 1, wherein, The spatial domain denoising strategy includes an NLM algorithm.
22. The method of claim 21, wherein, Based on the frequency domain denoising results of each pixel in the pixel matrix of each texture type, a spatial domain denoising strategy is executed to determine the spatial domain denoising results of each pixel in the pixel matrix of each texture type, including: Using the NLM algorithm, for the frequency domain denoising pixel matrix corresponding to the pixel matrix of each texture type, the frequency domain denoising pixel matrix is divided into multiple neighborhood matrices, and the frequency domain denoising pixel matrix includes the frequency domain denoising result of each pixel in the pixel matrix of the texture type. The spatial domain noise reduction result corresponding to the center pixel of each of the multiple neighborhood matrices is determined respectively.
23. The method of claim 1, wherein, The denoising results of each pixel in the image to be processed, determined in different pixel matrices, are fused to obtain the denoised image corresponding to the image to be processed, including: For each pixel in the image to be processed, the texture weight and non-texture weight corresponding to each pixel are determined based on the number of frequency domain denoising results determined in pixel matrices of different non-texture types and the number of spatial domain denoising results determined in pixel matrices of different texture types. Based on the texture weights and non-texture weights corresponding to each pixel, all frequency domain denoising results and all spatial domain denoising results corresponding to each pixel are fused to obtain the denoised image corresponding to the image to be processed.
24. The method of claim 23, wherein, Based on the number of frequency domain denoising results determined for each pixel in different non-texture type pixel matrices, and the number of spatial domain denoising results determined for each pixel in different texture type pixel matrices, the formula for determining the texture weight and non-texture weight corresponding to each pixel is as follows: wherein, a number of spatial domain noise reduction results determined for the respective pixel in a matrix of pixels of different texture types; a number of frequency domain noise reduction results determined for the respective pixel in a matrix of pixels of different non-texture types; the texture weight; the non-texture weight; taking a value of 1 for a texture type and a value of 0 for a non-texture type; r a focus processing factor, >
1.
25. The method of claim 24, wherein, Based on the texture weights and non-texture weights corresponding to each pixel, all frequency domain denoising results and all spatial domain denoising results corresponding to each pixel are fused to obtain the denoised image corresponding to the image to be processed, including: Based on the texture weight and non-texture weight corresponding to each pixel, the weighted sum of all frequency domain denoising results and all spatial domain denoising results corresponding to each pixel is calculated to determine the fused denoising value corresponding to each pixel. Based on the fused noise reduction values corresponding to each pixel, the noise-reduced image corresponding to the image to be processed is obtained.
26. The method of claim 25, wherein, Based on the texture weights and non-texture weights corresponding to each pixel, a weighted sum is performed on all frequency domain denoising results and all spatial domain denoising results corresponding to each pixel. The formula for determining the fused denoising value corresponding to each pixel is as follows: in, BNR The fused noise reduction value corresponds to each pixel; For each pixel corresponding to the first i Denoising results in the spatial domain; For each pixel corresponding to the first j Frequency domain noise reduction results.
27. An electronic device, comprising: include: At least one processor and a memory storing a computer program executable on the processor, wherein the processor executes the computer program to perform the image noise reduction method according to any one of claims 1-26.
28. A non-transitory readable storage medium, characterized in that, The non-volatile readable storage medium stores a computer program, wherein the computer program, when executed by a processor, performs the image denoising method according to any one of claims 1-26.
29. A computer program product comprising computer programs / instructions, characterized in that, When the computer program / instruction is executed by the processor, it implements the image denoising method according to any one of claims 1-26.
30. A vehicle characterized by The vehicle is used to perform the image denoising method according to any one of claims 1-26.