An image noise reduction method, apparatus, device and medium
By employing the Legendre algorithm to determine the feature values and weights of image pixels, the bilateral filtering algorithm is improved, which solves the problem of unsatisfactory image denoising effect in the existing system, improves the denoising effect and reduces the amount of computation.
Patent Information
- Application Number
- CN202310922524.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-25
- Publication Date
- 2026-03-06
- Estimated Expiration
- 2043-07-25
AI Technical Summary
Existing image denoising techniques are not ideal in terms of denoising effect. Spatial domain algorithms lose image information, frequency domain algorithms produce pseudo textures, and bilateral filtering does not protect texture well.
The Legendre algorithm is used to determine the Legendre feature value of each pixel in the image, and the noise reduction weight is determined based on the Legendre feature value. The bilateral filtering algorithm is then improved for noise reduction.
It improves image noise reduction, reduces computation, protects image boundary areas, and avoids image blurring and contrast degradation.
Smart Images

Figure CN116993609B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing technology, and in particular to an image noise reduction method, apparatus, device, and medium. Background Technology
[0002] Images have a wide range of applications, including biomedicine, military, transportation security, and machine vision. Image quality directly affects the effectiveness of these applications. However, images are inevitably affected by noise during acquisition, processing, and transmission. Therefore, filtering out noise from images is of paramount importance.
[0003] Current image denoising techniques include spatial domain image denoising, frequency domain image denoising, hybrid spatial and frequency domain image denoising, and learning-based image denoising.
[0004] Spatial domain image denoising includes simple algorithms such as mean filtering, Gaussian filtering, and median filtering. These algorithms do not filter boundary regions and flat regions, thus losing a lot of useful image information while denoising, and the denoising effect is relatively poor. Spatial domain image denoising also includes slightly more complex bilateral filtering. Although bilateral filtering processes boundary regions, it does not preserve texture very well.
[0005] Frequency domain image denoising includes wavelet denoising, Discrete Cosine Transform (DCT) denoising algorithms, and others. Frequency domain image denoising algorithms transform the spatial domain of an image into the frequency domain, perform denoising in the frequency domain, and then transform the denoised image back into the spatial domain. However, different transformation methods can produce different pseudo-textures when transforming the denoised image from the frequency domain to the spatial domain, resulting in textures in the final denoised image that were not present in the original image. Furthermore, frequency domain image denoising is less effective than spatial domain image denoising in denoising large amounts of noise.
[0006] In summary, current image noise reduction technologies suffer from problems such as unsatisfactory noise reduction results. Summary of the Invention
[0007] This application provides an image denoising method, apparatus, device, and medium to address the problem that existing image denoising techniques have unsatisfactory denoising effects.
[0008] In a first aspect, embodiments of this application provide an image noise reduction method, the method comprising:
[0009] Obtain the pixel value of each pixel in the image to be denoised;
[0010] Each pixel is treated as a target pixel, and the following processing is performed:
[0011] For the current target pixel, determine the first neighborhood containing the target pixel, and based on the pixel value of each pixel contained in the first neighborhood, use the Legendre algorithm to determine the Legendre feature value corresponding to the target pixel.
[0012] For the current target pixel, the noise reduction weights corresponding to each pixel in the first neighborhood are determined based on the Legendre feature values of each pixel in the first neighborhood containing the target pixel. The target pixel is then denoised based on the noise reduction weights corresponding to each pixel in the first neighborhood and the pixel value of each pixel.
[0013] Secondly, embodiments of this application also provide an image noise reduction apparatus, the apparatus comprising:
[0014] The acquisition module is used to acquire the pixel value of each pixel in the image to be denoised;
[0015] The noise reduction module sequentially treats each pixel as a target pixel and performs the following processing: For the current target pixel, it determines the first neighborhood containing the target pixel, and uses the Legendre algorithm to determine the Legendre feature value corresponding to the target pixel based on the pixel value of each pixel in the first neighborhood; For the current target pixel, it determines the noise reduction weight corresponding to the target pixel for each pixel in the first neighborhood based on the Legendre feature value of each pixel in the first neighborhood; Based on the noise reduction weight corresponding to the target pixel for each pixel in the first neighborhood and the pixel value of each pixel, it performs noise reduction on the target pixel.
[0016] Thirdly, embodiments of this application also provide an electronic device, which includes at least a processor and a memory, wherein the processor is configured to execute a computer program stored in the memory to implement the steps of the image noise reduction method as described in any of the preceding claims.
[0017] Fourthly, embodiments of this application also provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the image denoising method as described in any of the preceding claims.
[0018] In this embodiment, the pixel value of each pixel in the image to be denoised is obtained; each pixel is then treated as a target pixel and the following processing is performed: for the current target pixel, a first neighborhood containing the target pixel is determined, and based on the pixel value of each pixel in the first neighborhood, the Legendre algorithm is used to determine the Legendre feature value corresponding to the target pixel; for the current target pixel, based on the Legendre feature value of each pixel in the first neighborhood containing the target pixel, the denoising weight corresponding to the target pixel is determined; and based on the denoising weight corresponding to the target pixel in the first neighborhood and the pixel value of each pixel, denoising is performed on the target pixel. Because this embodiment uses the Legendre algorithm to determine the Legendre feature value of each pixel in the image and determines the denoising weight corresponding to the target pixel in the first neighborhood based on the Legendre feature value, it improves the problem of unsatisfactory denoising effect caused by inaccurate weight calculation in spatial domain denoising algorithms, thereby improving the denoising effect. Attached Figure Description
[0019] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying 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.
[0020] Figure 1 This is a schematic diagram of an image noise reduction process provided in an embodiment of this application;
[0021] Figure 2 A schematic diagram of the pixel values of each pixel in a first neighborhood provided in an embodiment of this application;
[0022] Figure 3 A schematic diagram illustrating the correspondence between a preset brightness value and noise reduction intensity, provided for an embodiment of this application;
[0023] Figure 4 This is a schematic diagram of an image noise reduction process provided in an embodiment of this application;
[0024] Figure 5 This is a schematic diagram of an image noise reduction device provided in an embodiment of this application;
[0025] Figure 6 This is a schematic diagram of an electronic device structure provided in an embodiment of this application. Detailed Implementation
[0026] To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0027] This application provides an image denoising method, apparatus, device, and medium. The method involves acquiring the pixel value of each pixel in an image to be denoised; sequentially treating each pixel as a target pixel and performing the following processing: for the current target pixel, determining a first neighborhood containing the target pixel, and using the Legendre algorithm to determine the Legendre feature value corresponding to the target pixel based on the pixel value of each pixel in the first neighborhood; for the current target pixel, determining the denoising weight corresponding to the target pixel for each pixel in the first neighborhood based on the Legendre feature value of each pixel in the first neighborhood; and denoising the target pixel based on the denoising weight corresponding to the target pixel for each pixel in the first neighborhood and the pixel value of each pixel. Because the Legendre algorithm is used to determine the Legendre feature value of each pixel in the image, and the denoising weight corresponding to the target pixel in the first neighborhood is determined based on the Legendre feature value, the problem of inaccurate weight calculation in spatial domain denoising algorithms leading to insufficient denoising effect is improved, thus enhancing the denoising effect.
[0028] Example 1:
[0029] Figure 1 This application provides a schematic diagram of an image denoising process, which includes:
[0030] S101: Obtain the pixel value of each pixel in the image to be denoised.
[0031] The image noise reduction method provided in this application is applied to electronic devices, such as personal computers (PCs), servers, image acquisition devices, etc.
[0032] For example, if the electronic device is not an image acquisition device, then the electronic device can acquire the image to be denoised acquired by the image acquisition device.
[0033] As another example, if the electronic device is an image acquisition device, then the image acquisition device can acquire the image to be denoised that it has acquired.
[0034] The image to be denoised can be an unprocessed original image acquired in real time, or an image obtained after processing the original image. For example, methods of processing the original image to obtain the image to be denoised include, but are not limited to, cropping, segmenting, and stitching the original image.
[0035] After acquiring the image to be denoised, the pixel value of each pixel in the image to be denoised is determined. In this embodiment, each pixel in the image to be denoised is taken as the target pixel, and the following processing steps S102 and S103 are performed sequentially.
[0036] It is understood that the denoising process of one pixel in the image to be denoised is mainly described in this application embodiment. The denoising process of each pixel in the image to be denoised is similar and will not be repeated.
[0037] S102: For the current target pixel, determine the first neighborhood containing the target pixel, and based on the pixel value of each pixel contained in the first neighborhood, use the Legendre algorithm to determine the Legendre feature value corresponding to the target pixel.
[0038] For a given target pixel, a first neighborhood containing that target pixel can be determined. In this embodiment, when determining the first neighborhood containing the target pixel, the target pixel can be used as the center pixel in the first neighborhood, or it can be used as a pixel at a fixed position in the first neighborhood, such as the top left or bottom right corner. Using the target pixel as the center pixel of the first neighborhood allows for a better combination of the features of nearby pixels; and since the features of a pixel are more similar to those of pixels farther away than those of nearby pixels, using the target pixel as the center pixel of the first neighborhood makes the Legendre eigenvalue determined for that target pixel more accurate.
[0039] For example, the first neighborhood can be determined in two ways, including but not limited to:
[0040] Method 1: In the image to be denoised, the region centered on the target pixel and with a radius of pixel length r is defined as the first neighborhood containing the target pixel. The size of the first neighborhood is (2r+1)×(2r+1), where the pixel length r represents the number of pixels, and r is a positive integer. Within this first neighborhood, the pixel value of each pixel is denoted as f(x,y), where (x,y) represents the coordinates of each pixel within the first neighborhood, and x and y are integers within the range [-r, r]. The coordinates of the center pixel are (0,0). Figure 2The diagram shows the pixel values of each pixel in the first neighborhood. The target pixel is taken as the center pixel, and the coordinates of the center pixel are marked as (0,0) and the pixel value is recorded as f(0,0). The radius r is taken as 2 pixels in length to obtain a first neighborhood of size 5×5. The coordinates of each pixel in the first neighborhood are marked as (x,y) and the pixel value is recorded as f(x,y), where x and y are integers in the range [-2, 2].
[0041] Method 2: In the image to be denoised, a region centered on the target pixel, with a length of pixel length *a* and a width of pixel length *b*, is defined as the first neighborhood containing the target pixel. The size of the first neighborhood is *a*×*b*. Here, pixel length *a* represents the number of pixels contained in the first neighborhood along its length, and pixel length *b* represents the number of pixels contained in the first neighborhood along its width. *a* and *b* are positive integers, and it is understood that to ensure the target pixel is centered within the first neighborhood, *a* and *b* are usually odd numbers. Furthermore, (x, y) represents the coordinates of each pixel within the first neighborhood, where *x* is the coordinate of the pixel within the first neighborhood. Integers within, y is a range of The integer within the range; and the coordinates of the center pixel are set to (0,0).
[0042] The first neighborhood also includes the target pixel within all pixels. For example, if the first neighborhood is a region with a radius of 2 pixels centered at a certain pixel, then the first neighborhood contains 5×5 pixels, and the target pixel is included in all of these 5×5 pixels.
[0043] Furthermore, regarding Method 1 and Method 2, Method 1 focuses more on the features of pixels adjacent to the target pixel, while Method 2 focuses on the features of pixels farther away from the target pixel. Considering that pixels closer to the target pixel generally have a higher similarity and are better able to characterize its features, Method 1 is typically used to determine the first neighborhood of the target pixel. This application embodiment mainly describes the first neighborhood determined by Method 1; the processing of the first neighborhood determined by Method 2 is similar and will not be repeated.
[0044] For a given target pixel, after determining its first neighborhood, the Legendre algorithm is used to extract features from each pixel within that first neighborhood based on its pixel value, thus determining the Legendre feature value corresponding to the target pixel. It's understandable that a larger first neighborhood (i.e., containing more pixels) generally contains more local information, resulting in more features being extracted using the Legendre algorithm. This allows the determined Legendre feature value to better represent the characteristics of the target pixel and its surrounding pixels.
[0045] S103: For the current target pixel, determine the noise reduction weight of the target pixel corresponding to each pixel in the first neighborhood based on the Legendre feature value of each pixel in the first neighborhood containing the target pixel; perform noise reduction on the target pixel based on the noise reduction weight of the target pixel corresponding to each pixel in the first neighborhood and the pixel value of each pixel.
[0046] For the current target pixel, based on the Legendre eigenvalues of each pixel within the first neighborhood containing the target pixel, the difference between the Legendre eigenvalues of each pixel and the target pixel can be determined. Then, using the denoising weight calculation method in the improved bilateral filtering denoising algorithm, the denoising weight corresponding to the target pixel for each pixel within the first neighborhood is determined. Considering that inaccurate denoising weight calculation in the bilateral filtering denoising algorithm can lead to blurred image edges and decreased image contrast, this embodiment replaces the bilateral value domain in the bilateral filtering denoising algorithm with Legendre eigenvalues to determine the improved bilateral filtering denoising algorithm. This improves the denoising effect by using Legendre eigenvalues instead of the bilateral value domain.
[0047] Furthermore, since the total number of sub-Legendary features in the Legendre feature values of a target pixel obtained by the Legendre algorithm is usually less than the total number of pixels in the first neighborhood of the target pixel, the method in this application that determines the denoising weight corresponding to the pixel based on the Legendre feature value and performs denoising on the target pixel based on the denoising weight is more effective than the more complex nonlocal mean filtering algorithm in spatial domain image denoising that directly uses the first neighborhood as a block and performs denoising filtering based on block similarity matching. This method not only achieves the same denoising effect as the nonlocal mean filtering algorithm and improves the protection of boundary regions, but also reduces the computational logic of block comparison, reduces the amount of computation, and also avoids the problem that the nonlocal mean filtering algorithm is not suitable for general chips due to excessive computing power.
[0048] For each target pixel in the image to be denoised, after determining the denoising weight of each pixel in the first neighborhood of the target pixel, the pixels in the first neighborhood of the target pixel can be fused according to the denoising weight to determine the denoised pixel value of the target pixel, and the target pixel can be denoised.
[0049] In this embodiment, the Legendre algorithm is used to determine the Legendre feature value of each pixel in the image, and the noise reduction weight of each pixel in the first neighborhood of the target pixel is determined according to the Legendre feature value. This improves the problem of inaccurate weight calculation in the spatial domain noise reduction algorithm, which leads to poor noise reduction effect and enhances the noise reduction effect. At the same time, it can reduce the calculation logic of block comparison and reduce the amount of computation.
[0050] Example 2:
[0051] To further reduce the computational load, based on the above embodiments, in this embodiment, the Legendre algorithm is used to determine the Legendre feature value corresponding to the target pixel based on the pixel value of each pixel contained in the first neighborhood, including:
[0052] Based on the number of pixels contained in the length and width directions of the first neighborhood, determine the first and second coefficients of the Legendre feature contained in the Legendre feature value corresponding to the target pixel; wherein the first and second coefficients of the Legendre feature are equal, and the product of the first and second coefficients of the Legendre feature is less than the product of the number of pixels contained in the length and width directions.
[0053] The Legendre eigenvalue of the target pixel is determined based on the first coefficient, the second coefficient, and the pixel value of each pixel contained in the first neighborhood.
[0054] The Legendre feature value corresponding to the target pixel contains a first coefficient and a second coefficient of the Legendre feature. The product of the first coefficient and the second coefficient represents the number of sub-Legendre feature values contained in the Legendre feature value. In the embodiments of this application, based on the first coefficient and the second coefficient of the Legendre feature value, a first sub-coefficient and a second sub-coefficient corresponding to each sub-Legendre feature value are determined, wherein the first sub-coefficient is less than the first coefficient and the second sub-coefficient is less than the second coefficient. The first sub-coefficient and the second sub-coefficient of each sub-Legendre feature value can be used to distinguish it from other sub-Legendre feature values in the Legendre feature value.
[0055] For example, suppose the Legendre feature value corresponding to the target pixel contains M×N sub-Legendre feature values, where M is the first coefficient of the Legendre feature and N is the second coefficient of the Legendre feature; the first sub-coefficient of each sub-Legendre feature value is m and the second sub-coefficient is n, then each sub-Legendre feature value is represented as C. m,n , where m is an integer in the range [0, M-1] and n is an integer in the range [0, N-1].
[0056] After determining the first neighborhood of the target pixel, the number of pixels contained in the length direction and the number of pixels contained in the width direction of the first neighborhood are determined. Since the total number of sub-Legendary feature values in the Legendre feature value of the target pixel is less than the total number of pixels contained in the first neighborhood, in order to further reduce the amount of computation in this embodiment, the total number of pixels contained in the first neighborhood can be determined based on the number of pixels contained in the length and width directions of the first neighborhood. And the first coefficient and the second coefficient of the Legendre feature are determined based on the total number of pixels contained in the first neighborhood. The product of the first coefficient and the second coefficient of the Legendre feature is less than the product of the number of pixels contained in the length and width directions of the first neighborhood.
[0057] For example, when the first neighborhood is determined in method one of S102, the product of the first coefficient and the second coefficient is less than the product of the number of pixels contained in the length and width directions of the first neighborhood, satisfying M×N≤(2r+1). 2 Furthermore, since each sub-Legendary feature value can represent the features of all pixels in the first neighborhood of the target pixel, in the embodiments of this application, M×N<<(2r+1) in general. 2 In other words, even if the total number of sub-Legendary eigenvalues in the Legendre eigenvalues of a target pixel is much smaller than the total number of pixels contained in the first neighborhood, the Legendre eigenvalues of the target pixel can still characterize the features of all pixels in the first neighborhood of the target pixel. For example, for local information within a first neighborhood with a radius of 7 pixels, M and N can be set to 5, and M and N satisfy M×N << (2r+1). 2 This allows the 5×5 sub-Legendary feature values in the Legendre feature values to represent the features of 15×15 pixels in the first neighborhood, and achieves a better noise reduction effect. For example, in the embodiments of this application, the number of sub-Legendary feature values included in the Legendre feature values can be 0-20% of the number of pixels included in the first neighborhood, which can achieve a better noise reduction effect.
[0058] Furthermore, considering that the Legendre polynomials in the Legendre algorithm have orthogonality, i.e., if the first and second coefficients of the Legendre feature are different, then the integral result of the Legendre feature on the interval [-1, 1] is 0; if the first and second coefficients of the Legendre feature are the same, then the integral result of the Legendre feature on the interval [-1, 1] is not 0, therefore, in the embodiments of this application, the first and second coefficients of the Legendre feature are generally determined to be the same value, i.e., M = N.
[0059] For each sub-Legendary feature value in the Legendre feature value, the first and second sub-coefficients corresponding to the sub-Legendary feature value are determined based on the first and second coefficients of the Legendre feature; the sub-Legendary feature value is determined based on the first and second sub-coefficients corresponding to the sub-Legendary feature value and the pixel value of each pixel contained in the first neighborhood.
[0060] Each sub-Legend eigenvalue satisfies the following formula:
[0061]
[0062] Among them, C m,n Let m be the first sub-coefficient of the sub-Legendé eigenvalue, n be the second sub-coefficient of the sub-Legendé eigenvalue, (2r+1)×(2r+1) represent the size of the first neighborhood centered at the target pixel with radius r, and f(y,x) represent the pixel value of the pixel with coordinates (y,x) in the first neighborhood. The Legendre orthogonal basis corresponding to the first child coefficient of the child Legendre eigenvalues. For the input data of the Legendre orthonormal basis, The Legendre orthogonal basis corresponding to the second child coefficients of the Legendre eigenvalues. The input data is for the Legendre orthogonal basis.
[0063] The recursive formula for the Legendre orthogonal basis can satisfy the following formula:
[0064]
[0065] Furthermore, since the Legendre orthogonal basis requires the input data x to be in the range of [-1, 1], in this embodiment, the input data x that satisfies the range of [-1, 1] will be... and As input data for Legendre orthogonal bases.
[0066] After determining each sub-Legendée feature value, the Legendre feature value of the target pixel is determined based on each sub-Legendée feature value contained in the Legendre feature value. The process of determining the Legendre feature value based on each sub-Legendée feature value is existing technology and will not be described in detail here.
[0067] Compared to current image denoising algorithms that achieve relatively good noise reduction effects but have high computational overhead and require significant computing power, making them difficult to apply in actual products, hybrid spatial and frequency domain image denoising algorithms (such as Block Matching 3D (BM3D) and Weighted Nuclear Norm Minimization (WNNM) algorithms) and learning-based image denoising algorithms (such as deep learning and dictionary learning algorithms), in this embodiment, since the number of sub-Legendary eigenvalues contained in the Legendre eigenvalues corresponding to the target pixel is less than the number of pixels contained in the first neighborhood, determining the Legendre eigenvalue corresponding to each target pixel and using the target pixel's Legendre eigenvalue for subsequent noise reduction processes can further reduce the computational load.
[0068] Example 3:
[0069] To further improve the noise reduction effect, based on the above embodiments, in this embodiment, the noise reduction weight of each pixel in the first neighborhood corresponding to the target pixel is determined according to the Legendre feature value of each pixel in the first neighborhood containing the target pixel, including:
[0070] For each pixel in the first neighborhood, determine the difference between the Legendre eigenvalue of the pixel and the Legendre eigenvalue of the target pixel; based on the relative position information between the pixel and the target pixel, the difference, and the noise reduction intensity corresponding to the target pixel, determine the noise reduction weight of the pixel corresponding to the target pixel.
[0071] Currently, one of the most crucial steps in image denoising is determining the denoising weights. Taking bilateral filtering as an example, for each pixel within the first neighborhood, bilateral filtering calculates the denoising weight for the corresponding target pixel primarily by using the pixel values and position information of the target pixel and the current pixel. Specifically, bilateral filtering... Determine the noise reduction weights for each pixel in the first neighborhood corresponding to the target pixel; where W q,p ′ The denoising weights for the target pixel corresponding to the first neighboring pixel determined by bilateral filtering are given by p, where p represents the target pixel and d represents the target pixel. p For the position information of the target pixel, I p Let q represent the pixel value of the target pixel, and d represent the pixels in the first neighborhood of the target pixel. q For the position information of this pixel, I qLet be the pixel value of the target pixel, Desigma be the noise reduction intensity of the target pixel, and σ be a preset first parameter. The L2 norm of a vector is denoted by . For example, the specific formula corresponding to this L2 norm is: x q Let x and y be the x and y coordinates of pixel p in the first neighborhood of the target pixel. q Let x be the ordinate of pixel p. p Let y be the x-coordinate of the target pixel q. p Let q be the ordinate of the target pixel.
[0072] According to the formula for the noise reduction weights of the bilateral filter mentioned above, the noise reduction weights of the bilateral filter are determined by the spatial domain. Sum range It consists of two parts, and the spatial domain weight is adjusted by the first parameter σ, and the value domain weight is adjusted by Desigma, thereby determining the denoising weight of each pixel in the first neighborhood relative to the target pixel. It can be understood that for the same pixel in the image to be denoised, when the pixel is located in the first neighborhood of different target pixels, the pixel corresponds to different denoising weights for different target pixels.
[0073] Bilateral filtering denoising directly uses the difference between pixel values to calculate denoising weights. However, when using pixel values directly, the denoising weights calculated from the difference between two pixels only represent the features of those two pixels and cannot represent the features of nearby pixels. This leads to inaccurate denoising weight calculations, resulting in blurred image edges and decreased image contrast. Therefore, considering that the Legendre eigenvalue of each pixel can represent the features of all pixels within its first neighborhood, this embodiment uses Legendre eigenvalues instead of the range weights in bilateral filtering. The denoising weights calculated from the difference between the Legendre eigenvalues of two pixels can represent the features of all pixels within their corresponding first neighborhood, thereby improving the denoising effect.
[0074] In this embodiment, for each pixel within the first neighborhood of the target pixel, the process iterates through each pixel in the first neighborhood and determines the relative position information between the pixel and the target pixel based on the pixel's position information and the target pixel's position information. Specifically, this can involve determining the distance information between the pixels. It is understood that when a pixel in the first neighborhood is the target pixel itself, the pixel's position information is the same as the target pixel's position information, and therefore the relative position between the pixel and the target pixel is 0.
[0075] The position information of the target pixel can be either the absolute position information of the target pixel in the image to be denoised, or the relative position information of the target pixel in the first neighborhood. If the position information of the target pixel is the absolute position information of the target pixel in the image to be denoised, then the position information of the pixels in the first neighborhood of the target pixel is the absolute position information of the pixel in the image to be denoised. If the position information of the target pixel is the relative position information of the target pixel in the first neighborhood, then the position information of the pixels in the first neighborhood of the target pixel is the relative position information of the pixel in the first neighborhood.
[0076] For each pixel within the first neighborhood of the target pixel, iterate through each pixel in the first neighborhood and determine the difference between their Legendre feature values based on the Legendre feature value of the current pixel and the Legendre feature value of the target pixel. Specifically, subtract the Legendre feature values of the current pixel and the target pixel that have the same first and second sub-coefficients to determine the difference between their Legendre feature values. It can be understood that when a pixel in the first neighborhood is the target pixel itself, its Legendre feature value is the same as the target pixel's Legendre feature value, and therefore the difference between their Legendre feature values is 0.
[0077] After determining the relative position information between the target pixel and the pixels in its first neighborhood, as well as the difference between their Legendre eigenvalues, the noise reduction weights corresponding to the target pixel within the first neighborhood are determined based on the relative position information between the target pixel and the pixels in its first neighborhood, the difference, and the noise reduction intensity corresponding to the target pixel. Specifically, this can be achieved using the following formula: Determine the noise reduction weights corresponding to the target pixel within the first neighborhood. Where C p,m,n C is the sub-Legendary eigenvalue of the target pixel p, with the first sub-coefficient being m and the second sub-coefficient being n; q,m,nσ is the sub-Legendary eigenvalue of pixel q within the first neighborhood of the target pixel, with the first sub-coefficient being m and the second sub-coefficient being n; s The parameter is a preset parameter, and the preset parameter σ s The value of the first parameter σ can be the same as or different from the first parameter σ, without specific restrictions. Here, m is an integer in the range [0, M-1], n is an integer in the range [0, N-1], M is the first coefficient of the Legendre characteristic, and N is the second coefficient of the Legendre characteristic.
[0078] In this context, the noise reduction weight of the pixel corresponding to the target pixel within the first neighborhood is the noise reduction weight of that pixel relative to the target pixel. The closer the relative position of the pixel and the target pixel, and the smaller the difference in Legendre eigenvalues, the higher the similarity between the pixel and the target pixel, and thus the greater the noise reduction weight of that pixel relative to the target pixel. Furthermore, it can be understood that when the pixel in the first neighborhood is the target pixel itself, the relative position of the pixel and the target pixel, and the difference in Legendre eigenvalues, are both 0. Therefore, according to the calculation formula for the noise reduction weight of the pixel corresponding to the target pixel within the first neighborhood, the noise reduction weight calculated for that pixel relative to the target pixel is 1.
[0079] In this embodiment, Legendre eigenvalues are used instead of the range weights in bilateral filtering. The noise reduction weights are determined by the difference between the Legendre eigenvalues of the first neighboring pixels and the target pixel, as well as their relative positions, which can further improve the noise reduction effect.
[0080] Example 4:
[0081] Based on the above embodiments, in this embodiment, determining the noise reduction weight of the target pixel corresponding to the pixel, based on the relative position information and difference between the pixel and the target pixel value, and the noise reduction intensity corresponding to the target pixel, includes:
[0082] according to Determine the noise reduction weights for the target pixel corresponding to this pixel, where W q,p d represents the noise reduction weight of the target pixel corresponding to this pixel. p For the position information of the target pixel p, d q For the position information of pixel q, C p Let C be the Legendre eigenvalue of the target pixel. q Let σ be the Legendre eigenvalue of the pixel, Desigma be the noise reduction intensity corresponding to the target pixel, and σ be the noise reduction intensity. s These are the preset parameters.
[0083] As can be seen from the above embodiments, it is possible to... Determine the noise reduction weights of the target pixel corresponding to the pixel in the first neighborhood, and C p,m,n Let m be the first sub-coefficient m and n be the second sub-coefficient n in the Legendre eigenvalues of the target pixel p. For the target pixel p, the expansion of the Legendre eigenvalues of the target pixel p can satisfy the following formula:
[0084]
[0085] Wherein, each sub-Legend eigenvalue C contained in the expansion of the Legendre eigenvalues above p,m,n These are expressions corresponding to specific values for the first sub-coefficient m and the second sub-coefficient n. Similarly, the expansion of the Legendre eigenvalue of each pixel in the first neighborhood of the target pixel is similar to the expansion of the Legendre eigenvalue of the target pixel p, and will not be elaborated here.
[0086] Combining the expansion of Legendre's eigenvalues and the second norm of the vector, we can apply the above W... q,p = The formula was rearranged and determined to be W. q,p = And according to Determine the noise reduction weight of the target pixel corresponding to the pixel in the first neighborhood.
[0087] Example 5:
[0088] To further improve the noise reduction effect, based on the above embodiments, the process for determining the noise reduction intensity corresponding to the target pixel in this embodiment is as follows:
[0089] Obtain the target brightness value corresponding to the target pixel;
[0090] Based on the preset correspondence between brightness value and noise reduction intensity, the noise reduction intensity corresponding to the target brightness value is taken as the noise reduction intensity corresponding to the target pixel.
[0091] For the current target pixel, the target brightness value is determined by using a mean filtering algorithm based on the pixel values of each pixel in the first neighborhood of the target pixel.
[0092] The target brightness value corresponding to the target pixel satisfies the formula: Lum = MeanFilter Ω(I), where Lum is the target brightness value corresponding to the target pixel, MeanFilter represents mean filtering, Ω represents the first neighborhood of the target pixel, and I represents the image to be denoised. The smaller the target brightness value, the more the target pixel tends to be in a dark area; the larger the target brightness value, the more the target pixel tends to be in a bright area. The process of determining the target brightness value corresponding to a pixel using mean filtering is existing technology and will not be described further in this embodiment.
[0093] After determining the target brightness value of the target pixel, the noise reduction intensity corresponding to the target brightness value is determined based on the preset correspondence between brightness value and noise reduction intensity stored in the electronic device and the target brightness value of the target pixel; and the noise reduction intensity corresponding to the target brightness value is used as the noise reduction intensity corresponding to the target pixel.
[0094] Since noise is typically higher in dark areas and lower in bright areas, the predefined correspondence between brightness values and noise reduction intensity in this embodiment includes: when the brightness value is less than a first brightness threshold, the noise reduction intensity corresponding to that brightness value is determined to be a first noise reduction intensity; when the brightness value is greater than a second brightness threshold, the noise reduction intensity corresponding to that brightness value is determined to be a second noise reduction intensity, wherein the first brightness threshold is less than the second brightness threshold, and the first noise reduction intensity is greater than the second noise reduction intensity. When the brightness value is not less than the first brightness threshold and not greater than the second brightness threshold, the brightness value is used as the independent variable and the noise reduction intensity is used as the dependent variable, and a linear relationship between the brightness value and the noise reduction intensity is determined based on the first brightness threshold, the first noise reduction intensity, the second brightness threshold, and the second noise reduction intensity.
[0095] Specifically, the relationship between the preset brightness value and the noise reduction intensity can be as follows: Figure 3 As shown, Figure 3 The horizontal axis represents the luminance value Lum, and the vertical axis represents the noise reduction intensity Desigma. Thr0 is the first luminance threshold, Thr1 is the second luminance threshold, Desigma0 is the first noise reduction intensity, and Desigma1 is the second noise reduction intensity. Furthermore, the preset correspondence between luminance values and noise reduction intensities satisfies the formula...
[0096] In this embodiment, considering that dark areas have relatively large noise and bright areas have relatively small noise, the electronic device stores a correspondence between brightness values and noise reduction intensity, assigning stronger noise reduction strength values to dark areas and weaker noise reduction strength values to bright areas. This allows for more accurate determination of the noise reduction intensity of each pixel, facilitating further improvement in noise reduction performance. Furthermore, by establishing a preset correspondence between brightness values and noise reduction intensity, the noise reduction intensity for pixels with different brightness levels is adjustable, and the noise reduction intensity is differentiated between bright and dark areas, enhancing the practicality of image noise reduction.
[0097] Example 6:
[0098] To further improve the noise reduction effect, based on the above embodiments, in this embodiment, noise reduction is performed on the target pixel according to the noise reduction weight of each pixel in the first neighborhood corresponding to the target pixel and the pixel value of each pixel, including:
[0099] according to Denoising is performed on the target pixel, where Ide p Ω is the pixel value after noise reduction for the target pixel. p Let W be the first neighborhood containing the target pixel, q be any pixel within the first neighborhood of the target pixel, and W be the first neighborhood containing the target pixel. q,p I represents the noise reduction weight of the target pixel corresponding to any pixel in the first neighborhood. q It is the pixel value of any pixel within the first neighborhood.
[0100] For the current target pixel, based on the noise reduction weights of each pixel in the first neighborhood corresponding to the target pixel and the pixel value of each pixel, the noise reduction weights of each pixel corresponding to the target pixel are multiplied by the pixel value to obtain the noise-reduced pixel value of each pixel in the first neighborhood; and based on the noise-reduced pixel value of each pixel in the first neighborhood and the noise reduction weights of each pixel corresponding to the target pixel, through... Determine the pixel value Ide of the target pixel p after noise reduction. p Noise reduction is performed on the target pixel. Here, p represents the target pixel, and Ω... p Let q represent the first neighborhood containing the target pixel p, and let W represent any pixel within the first neighborhood of the target pixel p. q,p I represents the noise reduction weight for the target pixel corresponding to this pixel. q W is the pixel value of that pixel. q,p ×I q This represents the denoised pixel value of each pixel in the first neighborhood.
[0101] In this embodiment, when denoising the target pixel, the denoising effect is more accurate by using the denoising weight and pixel value of each pixel in the first neighborhood corresponding to the target pixel, combined with the features of each pixel in the first neighborhood. Furthermore, since the denoising weight corresponding to the pixel with higher similarity to the target pixel is larger, and the denoising weight corresponding to the pixel with lower similarity to the target pixel is smaller, the denoising weight is more accurate when denoising the target pixel, further improving the denoising effect.
[0102] Example 7:
[0103] To ensure noise reduction effectiveness, based on the above embodiments, in this embodiment, determining a first neighborhood containing the target pixel includes:
[0104] If the target pixel is located at the edge of the image to be denoised, perform edge patching on the edge position of the target pixel to determine the image to be denoised after edge patching.
[0105] Based on the image to be denoised after edge patching, determine the first neighborhood containing the target pixel.
[0106] When the target pixel is located at the edge of the image to be denoised, in order to determine the first neighborhood of the target pixel, the size of the patched image can be determined based on the size of the first neighborhood and the edge position of the target pixel; and the edge patching process is performed on the edge position of the target pixel to determine the patched image to be denoised.
[0107] For example, if the target pixel is located in the second column from the right in the image to be denoised, and the size of the first neighborhood centered on the target pixel is 5×5, then it can be determined that a patching image containing three columns of pixels is placed on the right side of the image to be denoised for patching. This allows the determination of the first neighborhood centered on the target pixel based on the patched image. The method for determining the patching image is based on existing technology; for example, the patching image can be the image corresponding to the leftmost three columns of pixels in the image to be denoised, or the image corresponding to the rightmost three columns of pixels. No specific limitations are imposed in this embodiment.
[0108] After obtaining the edge-padded image to be denoised, based on the edge-padded image to be denoised, either method one or method two in S102 can be used to determine the first neighborhood containing the target pixel.
[0109] The above embodiments are described below with a specific example. See [link to example]. Figure 4 The image denoising process is illustrated in the following diagram, which includes the following steps:
[0110] For each target pixel in the image to be denoised, a first neighborhood containing the target pixel is determined. Based on the pixel value of each pixel in the first neighborhood, the target brightness value corresponding to the target pixel is determined. Based on the target brightness value and the preset correspondence between brightness value and noise reduction intensity stored in the electronic device, the noise reduction intensity corresponding to the target brightness value is determined, and the noise reduction intensity is used as the noise reduction intensity of the target pixel.
[0111] For each target pixel, the Legendre algorithm is used to determine the Legendre feature value corresponding to the target pixel based on the pixel value of each pixel in the first neighborhood. After determining the noise reduction intensity of the target pixel, the noise reduction weight of each pixel in the first neighborhood corresponding to the target pixel is determined based on each pixel in the first neighborhood, the Legendre feature value of the target pixel, the position information, and the noise reduction intensity of the target pixel.
[0112] For each target pixel, after determining the noise reduction weight of each pixel in the first neighborhood of the target pixel, noise reduction filtering is performed on the target pixel based on the noise reduction weight of each pixel corresponding to the target pixel and the pixel value.
[0113] Based on each target pixel after noise reduction, determine the corresponding denoised image of the image to be denoised.
[0114] Example 8:
[0115] Based on the same technical concept and the above embodiments, this application provides an image noise reduction device. Figure 5 This is a schematic diagram of an image noise reduction device provided in an embodiment of this application, as shown below. Figure 5 As shown, the device includes:
[0116] The acquisition module 501 is used to acquire the pixel value of each pixel in the image to be denoised;
[0117] The noise reduction module 502 is used to sequentially treat each pixel as a target pixel and perform the following processing: for the current target pixel, a first neighborhood containing the target pixel is determined, and the Legendre feature value corresponding to the target pixel is determined by using the Legendre algorithm based on the pixel value of each pixel in the first neighborhood; for the current target pixel, the noise reduction weight corresponding to the target pixel for each pixel in the first neighborhood is determined based on the Legendre feature value of each pixel in the first neighborhood; and the target pixel is denoised based on the noise reduction weight corresponding to the target pixel for each pixel in the first neighborhood and the pixel value of each pixel.
[0118] In one possible implementation, the noise reduction module 502 is specifically configured to determine the first coefficient and the second coefficient of the Legendre feature contained in the Legendre feature value corresponding to the target pixel based on the number of pixels contained in the length and width directions of the first neighborhood; wherein the first coefficient and the second coefficient of the Legendre feature are equal, and the product of the first coefficient and the second coefficient of the Legendre feature is less than the product of the number of pixels contained in the length and width directions; and determine the Legendre feature value of the target pixel based on the first coefficient, the second coefficient and the pixel value of each pixel contained in the first neighborhood.
[0119] In one possible implementation, the noise reduction module 502 is specifically used to determine the difference between the Legendre feature value of the pixel and the Legendre feature value of the target pixel for each pixel in the first neighborhood; and to determine the noise reduction weight of the target pixel corresponding to the pixel based on the relative position information between the pixel and the target pixel, the difference, and the noise reduction intensity corresponding to the target pixel.
[0120] In one possible implementation, the noise reduction module 502 is specifically used for... Determine the noise reduction weights for the target pixel corresponding to this pixel, where W q,p d represents the noise reduction weight of the target pixel corresponding to this pixel. p For the position information of the target pixel p, d q For the position information of pixel q, C p Let C be the Legendre eigenvalue of the target pixel. q Let σ be the Legendre eigenvalue of the pixel, Desigma be the noise reduction intensity corresponding to the target pixel, and σ be the noise reduction intensity. s These are the preset parameters.
[0121] In one possible implementation, the noise reduction module 502 is specifically used to obtain the target brightness value corresponding to the target pixel; and according to the preset correspondence between brightness value and noise reduction intensity, to use the noise reduction intensity corresponding to the target brightness value as the noise reduction intensity corresponding to the target pixel.
[0122] In one possible implementation, the noise reduction module 502 is specifically used for... Denoising is performed on the target pixels, where Ide p Ω is the pixel value after noise reduction for the target pixel. p Let W be the first neighborhood containing the target pixel, q be any pixel within the first neighborhood, and W be the second neighborhood. q,p I represents the noise reduction weight of the target pixel corresponding to any pixel in the first neighborhood. q It is the pixel value of any pixel within the first neighborhood.
[0123] In one possible implementation, the noise reduction module 502 is specifically used to perform edge patching on the edge position of the target pixel if the target pixel is located on the edge of the image to be denoised, and determine the image to be denoised after edge patching; and determine a first neighborhood containing the target pixel based on the image to be denoised after edge patching.
[0124] Example 9:
[0125] Based on the same technical concept, this application also provides an electronic device. Figure 6This application provides a schematic diagram of an electronic device structure, such as... Figure 6 As shown, it includes: processor 601, communication interface 602, memory 603 and communication bus 604, wherein processor 601, communication interface 602 and memory 603 communicate with each other through communication bus 604.
[0126] The memory 603 stores a computer program, which, when executed by the processor 601, causes the processor 601 to perform the following steps:
[0127] Obtain the pixel value of each pixel in the image to be denoised;
[0128] Each pixel is treated as a target pixel, and the following processing is performed:
[0129] For the current target pixel, determine the first neighborhood containing the target pixel, and based on the pixel value of each pixel contained in the first neighborhood, use the Legendre algorithm to determine the Legendre feature value corresponding to the target pixel.
[0130] For the current target pixel, the noise reduction weights corresponding to each pixel in the first neighborhood are determined based on the Legendre feature values of each pixel in the first neighborhood containing the target pixel. The target pixel is then denoised based on the noise reduction weights corresponding to each pixel in the first neighborhood and the pixel value of each pixel.
[0131] In one possible implementation, the processor 601 is specifically configured to determine, based on the number of pixels contained in the length and width directions of the first neighborhood, a first coefficient and a second coefficient of the Legendre feature contained in the Legendre feature value corresponding to the target pixel; wherein the first coefficient and the second coefficient of the Legendre feature are equal, and the product of the first coefficient and the second coefficient of the Legendre feature is less than the product of the number of pixels contained in the length and width directions; and to determine the Legendre feature value of the target pixel based on the first coefficient, the second coefficient, and the pixel value of each pixel contained in the first neighborhood.
[0132] In one possible implementation, the processor 601 is specifically configured to, for each pixel in the first neighborhood, determine the difference between the Legendre feature value of the pixel and the Legendre feature value of the target pixel; and determine the noise reduction weight of the target pixel corresponding to the pixel based on the relative position information between the pixel and the target pixel, the difference, and the noise reduction intensity corresponding to the target pixel.
[0133] In one possible implementation, the processor 601 is specifically configured to, according to Determine the noise reduction weights for the target pixel corresponding to this pixel, where W q,pd represents the noise reduction weight of the target pixel corresponding to this pixel. p For the position information of the target pixel p, d q For the position information of pixel q, C p Let C be the Legendre eigenvalue of the target pixel. q Let σ be the Legendre eigenvalue of the pixel, Desigma be the noise reduction intensity corresponding to the target pixel, and σ be the noise reduction intensity. s These are the preset parameters.
[0134] In one possible implementation, the processor 601 is specifically used to obtain the target brightness value corresponding to the target pixel; and according to a preset correspondence between brightness value and noise reduction intensity, to use the noise reduction intensity corresponding to the target brightness value as the noise reduction intensity corresponding to the target pixel.
[0135] In one possible implementation, the processor 601 is specifically configured to, according to Denoising is performed on the target pixels, where Ide p Ω is the pixel value after noise reduction for the target pixel. p Let W be the first neighborhood containing the target pixel, q be any pixel within the first neighborhood, and W be the second neighborhood. q,p I represents the noise reduction weight of the target pixel corresponding to any pixel in the first neighborhood. q It is the pixel value of any pixel within the first neighborhood.
[0136] In one possible implementation, the processor 601 is specifically configured to, if the target pixel is located at the edge of the image to be denoised, perform edge-padding processing on the edge position of the target pixel to determine the image to be denoised after edge-padding; and determine a first neighborhood containing the target pixel based on the image to be denoised after edge-padding.
[0137] The communication bus mentioned in the above electronic devices can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the diagram, but this does not mean that there is only one bus or one type of bus.
[0138] The communication interface 602 is used for communication between the above-mentioned electronic device and other devices.
[0139] The memory may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.
[0140] The processors mentioned above can be general-purpose processors, including central processing units, network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits, field-programmable gate arrays or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
[0141] Example 10:
[0142] Based on the same technical concept, embodiments of this application provide a computer-readable storage medium storing a computer program executable by an electronic device. When the program is run on the electronic device, it causes the electronic device to implement any of the above embodiments.
[0143] The aforementioned computer-readable storage medium can be any available medium or data storage device that can be accessed by the processor in an electronic device, including but not limited to magnetic storage such as floppy disks, hard disks, magnetic tapes, magneto-optical disks (MO), optical storage such as CDs, DVDs, BDs, HVDs, etc., and semiconductor storage such as ROMs, EPROMs, EEPROMs, non-volatile memory (NAND flash), solid-state drives (SSDs), etc.
[0144] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied 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.
[0145] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and 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 apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, 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.
[0146] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function 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.
[0147] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable 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.
[0148] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.
Claims
1. An image denoising method, characterized in that, The method comprises: acquiring pixel values of each pixel point in a to-be-noise-reduced image; sequentially taking each pixel point as a target pixel point and performing the following processing: for the current target pixel point, determining a first neighborhood containing the target pixel point, and using the Legendre algorithm to determine a Legendre eigenvalue corresponding to the target pixel point according to pixel values of each pixel point contained in the first neighborhood; wherein the Legendre eigenvalue corresponding to the target pixel point is used to represent characteristic information of the target pixel point and surrounding pixel points; for the current target pixel point, determining a noise reduction weight of each pixel point in the first neighborhood corresponding to the target pixel point according to the Legendre eigenvalue of each pixel point in the first neighborhood containing the target pixel point; and performing noise reduction on the target pixel point according to the noise reduction weight of each pixel point in the first neighborhood corresponding to the target pixel point and the pixel value of each pixel point. The determination of the Legendre eigenvalue corresponding to the target pixel point according to the pixel values of each pixel point contained in the first neighborhood comprises: determining first and second coefficients of a Legendre eigenvalue contained in the Legendre eigenvalue corresponding to the target pixel point according to the number of pixel points contained in the length direction and the width direction of the first neighborhood; wherein the first and second coefficients of the Legendre eigenvalue are equal, and the product of the first and second coefficients is less than the product of the number of pixel points contained in the length direction and the width direction; determining the Legendre eigenvalue of the target pixel point according to the first and second coefficients and the pixel values of each pixel point contained in the first neighborhood.
2. The method of claim 1, wherein, The determination of the noise reduction weight of each pixel point in the first neighborhood corresponding to the target pixel point according to the Legendre eigenvalue of each pixel point in the first neighborhood containing the target pixel point comprises: for each pixel point in the first neighborhood, determining a difference value between the Legendre eigenvalue of the pixel point and the Legendre eigenvalue of the target pixel point; and determining the noise reduction weight of the pixel point corresponding to the target pixel point according to the relative position information corresponding to the pixel point and the target pixel point, the difference value, and the noise reduction intensity corresponding to the target pixel point.
3. The method of claim 2, wherein, The determination of the noise reduction weight of the pixel point corresponding to the target pixel point according to the relative position information corresponding to the pixel point and the target pixel point, the difference value, and the noise reduction intensity corresponding to the target pixel point comprises: According to , a noise reduction weight corresponding to the target pixel point of the pixel point is determined, wherein is the noise reduction weight corresponding to the target pixel point of the pixel point, is position information of the target pixel point p, is position information of the pixel point q, is a Legendre eigenvalue of the target pixel point, is a Legendre eigenvalue of the pixel point, is a noise reduction intensity corresponding to the target pixel point, is a preset parameter.
4. The method according to claim 2 or 3, characterized in that, The determination process of the noise reduction intensity corresponding to the target pixel point is as follows: acquiring a target brightness value corresponding to the target pixel point; determining the noise reduction intensity corresponding to the target brightness value as the noise reduction intensity corresponding to the target pixel point according to a preset corresponding relationship between brightness values and noise reduction intensities.
5. The method of claim 1, wherein, The noise reduction on the target pixel point according to the noise reduction weight of each pixel point in the first neighborhood corresponding to the target pixel point and the pixel value of each pixel point comprises: According to de-noising the target pixel point, wherein a pixel value of the target pixel point after de-noising, a first neighborhood containing the target pixel point, any pixel point in the first neighborhood, a de-noising weight of any pixel point in the first neighborhood corresponding to the target pixel point, a pixel value of any pixel point in the first neighborhood.
6. The method of claim 1, wherein, The determination of the first neighborhood containing the target pixel point comprises: If the target pixel point is at an edge of the image to be denoised, an edge position where the target pixel point is located is processed to determine a denoised image after edge processing. Based on the denoised image after edge processing, a first neighborhood containing the target pixel point is determined.
7. An image noise reduction apparatus, characterized by comprising: The apparatus comprises: An acquisition module configured to acquire pixel values of each pixel point in an image to be denoised; A denoising module configured to sequentially take each pixel point as a target pixel point and perform the following processing: for the current target pixel point, a first neighborhood containing the target pixel point is determined, and based on pixel values of each pixel point contained in the first neighborhood, a Legendre eigenvalue corresponding to the target pixel point is determined by using a Legendre algorithm; the Legendre eigenvalue corresponding to the target pixel point is used to represent characteristic information of the target pixel point and surrounding pixel points; for the current target pixel point, based on the Legendre eigenvalue of each pixel point in the first neighborhood containing the target pixel point, a denoising weight corresponding to the target pixel point of each pixel point in the first neighborhood is determined; and based on the denoising weight corresponding to the target pixel point of each pixel point in the first neighborhood and the pixel value of each pixel point, the target pixel point is denoised. The denoising module is specifically configured to determine a first coefficient and a second coefficient of a Legendre eigenvalue contained in the Legendre eigenvalue corresponding to the target pixel point based on the number of pixel points contained in a length direction and a width direction of the first neighborhood; the first coefficient and the second coefficient of the Legendre eigenvalue are equal, and a product of the first coefficient and the second coefficient is smaller than a product of the number of pixel points contained in the length direction and the width direction; and the Legendre eigenvalue of the target pixel point is determined based on the first coefficient, the second coefficient, and the pixel value of each pixel point contained in the first neighborhood.
8. An electronic device, comprising: The electronic device comprises at least a processor and a memory, and the processor is configured to implement steps of the image denoising method according to any one of claims 1-6 when executing a computer program stored in the memory.
9. A computer storage medium, characterized in that The electronic device stores a computer program executable by the electronic device, and when the program is executed on the electronic device, the electronic device is caused to perform steps of the image denoising method according to any one of claims 1-6.
Citation Information
Patent Citations
Legemdre moment-based image subpixel edge detection method
CN104899888A
Image noise reduction method and device
CN113469889A