Image denoising method, image denoising device, storage medium and electronic equipment
By determining the orientation and filtering weights of the target image patch and its candidate image patches, and combining gradient and similarity for image denoising, the problems of image detail loss and computational complexity in existing technologies are solved, and efficient image denoising is achieved in mobile and real-time scenarios.
Patent Information
- Application Number
- CN202211155065.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-21
- Publication Date
- 2026-02-03
- Estimated Expiration
- 2042-09-21
AI Technical Summary
Existing image denoising techniques are prone to losing image detail information during noise suppression, and the computation process is complex and consumes a lot of computing resources, making them unsuitable for scenarios with high real-time requirements.
By determining the directional weights and filtering weights of the target image patch and its candidate image patches, and combining gradients and similarities, image denoising is performed. This adapts to the texture or information distribution of the image patch in the filtering direction, preserves image detail information, and simplifies the calculation process.
It can preserve image details to a large extent while reducing noise. It is computationally simple, suitable for mobile devices and scenarios with high real-time requirements, and reduces computing power consumption.
Smart Images

Figure CN115423720B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of image and video processing technology, and in particular to image denoising methods, image denoising apparatus, computer-readable storage media, and electronic devices. Background Technology
[0002] Image noise refers to interference information present in image data. Its sources include thermal noise and dark current noise of the image sensor during image acquisition, and signal noise caused by external interference during image transmission. Therefore, image noise reduction is necessary.
[0003] In related technologies, image noise reduction can lead to the loss of a significant amount of image detail, thus affecting image quality. Summary of the Invention
[0004] This disclosure provides an image denoising method, an image denoising apparatus, a computer-readable storage medium, and an electronic device to at least partially solve the problem of image denoising leading to the loss of image detail information in related technologies.
[0005] According to a first aspect of this disclosure, an image denoising method is provided, comprising: determining a target image patch and one or more candidate image patches corresponding to the target image patch in an image to be processed; obtaining the gradient of the target image patch in a filtering direction, and determining the orientation weight of the candidate image patch in the filtering direction based on the gradient; the filtering direction being the direction in which the candidate image patch is located relative to the target image patch; determining the filtering weight of the candidate image patch based on the orientation weight of the candidate image patch and the similarity between the candidate image patch and the target image patch; and filtering the target image patch based on the filtering weight of the candidate image patch.
[0006] According to a second aspect of this disclosure, an image denoising method is provided, comprising: determining a target image patch and one or more candidate image patches corresponding to the target image patch in an image to be processed; obtaining the gradient of the target image patch in a filtering direction, and determining the orientation weight of the candidate image patch in the filtering direction based on the gradient; the filtering direction being the direction in which the candidate image patch is located relative to the target image patch; determining the filtering weight of the target image patch based on the noise intensity and / or texture intensity of the target image patch; determining the filtering weight of the candidate image patch based on the orientation weight of the candidate image patch and the filtering weight of the target image patch; and filtering the target image patch based on the filtering weight of the candidate image patch.
[0007] According to a third aspect of this disclosure, an image denoising apparatus is provided, comprising: an image patch determination module configured to determine a target image patch and one or more candidate image patches corresponding to the target image patch in an image to be processed; an orientation weight determination module configured to acquire the gradient of the target image patch in a filtering direction, and determine the orientation weight of the candidate image patch in the filtering direction based on the gradient; the filtering direction being the orientation of the candidate image patch relative to the target image patch; a filtering weight determination module configured to determine the filtering weight of the candidate image patch based on the orientation weight of the candidate image patch and the similarity between the candidate image patch and the target image patch; and an image patch filtering module configured to filter the target image patch based on the filtering weight of the candidate image patch.
[0008] According to a fourth aspect of this disclosure, an image denoising apparatus is provided, comprising: an image patch determination module configured to determine a target image patch and one or more candidate image patches corresponding to the target image patch in an image to be processed; an orientation weight determination module configured to acquire a gradient of the target image patch in a filtering direction, and determine an orientation weight of the candidate image patch in the filtering direction based on the gradient; the filtering direction being the orientation of the candidate image patch relative to the target image patch; a filtering weight determination module configured to determine a filtering weight of the target image patch based on the noise intensity and / or texture intensity of the target image patch; and determine a filtering weight of the candidate image patch based on the orientation weight of the candidate image patch and the filtering weight of the target image patch; and an image patch filtering module configured to filter the target image patch based on the filtering weight of the candidate image patch.
[0009] According to a fifth aspect of this disclosure, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the image noise reduction method of the first or second aspect described above, and possible implementations thereof.
[0010] According to a sixth aspect of this disclosure, an electronic device is provided, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to perform the image noise reduction method of the first or second aspect described above and possible implementations thereof by executing the executable instructions.
[0011] The technical solution disclosed herein has the following beneficial effects:
[0012] On the one hand, the directional weights of candidate image blocks along the filtering direction are determined based on the gradient of the target image block in the filtering direction, and the filtering weights of the candidate image blocks are determined by combining similarity. This makes the filtering weights adaptable to the texture or information distribution of the target image block in the filtering direction, which can preserve the original image details in the target image block to a large extent while filtering and denoising, thus improving image quality. On the other hand, this scheme can denoise a single frame of image without using temporal information. The calculation process is relatively simple and consumes less computing resources, which is conducive to deployment in lightweight scenarios such as mobile devices. Furthermore, the image denoising response time is short, which is beneficial for applications in scenarios with high real-time requirements, such as scenarios where real-time denoising is performed on each frame of a video. Attached Figure Description
[0013] Figure 1 A schematic diagram illustrating the operating environment system architecture of this exemplary embodiment is shown;
[0014] Figure 2 This diagram illustrates a flowchart of an image noise reduction method according to this exemplary embodiment;
[0015] Figure 3 This diagram illustrates the determination of candidate image blocks and filtering directions in this exemplary embodiment.
[0016] Figure 4 This diagram illustrates the calculation of the gradient in this exemplary embodiment.
[0017] Figure 5 A schematic diagram of fitting the noise function is shown in this exemplary embodiment;
[0018] Figure 6 A schematic diagram showing different texture intensities in this exemplary embodiment is illustrated;
[0019] Figure 7 A schematic flowchart of the image noise reduction method in this exemplary embodiment is shown;
[0020] Figure 8 A flowchart illustrating another image noise reduction method in this exemplary embodiment is shown;
[0021] Figure 9 This diagram illustrates the structure of an image processing apparatus according to this exemplary embodiment.
[0022] Figure 10 This diagram illustrates the structure of another image processing apparatus in this exemplary embodiment;
[0023] Figure 11 A schematic diagram of the structure of an electronic device in this exemplary embodiment is shown. Detailed Implementation
[0024] Exemplary embodiments of this disclosure will be described more fully below with reference to the accompanying drawings.
[0025] The accompanying drawings are schematic illustrations of this disclosure and are not necessarily drawn to scale. Some block diagrams shown in the drawings may be functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities may be implemented in software, in hardware modules or integrated circuits, or in networks, processors, or microcontrollers. Implementations can be carried out in various forms and should not be construed as limited to the examples set forth herein. The features, structures, or characteristics described in this disclosure can be combined in any suitable manner in one or more embodiments. Numerous specific details are provided in the following description to give a thorough description of embodiments of this disclosure. However, those skilled in the art will recognize that one or more specific details may be omitted when implementing the technical solutions of this disclosure, or other methods, components, apparatuses, steps, etc., may be used to replace one or more specific details.
[0026] Various types of noise are commonly present in images. This is especially true when shooting in low-light environments (such as night scenes), where the image sensor receives less light, resulting in lower voltage from the light signal. In these conditions, noise has a relatively greater impact, leading to more severe noise in the image. Therefore, most ISPs (Image Signal Processors) include image noise reduction in their image processing workflows, and some image processing applications also have image noise reduction functionality.
[0027] However, the inventors have discovered the following problems with existing image denoising techniques: Image noise typically manifests as sharp, jagged pixels. While filtering can smooth image content and suppress noise, it also results in a loss of image detail. Generally, higher filter strength leads to better noise suppression, but also greater loss of detail. Related techniques struggle to achieve a good balance between noise reduction and detail preservation. Furthermore, the computational process for image denoising is complex, consuming significant computational resources and increasing image processing response time, making it unsuitable for applications with high real-time requirements.
[0028] In view of one or more of the above problems, exemplary embodiments of this disclosure provide an image denoising method for denoising target image blocks in an image to be processed, so as to achieve global or local denoising of the image to be processed.
[0029] The following is combined with Figure 1 The operating environment system architecture of this exemplary embodiment will be described.
[0030] refer to Figure 1As shown, the system architecture 100 may include a terminal 110 and a server 120. The terminal 110 may be an electronic device such as a mobile phone, tablet computer, or smart wearable device. The server 120 generally refers to the backend system that provides image noise reduction related services in this exemplary embodiment, and may be a single server or a cluster of multiple servers. The terminal 110 and the server 120 may be connected via a wired or wireless communication link to exchange data.
[0031] In one implementation, the image denoising method of this exemplary embodiment can be executed by terminal 110. For example, terminal 110 can first acquire the image to be processed, such as a currently captured image, a locally stored image (e.g., an image in a photo album), an image transmitted from another device via a network, or an image downloaded from the Internet, and then execute the image denoising method to output the denoised image.
[0032] In one implementation, the image denoising method of this exemplary embodiment can be executed by server 120. For example, terminal 110 can upload the image to be processed to server 120, whereby server 120 executes the image denoising method to obtain a denoised image. The denoised image can then be returned to terminal 110.
[0033] As can be seen from the above, in this exemplary embodiment, the entity executing the image denoising method can be the aforementioned terminal 110 or server 120, and this disclosure does not limit it in this regard.
[0034] The following is combined with Figure 2 The process of image denoising methods is explained.
[0035] refer to Figure 2 As shown, the image denoising method may include the following steps S210 to S240:
[0036] Step S210: Determine the target image block and one or more candidate image blocks corresponding to the target image block in the image to be processed;
[0037] Step S220: Obtain the gradient of the target image patch in the filtering direction, and determine the orientation weight of the candidate image patch in the filtering direction based on the gradient; the filtering direction is the orientation of the candidate image patch relative to the target image patch.
[0038] Step S230: Determine the filtering weight of the candidate image block based on the orientation weight of the candidate image block and the similarity between the candidate image block and the target image block.
[0039] Step S240: Filter the target image block based on the filtering weights of the candidate image blocks.
[0040] Based on the above method, on the one hand, the directional weights of candidate image blocks in the filtering direction are determined according to the gradient of the target image block in the filtering direction, and the filtering weights of the candidate image blocks are determined by combining similarity. This makes the filtering weights adaptable to the texture or information distribution of the target image block in the filtering direction, which can preserve the original image details in the target image block to a large extent while filtering and denoising, thus improving image quality. On the other hand, this scheme can achieve denoising of a single frame image without using temporal information. The calculation process is relatively simple and consumes less computing resources, which is conducive to deployment in lightweight scenarios such as mobile devices. Moreover, the image denoising response time is short, which is conducive to application in scenarios with high real-time requirements, such as scenarios where real-time denoising is performed on each frame of a video.
[0041] The following is about Figure 2 Each step in the process will be explained in detail.
[0042] refer to Figure 2 In step S210, a target image block and one or more candidate image blocks corresponding to the target image block are determined in the image to be processed.
[0043] The image to be processed is the image that needs noise reduction. This disclosure does not limit the source of the image to be processed; it can be a currently captured image, a locally stored image, an image obtained through a network, etc. Furthermore, the image to be processed can be any format, such as a RAW image, a YUV image, or an RGB image. In one embodiment, the image to be processed can be any frame from a video.
[0044] The target image patch is the image patch in the image to be processed that needs noise reduction. The size of the target image patch can be w1×h1, where w1 represents the width of the target image patch, which is smaller than the width W of the image to be processed, and h1 represents the height of the target image patch, which is smaller than the height H of the image to be processed. This disclosure does not limit the size of the target image patch, that is, w1 and h1 can be any values not exceeding the size of the image to be processed. In one embodiment, w1 = h1, that is, the target image patch is a square. Compared with a rectangle, a square target image patch is more convenient for subsequent gradient calculation. In particular, w1 and h1 can both be 1, that is, the target image patch can be a single pixel.
[0045] In one implementation, if it is necessary to denoise the entire image to be processed, the image to be processed can be divided into multiple image blocks, and each image block can be used as the target image block for denoising in turn, thereby achieving denoising of the entire image to be processed.
[0046] In one implementation, if only a specific region (such as a foreground region or a face region) in the image to be processed needs to be denoised, the region can be divided into multiple image blocks. Each image block can be used as a target image block sequentially, or the entire region can be used as a target image block for denoising, thereby achieving denoising of that region. For example, a region of interest (ROI) can be detected in the image to be processed, resulting in a rectangular detection box located on the edge of the ROI. The image blocks within the detection box can then be used as target image blocks.
[0047] Candidate image patches are image patches in the image to be processed that provide noise reduction information for the target image patch, such as image patches used for filtering the target image patch. There is a correspondence between target image patches and candidate image patches; one target image patch can correspond to one or more candidate image patches, and different target image patches can correspond to different candidate image patches. Generally, the target image patch and the candidate image patch have the same size, that is, the size of the candidate image patch is also w1×h1.
[0048] In one implementation, candidate image blocks can be determined within the neighborhood of the target image block. For example, the search window size can be configured as w2×h2, where w2 represents the width of the search window (w2 is greater than w1), and h2 represents the height of the search window (h2 is greater than h1), meaning the search window size is larger than the target image block size. Centered on the target image block, the search window determines the search range, and within this range, one or more image blocks of the same size as the target image block are extracted as candidate image blocks corresponding to the target image block. (Reference) Figure 3 As shown, the target image patch is 3×3 in size, and the search window is 9×9 in size. In the image to be processed, a 9×9 search range is determined with the target image patch as the center. Within this range, eight 3×3 candidate image patches can be obtained, which are denoted as candidate image patches 1 to 8 respectively. Different candidate image patches do not need to overlap.
[0049] In one implementation, image blocks similar to the target image block can be searched across the entire image to be processed as candidate image blocks corresponding to the target image block. For example, all image blocks in the image to be processed that are the same size as the target image block can be traversed, and the similarity between the target image block and each of these image blocks can be calculated. This can be done using SSIM (Structural Similarity), or by calculating the similarity based on the sum of the absolute pixel differences between the target image block and each of the image blocks. Image blocks with a similarity threshold are then selected as candidate image blocks corresponding to the target image block.
[0050] Continue to refer to Figure 2In step S220, the gradient of the target image block in the filtering direction is obtained, and the orientation weight of the candidate image block in the filtering direction is determined based on the gradient; the filtering direction is the direction of the candidate image block relative to the target image block.
[0051] In one implementation, the direction of the line connecting the center point of the target image patch to the center point of the candidate image patch can be determined as the filtering direction. Alternatively, the center point can be replaced with another point, such as a corner point, and the direction of the line connecting the corner points can be determined as the filtering direction.
[0052] The directional weights of candidate image patches are determined at the level of directional gradients. In this exemplary embodiment, the filtering weights of candidate image patches are the final weights used for filtering, and are comprehensive weights that include multiple factors such as directional weights and similarity. That is, directional weights are one factor affecting the filtering weights and are used to further determine the filtering weights in subsequent steps.
[0053] Texture or information distribution in an image typically exhibits directionality, meaning that the distribution differs in different directions. The gradient of a target image patch along the filtering direction characterizes the texture or information distribution of that patch along that direction. Generally, a larger gradient of a target image patch along a certain filtering direction indicates denser texture or information along that direction. The smaller the directional weight of candidate image patches along that filtering direction, the less information from those patches is used during filtering, thus preserving texture or detail along that direction. Therefore, directional weights and gradients can have a negative correlation. This disclosure does not limit the specific relationship between the two; for example, directional weights and gradients can be set to any arbitrarily negative correlation function. For instance, the reciprocal of the gradient can be normalized to serve as the directional weight.
[0054] It should be understood that a target image patch can correspond to multiple candidate image patches, and these candidate image patches can be in different directions, meaning the target image patch can have multiple different filtering directions. The gradient of the target image patch may differ in different filtering directions, implying that the directional weights of candidate image patches in different directions may also differ. (Refer to the above.) Figure 3As shown, candidate image blocks 1 to 8 are located in different directions of the target image block, which has eight different filtering directions. Specifically, candidate image block 1 is located in filtering direction DU, candidate image block 2 in filtering direction N, candidate image block 3 in filtering direction AU, candidate image block 4 in filtering direction W, candidate image block 5 in filtering direction E, candidate image block 6 in filtering direction AD, candidate image block 7 in filtering direction S, and candidate image block 8 in filtering direction DD. The gradient of the target image block in each filtering direction is calculated, and the direction weight of the candidate image block in that direction is determined based on the gradient.
[0055] This disclosure does not limit the gradient calculation method. For example, the gradient of the target image patch in the filtering direction can be calculated using the Tenegrad function, the Laplacian function, etc.
[0056] In one implementation, obtaining the gradient of the target image patch in the filtering direction may include the following steps:
[0057] Within the target image block or in the neighborhood of the target image block, select one or more sets of pixel pairs along the filtering direction;
[0058] The gradient of the target image patch in the filtering direction is determined based on the difference between each pair of pixels.
[0059] The neighborhood of the target image patch refers to the region in the image to be processed that is adjacent to the target image patch. This disclosure does not limit the size of the neighborhood. For example, the neighborhood can be the region where the candidate image patch is located, or it can extend beyond the region where the candidate image patch is located.
[0060] Figure 4 The diagram illustrates the gradient calculation for different filtering directions. For example, in the W direction, three sets of pixel pairs can be selected. Each set of pixel pairs includes one pixel within the target image block and one pixel outside the target image block. The difference between the two pixels in each set of pixel pairs is calculated; this difference can be an absolute difference. Then, the average of the differences in the three sets of pixel pairs can be taken to obtain the gradient in the W direction. Figure 4 The diagram shows the selection of 3 sets of pixel pairs in the W, E, N, and S directions, and 5 sets of pixel pairs in the AU, AD, DU, and DD directions. This number is only illustrative and can be any number of pixel pairs depending on the size of the target image block, the size of the neighborhood, and other specific circumstances. The number of pixel pairs in different filtering directions can be the same or different.
[0061] By selecting pixel pairs and calculating their differences to determine the gradient, the gradient calculation process is simplified, improving the efficiency of image denoising. Furthermore, calculating the gradient using the differences between pixel pairs along the filtering direction ensures that the gradient accurately represents the texture or information distribution along the filtering direction, which is beneficial for improving the image denoising effect.
[0062] In one implementation, determining the directional weights of candidate image blocks in the filtering direction based on the gradient may include the following steps:
[0063] Obtain multiple gradient value ranges;
[0064] Determine the gradient value range of the candidate image patch along the filtering direction, and determine the directional weight of the candidate image patch based on the weight corresponding to the gradient value range.
[0065] That is, a piecewise function relationship can be established between the gradient and the weights. The gradient numerical interval is the numerical interval of the independent variable of the piecewise function, and different gradient numerical intervals correspond to different weights. In this way, after determining which gradient numerical interval the gradient in a certain filtering direction belongs to, the weight corresponding to that gradient numerical interval can be obtained. This weight can be used as the directional weight of the candidate image patch in that filtering direction, or the weight can be further processed (such as normalization) to obtain the directional weight of the candidate image patch.
[0066] The gradient numerical range can be set empirically; it can be a fixed range or a dynamic range. In one implementation, obtaining multiple gradient numerical ranges may include the following steps:
[0067] Find the maximum value among the gradients above, and divide the interval from 0 to the maximum value into multiple gradient value intervals.
[0068] The maximum value in the gradient refers to the maximum value among the gradients in the different filtering directions mentioned above, which can be expressed as grad. max In this way, the gradient in each filtering direction is in the range [0, grad]. max Within the given interval, the interval can be divided, either uniformly or according to the actual distribution of the gradient, resulting in multiple gradient value intervals. These gradient value intervals are adapted to the numerical level of the gradient itself, which helps improve the rationality and accuracy of the direction weights.
[0069] For example, let direction i represent any filtering direction, the direction weight w_direc(i) of the candidate image patch in direction i can be calculated by the following formula:
[0070]
[0071] Among them, grad i This represents the gradient of the target image patch along the filtering direction i. Equation (1) shows the gradient of the target image patch along the filtering direction i. max The interval is evenly divided into 8 gradient value intervals. It should be noted that, due to grad... max It is all grad i The maximum value in, therefore the last line of formula (1), grad i Greater than grad max The situation described above will not actually occur; the directional weights will not be 0. The last line in formula (1) is listed for completeness. It can be seen that grad max In the corresponding filtering direction, the directional weight of the candidate image patch is 1. This is because the target image patch has the most obvious texture transition or detail information in this filtering direction, which needs to be preserved; therefore, the candidate image patch in this filtering direction is given the smallest directional weight. i The smaller the value, the less likely it is to retain texture or detail information, and the larger the directional weight of the corresponding candidate image patch. The minimum gradient value range is [0, grad]. max The direction weight corresponding to 1 / 8 is the largest.
[0072] In one implementation, the weights 1 to 128 in formula (1) can also be normalized. For example, 1, 2, 4, ... can be normalized to 1 / 128, 2 / 128, 4 / 128, ... respectively, as directional weights of candidate image blocks.
[0073] Continue to refer to Figure 2 In step S230, the filtering weight of the candidate image block is determined based on the orientation weight of the candidate image block and the similarity between the candidate image block and the target image block.
[0074] Directional weights are weights determined at the level of directional gradients. Directional weights can be negatively correlated with the gradient and positively correlated with the filter weights.
[0075] The similarity between a candidate image patch and a target image patch represents the degree of similarity between them at the image content level. Similarity can be a factor influencing the filtering weight of a candidate image patch. A higher similarity between a candidate and target image patch indicates a greater similarity in their image content, allowing for a higher filtering weight. This means that more information from the candidate image patch is used during filtering, thus better preserving the original information in the target image patch. Therefore, there can be a positive correlation between similarity and filtering weight.
[0076] By combining directional weights and similarity factors, the filtering weights of candidate image patches can be determined.
[0077] This disclosure does not limit the specific method for calculating the similarity between candidate image patches and target image patches. For example, similarity can be calculated based on one or more indicators selected from noise intensity, texture intensity, and pixel difference, as illustrated below.
[0078] (I) Noise Intensity
[0079] In one implementation, the image denoising method may further include the following steps:
[0080] Determine the noise intensity of the target image patch and the noise intensity of the candidate image patch;
[0081] The similarity between the candidate image patch and the target image patch is determined based on the noise intensity of the candidate image patch and the noise intensity of the target image patch.
[0082] The noise intensity of the target image patch is used to characterize the local noise level of the target image patch. This disclosure does not limit how the noise intensity is determined. For example, noise points or potential noise points (i.e., pixels that may be noise points) in the target image patch can be detected, and the noise intensity of the target image patch can be determined based on their number.
[0083] Two further exemplary methods for determining noise intensity are provided below.
[0084] ① In one embodiment, determining the noise intensity of the target image patch may include the following steps:
[0085] Obtain the brightness value of the target image patch;
[0086] Using a pre-calibrated noise function of the image to be processed, the noise intensity corresponding to the brightness value of the target image block is determined, and used as the noise intensity of the target image block; the noise function is a function between the brightness value and the noise intensity.
[0087] The brightness value of the target image block can include the light signal response value (such as luminance) of each pixel in the target image block. If the original data of the image to be processed can be obtained, the light signal response value, which is the brightness value, can be obtained.
[0088] In one implementation, the image to be processed can be a RAW image, in which the brightness values have been discretized into pixel values according to the image bit width. For example, the pixel value range corresponding to an 8-bit bit width is 0 to 255, and the pixel value range corresponding to a 10-bit bit width is 0 to 1023. The pixel values in the RAW image can be restored to brightness values.
[0089] In one implementation, the grayscale value of each pixel in the target image block can be determined, for example, by using the formula Gray = R × 0.3 + G × 0.59 + B × 0.11 to calculate the grayscale value, and then using the grayscale value as the brightness value.
[0090] For the image to be processed, a noise function can be pre-calibrated. The noise function describes the relationship between brightness values and noise intensity. Different images can correspond to different noise functions.
[0091] Generally, the raw data output by an image sensor can follow the following formula:
[0092] z x =y x +σ(y x )ξ x (2)
[0093] Where x represents any pixel, and also any photosensitive element on the image sensor; z x y represents the actual output data of the image sensor. x This represents noise-free signal data, σ(y) x )ξ x The noise term can represent additive noise, multiplicative noise, etc. Using a Gaussian-Poisson noise model, the noise term can be decomposed into two independent parts: a signal-dependent Poisson distribution term ηp and a signal-independent Gaussian distribution term ηg, with the following relationship:
[0094] σ(y x )ξ x =ηp(y x )+ηg(x) (3)
[0095] Then formula (2) can be derived as:
[0096] z x =y x +ηp(y x )+ηg(x) (4)
[0097] From the mathematical properties of the Poisson distribution, we know that:
[0098] exp[ηp(y x )]=0,var[ηp(y x )]=y x / χ (5)
[0099] Calculating the standard deviation using formula (4), we get:
[0100]
[0101] Among them, y xIt can represent the brightness value of a pixel, std[y] x ] represents y x The standard deviation. Formula (6) can be used as a noise function, and the left side of std[y] x [ ] can be used as noise intensity, where a and b are noise parameters, where a is the Poisson noise parameter and b is the Gaussian noise parameter, and a = 1 / χ. By calibrating in the image to be processed, the values of a and b can be determined, thereby calibrating the noise function.
[0102] This exemplary embodiment also provides a method for calibrating a noise function. Specifically, the image denoising method may further include the following steps:
[0103] In the image to be processed, multiple sets of data to be fitted are determined. Each set of data to be fitted includes a local brightness value and a corresponding local standard deviation.
[0104] Using the local standard deviation as the noise intensity, the noise function is calibrated by fitting the local brightness value with the local standard deviation.
[0105] For example, multiple local regions can be sampled from the image to be processed. The brightness value of the center pixel of each local region can be used as the local brightness value of that local region, or the average brightness value of all pixels in each local region can be used as the local brightness value of that local region. The standard deviation of the brightness values of all pixels in each local region can be calculated to obtain the local standard deviation of the local region. In this way, y can be obtained from each local region. x -std[y x The data pairs are a set of data to be fitted, and multiple sets of data to be fitted are obtained from multiple local regions.
[0106] refer to Figure 5 As shown, the local luminance value is plotted on the x-axis, and the local standard deviation (sigma) is plotted on the y-axis to fit the above sets of data. The local standard deviation can be used as the noise intensity, thereby fitting a function curve of luminance value versus noise intensity, determining the values of a and b, and thus obtaining the noise function.
[0107] Having obtained the brightness value of the target image patch, this brightness value is substituted into the y-value of the noise function described above. x Therefore, the corresponding noise intensity std[y] is calculated. x The noise intensity of the target image patch is represented by ]. It can be seen that, given a calibrated noise function, the noise intensity can be directly calculated by substituting the brightness value. The calculation process is very simple and helps improve image denoising efficiency.
[0108] In one implementation, the original data of the image to be processed, including the original brightness value of each pixel, can be obtained in the RAW domain. Multiple sets of data to be fitted are obtained by sampling the image, and the noise function is calibrated using this data. Then, the brightness value of the target image patch can be obtained from the original data of the image to be processed, substituted into the noise function, and the noise intensity of the target image patch can be calculated. By calibrating the noise function and calculating the noise intensity in the RAW domain, a more accurate noise function and a more accurate noise intensity can be obtained, which is beneficial for improving the image denoising effect.
[0109] ② In one embodiment, determining the noise intensity of the target image patch may include the following steps:
[0110] By using a pre-calibrated functional relationship between photosensitivity and noise parameters, the noise parameters corresponding to the photosensitivity of the image to be processed are determined and used as the noise parameters of the image to be processed.
[0111] Obtain the brightness value of the target image patch;
[0112] The noise intensity of the target image block is calculated based on the brightness value of the target image block and the noise parameters of the image to be processed.
[0113] Calibration revealed the following functional relationship between ISO (sensitivity) and the aforementioned noise parameters a and b:
[0114] a = -0.9746·ISO + 2.564 (7)
[0115] b = 0.9373·ISO-2.1768 (8)
[0116] Therefore, by obtaining the ISO of the image to be processed, the noise parameters a and b of the image to be processed can be calculated according to formulas (7) and (8), thus obtaining the noise function (i.e., formula (6)). By substituting the brightness value of the target image block into the noise function, the noise intensity of the target image block can be calculated. This method can simplify the calculation process of noise intensity and improve the efficiency of image denoising.
[0117] The above explains how to determine the noise intensity of a target image patch. Using the same method, the noise intensity of a candidate image patch can be determined.
[0118] If a candidate image patch is similar to a target image patch, then their noise intensities should also be similar. Therefore, the similarity between a candidate image patch and a target image patch can be determined based on their noise intensities.
[0119] In one implementation, the similarity between a candidate image patch and a target image patch can be calculated based on how close the noise intensity of the candidate image patch is to the noise intensity of the target image patch. For example, the difference between the noise intensity of the candidate image patch and the noise intensity of the target image patch can be calculated, reflecting the distance between them. This difference is then normalized, and "1 - normalized noise intensity difference" is taken as the similarity between the candidate image patch and the target image patch.
[0120] In one implementation, determining the similarity between a candidate image patch and a target image patch based on the noise intensity of the candidate image patch and the noise intensity of the target image patch may include the following steps:
[0121] Obtain multiple noise intensity value ranges;
[0122] The noise weight of the target image patch is determined based on the noise intensity range in which the noise intensity of the target image patch is located; the noise weight of the candidate image patch is determined based on the noise intensity range in which the noise intensity of the candidate image patch is located.
[0123] The similarity between the candidate image patch and the target image patch is determined based on the noise weights of the candidate image patch and the target image patch.
[0124] Among them, the noise weight is a weight obtained by further quantifying the noise intensity from the perspective of noise reduction, which can characterize the required filtering intensity of the target image block (or candidate image block) from the noise intensity level.
[0125] A piecewise function relationship can be established between noise intensity and noise weight. The noise intensity range is the range of the independent variable of the piecewise function, and different noise intensity ranges correspond to different noise weights. Thus, after determining which noise intensity range the target image patch falls within, the noise weight corresponding to that range can be obtained and used as the noise weight of the target image patch. Alternatively, the weight corresponding to that noise intensity range can be further processed (such as normalization) to obtain the noise weight of the target image patch.
[0126] The noise intensity range can be set empirically; it can be a fixed range or a dynamic range. For example, three consecutive noise intensity ranges can be set: [0, 0.3), [0.3, 1], and (1, +∞).
[0127] For example, the noise weight w_noise of the target image patch can be calculated using the following formula:
[0128]
[0129] Among them, std[y x[] indicates noise intensity.
[0130] Similarly, the noise weight of a candidate image patch can be calculated from the noise intensity of the candidate image patch.
[0131] After obtaining the noise weights of the candidate image patch and the target image patch, the similarity between the candidate and target image patches can be determined based on the proximity of their noise weights. For example, the difference between the noise weights of the candidate and target image patches can be calculated, reflecting the distance between them. This difference is then normalized, and "1 - normalized noise weight difference" is taken as the similarity between the candidate and target image patches.
[0132] Since noise weight is a further quantification of noise intensity, determining the similarity between candidate image patches and target image patches through noise weight is more accurate.
[0133] In one implementation, the noise intensity of the target image block can include the noise intensity of each pixel in the target image block. For example, the above formula (6) can be used to substitute the brightness value of each pixel to calculate the noise intensity of each pixel. Similarly, the noise intensity of the candidate image block can include the noise intensity of each pixel in the candidate image block. Furthermore, the similarity between the candidate image block and the target image block can be determined based on the noise intensity of each pixel in the target image block and the noise intensity of each pixel in the candidate image block. For example, the noise intensity of pixels at the same position in the target image block and the candidate image block can be subtracted to obtain the noise intensity difference at each position. Alternatively, the average of the noise intensity differences at each position can be calculated to obtain the global noise intensity difference between the target image block and the candidate image block. The noise intensity difference can reflect the distance between the candidate image block and the target image block. The similarity can be calculated from the noise intensity difference based on the negative correlation function. For example, the reciprocal of the noise intensity difference or "1 - normalized noise intensity difference" can be used as the similarity between the candidate image block and the target image block.
[0134] In one implementation, after obtaining the noise intensity of each pixel in the target image block, the noise weight of each pixel can be determined based on its noise intensity, thereby obtaining the noise weight of each pixel in the target image block. Similarly, the noise weight of each pixel in the candidate image block can be obtained.
[0135] In one implementation, considering that the noise weights of different pixels may differ significantly, leading to a fragmented effect in image denoising, the noise weights of different pixels can be filtered. For example, within the target image block (or candidate image block), a filtering window of a certain size can be used to smooth the noise weights of each pixel in order to neutralize isolated points and improve the smoothness of image denoising.
[0136] After obtaining the noise weights of each pixel in the target and candidate image blocks, the similarity between the candidate and target image blocks can be determined based on these noise weights. For example, the noise weights of pixels at the same position in the target and candidate image blocks can be subtracted to obtain the noise weight difference at each position. Alternatively, the average of these noise weight differences can be calculated to obtain the global noise weight difference between the target and candidate image blocks. The noise intensity weight can also reflect the distance between the candidate and target image blocks. Similarity can be calculated from the noise weight difference based on a negative correlation function. For instance, the reciprocal of the noise weight difference or "1 - normalized noise weight difference" can be used as the similarity between the candidate and target image blocks.
[0137] (ii) Texture intensity
[0138] In one implementation, the image denoising method may further include the following steps:
[0139] Determine the texture intensity of the target image patch and the texture intensity of the candidate image patch;
[0140] The similarity between the candidate image patch and the target image patch is determined based on the texture intensity of the candidate image patch and the texture intensity of the target image patch.
[0141] The texture intensity of the target image patch is used to characterize the texture density of the target image patch. (Reference) Figure 6 As shown, the "sky" area has almost no texture, is a flat area, and has low texture intensity; the "asphalt road" area has sparse texture, is a weak texture area, and has a higher texture intensity than the "sky" area, but is still relatively low; the "greenery" area has dense texture, even at the edges, is a strong texture area, and has relatively high texture intensity. This disclosure does not limit how texture intensity is determined; the following is an illustrative example.
[0142] In one implementation, the texture intensity of a target image patch can be determined based on its flatness. Flatness and texture intensity can be inverse indicators; higher flatness corresponds to lower texture intensity. For example, the reciprocal of the flatness or "1 - normalized flatness" can be used as the texture intensity.
[0143] In one implementation, determining the texture intensity of the target image patch includes:
[0144] The pixel dispersion values of the target image patch are statistically analyzed, and the texture intensity of the target image patch is determined based on the pixel dispersion values.
[0145] The pixel dispersion value can be variance, standard deviation, or other dispersion indicators. Pixel dispersion values can be calculated for the brightness values of individual pixels; these brightness values can be the raw brightness values in the RAW domain or brightness values calculated based on RGB data. Pixel dispersion values can also be calculated for the pixel values of a specific channel of a pixel (such as R pixel values, G pixel values, or B pixel values).
[0146] The pixel dispersion value can be used as the texture intensity, or the pixel dispersion value can be further processed (such as normalization) to obtain the texture intensity.
[0147] The above explains how to determine the texture intensity of a target image patch. The texture intensity of a candidate image patch can be determined in the same way.
[0148] If a candidate image patch is similar to a target image patch, then their texture intensities should also be similar. Therefore, the similarity between a candidate image patch and a target image patch can be determined based on their texture intensities.
[0149] In one implementation, the similarity between a candidate image patch and a target image patch can be calculated based on the proximity of the texture intensity of the candidate image patch to the texture intensity of the target image patch. For example, the difference between the texture intensity of the candidate image patch and the texture intensity of the target image patch can be calculated, reflecting the distance between them. This difference is then normalized, and "1 - normalized texture intensity difference" is taken as the similarity between the candidate image patch and the target image patch.
[0150] In one implementation, determining the similarity between a candidate image patch and a target image patch based on the texture intensity of the candidate image patch and the texture intensity of the target image patch may include the following steps:
[0151] The texture intensity of the target image patch is compared with the noise intensity of the target image patch, and the texture weight of the target image patch is determined based on the comparison result.
[0152] The texture intensity of the candidate image patch is compared with the noise intensity of the candidate image patch, and the texture weight of the candidate image patch is determined based on the comparison result.
[0153] The similarity between the candidate image patch and the target image patch is determined based on the texture weights of the candidate image patch and the target image patch.
[0154] Among them, texture weight is a weight obtained by further quantizing texture intensity from the perspective of noise reduction. It can characterize the required filtering intensity of the target image patch (or candidate image patch) from the texture intensity level.
[0155] Texture intensity and noise intensity can be similar metrics; for example, texture intensity can be the standard deviation of pixels, and noise intensity can be the standard deviation of luminance values, thus allowing for direct comparison. By comparing texture intensity and noise intensity, the numerical level of texture intensity can be measured, thereby determining texture weights.
[0156] In one implementation, multiple texture intensity value ranges can be set according to the noise intensity of the target image block, and the corresponding texture weight can be determined according to the texture intensity value range in which the texture intensity of the target image block is located.
[0157] For example, multiple texture intensity value ranges can be set based on the noise intensity of the target image patch, including: [0, std[y] x ]), [std[y x ],2·std[y x ]), [2·std[y x ],+∞), std[y x ] represents the noise intensity of the target image patch. If the texture intensity of the target image patch is in [0, std[y], then... x Within [std[y]), pixel dispersion can be considered mainly caused by noise, meaning texture intensity does not reflect the actual texture. The target image patch may be a flat area. From a texture perspective, a higher filter weight can be set, thus determining a larger texture weight. If the texture intensity of the target image patch is within [std[y], x ],2·std[y x Within [2·std[y]), it can be assumed that noise and actual texture both contribute a certain proportion to the pixel discreteness. The target image patch may be a weak texture region. From a texture perspective, an appropriate filtering weight can be set, thus determining an appropriate texture weight. If the texture intensity of the target image patch is within [2·std[y], x Within the range of ], +∞), pixel dispersion can be considered to be mainly caused by actual texture, with noise contributing little. The target image block may be a region with strong texture. From the perspective of texture, a lower filtering weight can be set, thus determining a smaller texture weight.
[0158] For example, the texture weight of a target image patch can be calculated using the following formula:
[0159]
[0160] Here, std[pixel] represents the texture intensity calculated based on the pixel standard deviation. It should be understood that the texture weight corresponding to each texture intensity range can be determined empirically or obtained from a pre-configured curve index. The values 4, 8, and 10 above are merely examples; they can also be normalized to serve as texture weights.
[0161] The above explains how to determine the texture weight of a target image patch. In the same way, the texture intensity of a candidate image patch can be compared with the noise intensity of the candidate image patch, and the texture weight of the candidate image patch can be determined based on the comparison result.
[0162] After obtaining the texture weights of the candidate image patch and the target image patch, the similarity between the candidate and target image patches can be determined based on the closeness of their texture weights. For example, the difference between the texture weights of the candidate and target image patches can be calculated, reflecting the distance between them. This difference is then normalized, and "1 - normalized texture weight difference" is taken as the similarity between the candidate and target image patches.
[0163] Since texture weights are a further quantification of texture intensity, determining the similarity between candidate image patches and target image patches through texture weights is more accurate.
[0164] In one implementation, the texture intensity of the target image patch may include the texture intensity of each pixel in the target image patch. For example, for each pixel in the target image patch, a region centered on that pixel can be cropped from the image to be processed. This disclosure does not limit the size of this region, but it can be 18×10. Then, the pixel dispersion value within this region is statistically analyzed, such as variance or standard deviation, and used as the texture intensity of that pixel. The formula for the statistical standard deviation is shown below:
[0165]
[0166] Where std[pixel] represents the standard deviation of the pixel value, n is the number of pixels in the above region, and x i This represents any pixel within the aforementioned region. This represents the average pixel value within the aforementioned area.
[0167] Similarly, the texture intensity of a candidate image patch can include the texture intensity of each pixel within the candidate image patch. Furthermore, the similarity between the candidate and target image patches can be determined based on the texture intensity of each pixel in the target image patch and the texture intensity of each pixel in the candidate image patch. For example, the texture intensity of pixels at the same position in the target and candidate image patches can be subtracted to obtain the texture intensity difference at each position. Alternatively, the average of these texture intensity differences can be calculated to obtain the global texture intensity difference between the target and candidate image patches. The texture intensity difference reflects the distance between the candidate and target image patches. Similarity can be calculated from the texture intensity difference based on a negative correlation function. For example, the reciprocal of the texture intensity difference, or "1 - normalized texture intensity difference," can be used as the similarity between the candidate and target image patches.
[0168] In one implementation, after obtaining the texture intensity of each pixel in the target image block, the texture weight of each pixel can be determined based on its texture intensity, thereby obtaining the texture weight of each pixel in the target image block. Similarly, the texture weight of each pixel in the candidate image block can be obtained. In another implementation, considering that the texture weights of different pixels may differ significantly, leading to a fragmented effect in image denoising, the texture weights of different pixels can be filtered. For example, within the target image block (or candidate image block), a filtering window of a certain size can be used to smooth the texture weight of each pixel to neutralize isolated points and improve the smoothness of image denoising.
[0169] After obtaining the texture weights of each pixel in the target and candidate image patches, the similarity between the candidate and target image patches can be determined based on these weights. For example, the texture weights of pixels at the same position in the target and candidate image patches can be subtracted to obtain the texture weight difference at each position. Alternatively, the average of these differences can be calculated to obtain the global texture weight difference between the target and candidate image patches. Texture intensity weights can also reflect the distance between the candidate and target image patches. Similarity can be calculated from the texture weight difference based on a negative correlation function. For instance, the reciprocal of the texture weight difference or "1 - normalized texture weight difference" can be used as the similarity between the candidate and target image patches.
[0170] (III) Pixel Difference
[0171] In one implementation, the similarity between a candidate image patch and a target image patch can be determined based on the pixel difference between the two. Since the candidate and target image patches are of the same size, the pixel values at the same locations in the candidate and target image patches can be subtracted to obtain the pixel difference at each location. This pixel difference can be an absolute difference. Alternatively, the average of the pixel differences at each location can be calculated as the global pixel difference between the candidate and target image patches. The pixel difference reflects the distance between the candidate and target image patches, and the similarity can be calculated based on a negative correlation function. For example, the reciprocal of the pixel difference, or "1 - normalized pixel difference," can be used as the similarity between the candidate and target image patches.
[0172] It should be understood that similarity can also be determined by combining multiple indicators among the aforementioned noise intensity, texture intensity, and pixel difference. For example, similarity can be calculated by combining noise intensity and texture intensity. Specifically, image denoising methods may also include the following steps:
[0173] Determine the noise intensity of the target image patch and the noise intensity of the candidate image patch;
[0174] Determine the texture intensity of the target image patch and the texture intensity of the candidate image patch;
[0175] The similarity between the candidate image patch and the target image patch is determined based on the noise intensity of the candidate image patch and the noise intensity of the target image patch, as well as the texture intensity of the candidate image patch and the texture intensity of the target image patch.
[0176] For details on how to determine noise intensity and texture intensity, please refer to the above text. Noise intensity and texture intensity reflect the similarity between candidate image patches and target image patches from two different perspectives. The noise intensity and texture intensity can be calculated separately first, and then the results from both aspects can be combined to obtain a comprehensive similarity score.
[0177] For example, the first similarity component between a candidate image patch and a target image patch can be determined based on the noise intensity of the candidate image patch and the noise intensity of the target image patch. For instance, the first similarity component can be calculated by directly comparing the noise intensity of the candidate image patch and the noise intensity of the target image patch; this could be expressed as "1 - normalized noise intensity difference". Alternatively, both the noise intensity of the candidate image patch and the noise intensity of the target image patch can be converted into noise weights, and the first similarity component can be calculated by comparing the noise weights of the candidate image patch and the noise weights of the target image patch; this could also be expressed as "1 - normalized noise weight difference".
[0178] For example, a second similarity component between a candidate image patch and a target image patch can be determined based on the texture intensity of the candidate image patch and the texture intensity of the target image patch. For instance, the second similarity component can be calculated by directly comparing the texture intensity of the candidate image patch and the texture intensity of the target image patch; this could be something like "1 - normalized texture intensity difference". Alternatively, both the texture intensity of the candidate image patch and the texture intensity of the target image patch can be converted into texture weights, and the second similarity component can be calculated by comparing the texture weights of the candidate image patch and the texture weights of the target image patch; this could also be something like "1 - normalized texture weight difference".
[0179] After obtaining the first similarity component and the second similarity component, the product of the two or their average or weighted average can be used as the final similarity between the candidate image patch and the target image patch.
[0180] The above explains how to determine the similarity between candidate image patches and target image patches. Given the orientation weights and similarity scores, the filtering weights for candidate image patches can be calculated. For example, the product of the orientation weight and similarity score for each candidate image patch can be used as the filtering weight; alternatively, the product of the orientation weight and similarity score for each candidate image patch can be normalized, and the normalized value can be used as the filtering weight; alternatively, the similarity between the candidate image patch and the target image patch can be used as the similarity weight, and the average or weighted average of the orientation weights and similarity weights of the candidate image patches can be calculated to obtain the filtering weight.
[0181] Continue to refer to Figure 2 In step S240, the target image block is filtered based on the filtering weights of the candidate image blocks.
[0182] In one implementation, candidate image patches can be weighted based on their filtering weights, and the weighted result can be used as the filtered value for the target image patch to replace the original data of the target image patch, thereby achieving noise reduction of the target image patch. For example, the filtered value of the target image patch can be calculated using the following formula:
[0183] NLM(p0(i,j))=∑ k w(p k )p k (i,j) (12)
[0184] Where p0 represents the target image block; p0(i,j) represents any pixel in the target image block, which is located in the i-th row and j-th column of the target image block; NLM(p0(i,j)) represents the filter value of the pixel, p k Let w(p) represent any candidate image patch. k ) represents candidate image block p kThe filter weights, p k (i,j) represents the candidate image block p k The pixel located in the i-th row and j-th column, i.e., p0(i,j), is in p k The corresponding pixel in the target image block. Formula (11) shows that for the corresponding pixel in all candidate image blocks, the filtering weight of the candidate image blocks is used to weight the corresponding pixel to obtain the filtering value of the corresponding pixel in the target image block. Thus, the filtering value of each pixel in the target image block can be calculated, thereby achieving filtering and noise reduction for the entire target image block.
[0185] In the filtering method shown in formula (12), the original data of the target image block is not used. In one embodiment, each candidate image block and the target image block can be weighted based on the filtering weight of the candidate image blocks, and the weighted result can be used as the filtering value of the target image block to complete the filtering of the target image block. The filtering weight of the target image block can be "1 - the sum of the filtering weights of each candidate image block".
[0186] Figure 7 The illustration shows a schematic flow of an image denoising method, which may include:
[0187] Step S701: Obtain the image to be processed;
[0188] Step S702: Determine whether the image to be processed has been traversed, that is, whether all image blocks in the image to be processed have been denoised. If not, proceed to step S703; if yes, proceed to step S712.
[0189] Step S703: Determine the target image block from the image to be processed. The image to be processed can be divided into several image blocks, and each image block can be used as the target image block in turn.
[0190] Step S704: Determine the candidate image block corresponding to the target image block;
[0191] Step S705: Determine the gradient of the target image patch in the filtering direction;
[0192] Step S706: Determine the orientation weight of the candidate image block in each filtering direction based on the gradient of the target image block in the filtering direction;
[0193] Step S707: Determine the noise intensity and texture intensity of the target image patch;
[0194] Step S708: Determine the noise intensity and texture intensity of the candidate image patch;
[0195] Step S709: Calculate the similarity between the candidate image block and the target image block based on the noise intensity of the target image block and the noise intensity of the candidate image block, as well as the texture intensity of the target image block and the texture intensity of the candidate image block.
[0196] Step S710: Calculate the filtering weight of the candidate image block based on the orientation weight of the candidate image block and the similarity between the candidate image block and the target image block.
[0197] Step S711: The candidate image block is weighted using filtering weights to replace the original data of the target image block, thereby achieving noise reduction of the target image block;
[0198] Step S712: If the image to be processed has been traversed, it means that all image blocks in the image to be processed have been filtered, thereby achieving noise reduction of the image to be processed and outputting the noise-reduced image.
[0199] Exemplary embodiments of this disclosure also provide another image noise reduction method. Figure 8 The flowchart of the image denoising method is shown, which may include the following steps S810 to S840:
[0200] Step S810: Determine the target image block and one or more candidate image blocks corresponding to the target image block in the image to be processed;
[0201] Step S820: Obtain the gradient of the target image patch in the filtering direction, and determine the orientation weight of the candidate image patch in the filtering direction based on the gradient; the filtering direction is the orientation of the candidate image patch relative to the target image patch.
[0202] Step S830: Determine the filtering weight of the target image block based on the noise intensity and / or texture intensity of the target image block; determine the filtering weight of the candidate image block based on the orientation weight of the candidate image block and the filtering weight of the target image block.
[0203] Step S840: Filter the target image block based on the filtering weights of the candidate image blocks.
[0204] Steps S810 and S210 are the same, and steps S820 and S220 are the same, so they will not be repeated here.
[0205] Step S830 will be explained below.
[0206] exist Figure 8 In this method, the original data of the target image patch will participate in the final filtering, and the filtering weight of the target image patch is the proportion of the original data of the target image patch in the filtering.
[0207] To determine the filtering weights for the target image patch, it is necessary to first determine the noise intensity and / or texture intensity of the target image patch, as described above.
[0208] In one implementation, the filtering weight of a target image patch can be determined based on its noise intensity. Generally, the greater the noise intensity of a target image patch, the more severe the noise within the patch, and the smaller its weight should be in the filtering process—that is, the smaller its filtering weight. This effectively suppresses the noise within the target image patch. A negative correlation function between noise intensity and filtering weight can be established, and this function can be used to determine the filtering weight of the target image patch. For example, the filtering weight could be the reciprocal of the noise intensity or "1 - normalized noise intensity," etc.
[0209] Furthermore, the noise weight of the target image patch can be determined based on its noise intensity, as described above. Then, the filtering weight of the target image patch is determined based on its noise weight. For example, the filtering weight could be the reciprocal of the noise weight or "1 - noise weight," etc.
[0210] In one implementation, the texture weight of a target image patch can be determined based on its texture intensity. Generally, the greater the texture intensity of a target image patch, the denser the texture within the patch, and the greater its weight should be in the filtering process; that is, the greater its filtering weight. This allows for the preservation of the texture or detail information of the target image patch to a greater extent. A positive correlation function between texture intensity and texture weight can be established, and this function can be used to determine the texture weight of the target image patch. This function can be a linear function, a piecewise function, etc., and this disclosure is not limited thereto. For example, the filtering weight can be a normalized texture intensity, etc.
[0211] Furthermore, the texture weights of the target image patches can be determined based on their texture intensity, as described above. Then, the filtering weights of the target image patches are determined based on their texture weights. For example, the filtering weights could be normalized texture weights, etc.
[0212] In one implementation, the filtering weight of a target image patch can be determined based on its noise intensity and texture intensity. That is, the filtering weight can be calculated by combining both noise intensity and texture intensity. Generally, noise intensity and texture intensity can be calculated separately and then combined. For example, a first weight component of the target image patch can be determined based on its noise intensity; this first weight component could be the reciprocal of the noise intensity, "1 - normalized noise intensity," "1 - noise weight," etc. A second weight component can be determined based on its texture intensity; this second weight component could be normalized texture intensity or normalized texture weight, etc. The filtering weight of the target image patch can then be determined based on the first and second weight components. For example, the product of the first and second weight components, or the normalized value of the product, or the average or weighted average of the first and second weight components, can be used as the filtering weight of the target image patch. This filtering weight combines both noise intensity and texture intensity factors, resulting in higher accuracy.
[0213] Given the filtering weights of the target image patch, "1 - filtering weight of the target image patch" can be used as the sum of the filtering weights of all candidate image patches. The filtering weight of each candidate image patch is determined based on its directional weight and the sum of its filtering weights. For example, the directional weights of the candidate image patches are all normalized values. The average filtering weight of each candidate image patch can be obtained by first dividing the sum of its filtering weights by the number of candidate image patches, and then multiplying the directional weight of each candidate image patch by the average filtering weight to obtain the filtering weight of each candidate image patch.
[0214] In one implementation, determining the filtering weight of a candidate image block based on the orientation weight of the candidate image block and the filtering weight of the target image block may include the following steps:
[0215] The filtering weight of the candidate image patch is determined based on the orientation weight of the candidate image patch, the similarity between the candidate image patch and the target image patch, and the filtering weight of the target image patch.
[0216] Regarding how to determine the similarity between candidate image patches and target image patches, reference can be made to the above-mentioned content. For example, similarity can be calculated based on one or more indicators such as noise intensity, texture intensity, and pixel difference. The directional weight of each candidate image patch can be combined with the similarity to determine the proportion each candidate patch should occupy in filtering, and then the filtering weight can be calculated. Generally, the larger the directional weight, the higher the similarity, and the larger the filtering weight. For example, the product (or normalized product) of the directional weight and similarity of the candidate image patch, or the average or weighted average of the directional weight and similarity of the candidate image patch, can be used as the proportion of the candidate image patch. The proportion of each candidate image patch is then multiplied by the average filtering weight to obtain the filtering weight of each candidate image patch. This ensures that the filtering weight incorporates multiple aspects of information, including directional weight, similarity, and the noise intensity or texture intensity of the target image patch, improving the rationality and accuracy of the filtering weight.
[0217] In step S830, the filtering weights of the target image block and each candidate image block are obtained. In step S840, the target image block and each candidate image block are weighted according to the filtering weights, and the weighted result is used as the filtering value of the target image block to replace the original data of the target image block, thereby achieving noise reduction of the target image block.
[0218] based on Figure 8 The method, on the one hand, determines the filtering weight of the target image patch based on its noise intensity and / or texture intensity, thereby balancing the proportion of the target image patch and candidate image patches in the filtering process from the perspective of noise intensity and / or texture intensity. Furthermore, it determines the directional weight of candidate image patches in the filtering direction based on the gradient of the target image patch in that direction, and then determines the filtering weight of the candidate image patches, making the filtering weights adaptable to the texture or information distribution of the target image patch in the filtering direction. Thus, it can preserve the original image details in the target image patch to a large extent while filtering and denoising, improving image quality. On the other hand, it can achieve denoising of a single frame of image without utilizing temporal information, the calculation process is relatively simple, and the computational resources consumed are low, which is beneficial for deployment in lightweight scenarios such as mobile devices; moreover, the image denoising response time is short, which is beneficial for applications in scenarios with high real-time requirements, such as real-time denoising of each frame in a video.
[0219] Exemplary embodiments of this disclosure also provide an image noise reduction apparatus. (See reference...) Figure 9 As shown, the image noise reduction device 900 may include:
[0220] The image block determination module 910 is configured to determine a target image block and one or more candidate image blocks corresponding to the target image block in the image to be processed;
[0221] The orientation weight determination module 920 is configured to obtain the gradient of the target image patch in the filtering direction, and determine the orientation weight of the candidate image patch in the filtering direction based on the gradient; the filtering direction is the direction of the candidate image patch relative to the target image patch.
[0222] The filter weight determination module 930 is configured to determine the filter weight of the candidate image block based on the directional weight of the candidate image block and the similarity between the candidate image block and the target image block.
[0223] The image patch filtering module 940 is configured to filter the target image patch based on the filtering weights of the candidate image patches.
[0224] In one embodiment, the image noise reduction apparatus 900 may further include a similarity determination module, configured to:
[0225] Determine the noise intensity of the target image patch and the noise intensity of the candidate image patch;
[0226] The similarity between the candidate image patch and the target image patch is determined based on the noise intensity of the candidate image patch and the noise intensity of the target image patch.
[0227] In one implementation, determining the noise intensity of the target image patch includes:
[0228] Obtain the brightness value of the target image patch;
[0229] Using a pre-calibrated noise function of the image to be processed, the noise intensity corresponding to the brightness value of the target image block is determined, and used as the noise intensity of the target image block; the noise function is a function between the brightness value and the noise intensity.
[0230] In one embodiment, the image noise reduction apparatus 900 may further include a noise function calibration module, configured to:
[0231] In the image to be processed, multiple sets of data to be fitted are determined. Each set of data to be fitted includes a local brightness value and a corresponding local standard deviation.
[0232] Using the local standard deviation as the noise intensity, the noise function is calibrated by fitting the local brightness value with the local standard deviation.
[0233] In one implementation, determining the noise intensity of the target image patch includes:
[0234] By using a pre-calibrated functional relationship between photosensitivity and noise parameters, the noise parameters corresponding to the photosensitivity of the image to be processed are determined and used as the noise parameters of the image to be processed.
[0235] Obtain the brightness value of the target image patch;
[0236] The noise intensity of the target image block is calculated based on the brightness value of the target image block and the noise parameters of the image to be processed.
[0237] In one implementation, determining the similarity between a candidate image patch and a target image patch based on the noise intensity of the candidate image patch and the noise intensity of the target image patch includes:
[0238] Obtain multiple noise intensity value ranges;
[0239] The noise weight of the target image patch is determined based on the noise intensity range in which the noise intensity of the target image patch is located; the noise weight of the candidate image patch is determined based on the noise intensity range in which the noise intensity of the candidate image patch is located.
[0240] The similarity between the candidate image patch and the target image patch is determined based on the noise weights of the candidate image patch and the target image patch.
[0241] In one embodiment, the image noise reduction apparatus 900 may further include a similarity determination module, configured to:
[0242] Determine the texture intensity of the target image patch and the texture intensity of the candidate image patch;
[0243] The similarity between the candidate image patch and the target image patch is determined based on the texture intensity of the candidate image patch and the texture intensity of the target image patch.
[0244] In one implementation, determining the texture intensity of the target image patch includes:
[0245] The pixel dispersion values of the target image patch are statistically analyzed, and the texture intensity of the target image patch is determined based on the pixel dispersion values.
[0246] In one implementation, determining the similarity between a candidate image patch and a target image patch based on the texture intensity of the candidate image patch and the texture intensity of the target image patch includes:
[0247] The texture intensity of the target image patch is compared with the noise intensity of the target image patch, and the texture weight of the target image patch is determined based on the comparison result.
[0248] The texture intensity of the candidate image patch is compared with the noise intensity of the candidate image patch, and the texture weight of the candidate image patch is determined based on the comparison result.
[0249] The similarity between the candidate image patch and the target image patch is determined based on the texture weights of the candidate image patch and the target image patch.
[0250] In one embodiment, the image noise reduction apparatus 900 may further include a similarity determination module, configured to:
[0251] Determine the noise intensity of the target image patch and the noise intensity of the candidate image patch;
[0252] Determine the texture intensity of the target image patch and the texture intensity of the candidate image patch;
[0253] The similarity between the candidate image patch and the target image patch is determined based on the noise intensity of the candidate image patch and the noise intensity of the target image patch, as well as the texture intensity of the candidate image patch and the texture intensity of the target image patch.
[0254] In one embodiment, obtaining the gradient of the target image patch in the filtering direction includes:
[0255] Within the target image block or in the neighborhood of the target image block, select one or more sets of pixel pairs along the filtering direction;
[0256] The gradient of the target image patch in the filtering direction is determined based on the difference between each pair of pixels.
[0257] In one implementation, determining the orientation weights of candidate image blocks in the filtering direction based on the gradient includes:
[0258] Obtain multiple gradient value ranges;
[0259] Determine the gradient value range of the candidate image patch along the filtering direction, and determine the directional weight of the candidate image patch based on the weight corresponding to the gradient value range.
[0260] In one implementation, obtaining multiple gradient value intervals includes:
[0261] Find the maximum value in the gradient and divide the interval from 0 to the maximum value into multiple gradient value intervals.
[0262] Exemplary embodiments of this disclosure also provide another image noise reduction apparatus. (See reference...) Figure 10 As shown, the image noise reduction device 1000 may include:
[0263] The image block determination module 1010 is configured to determine a target image block and one or more candidate image blocks corresponding to the target image block in the image to be processed;
[0264] The orientation weight determination module 1020 is configured to obtain the gradient of the target image patch in the filtering direction, and determine the orientation weight of the candidate image patch in the filtering direction based on the gradient; the filtering direction is the direction of the candidate image patch relative to the target image patch.
[0265] The filter weight determination module 1030 is configured to determine the filter weight of the target image block based on the noise intensity and / or texture intensity of the target image block; and to determine the filter weight of the candidate image block based on the orientation weight of the candidate image block and the filter weight of the target image block.
[0266] The image block filtering module 1040 is configured to filter the target image block based on the filtering weights of the candidate image blocks.
[0267] The specific details of each part of the above-mentioned device have been described in detail in the method section of the implementation plan. For any undisclosed details, please refer to the implementation plan of the method section, and therefore will not be repeated here.
[0268] Exemplary embodiments of this disclosure also provide a computer-readable storage medium that can be implemented as a program product including program code, which, when run on an electronic device, causes the electronic device to perform the steps described in the "Exemplary Methods" section of this specification according to various exemplary embodiments of this disclosure. In an alternative embodiment, the program product can be implemented as a portable compact disc read-only memory (CD-ROM) including program code and can run on an electronic device, such as a personal computer. However, the program product of this disclosure is not limited thereto. In this document, the readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0269] The program product may employ any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of readable storage media include: electrical connections having one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0270] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable signal medium may also be any readable medium other than a readable storage medium, capable of sending, propagating, or transmitting programs for use by or in conjunction with an instruction execution system, apparatus, or device.
[0271] The program code contained on the readable medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination thereof.
[0272] Program code for performing the operations of this disclosure can be written in any combination of one or more programming languages, including object-oriented programming languages such as Java and C++, and conventional procedural programming languages such as C or similar languages. The program code can execute entirely on the user's computing device, partially on the user's computing device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing devices can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0273] Exemplary embodiments of this disclosure also provide an electronic device, such as the terminal 110 or server 120 described above. The electronic device may include a processor and a memory. The memory stores executable instructions for the processor, such as program code. The processor executes these executable instructions to perform the image noise reduction method of this exemplary embodiment.
[0274] The following is based on Figure 11 Taking the mobile terminal 1100 as an example, the construction of this electronic device will be described by way of example. Those skilled in the art will understand that, apart from components specifically designed for mobile purposes, Figure 11 The structure can also be applied to fixed types of equipment.
[0275] like Figure 11 As shown, the mobile terminal 1100 may specifically include: a processor 1101, a memory 1102, a bus 1103, a mobile communication module 1104, an antenna 1, a wireless communication module 1105, an antenna 2, a display screen 1106, a camera module 1107, an audio module 1108, a power module 1109, and a sensor module 1110.
[0276] Processor 1101 may include one or more processing units, such as an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, an encoder, a decoder, a digital signal processor (DSP), a baseband processor, and / or a neural network processing unit (NPU). The image noise reduction method in this exemplary embodiment can be executed by one or more of the AP, GPU, ISP, DSP, and NPU.
[0277] The processor 1101 can be connected to the memory 1102 or other components via the bus 1103.
[0278] The memory 1102 can be used to store computer executable program code, which includes instructions. The processor 1101 executes various functional applications and data processing of the mobile terminal 1100 by running the instructions stored in the memory 1102. The memory 1102 can also store application data, such as images, videos, and other files.
[0279] The communication function of mobile terminal 1100 can be implemented through mobile communication module 1104, antenna 1, wireless communication module 1105, antenna 2, modem processor, and baseband processor. Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Mobile communication module 1104 can provide 3G, 4G, 5G and other mobile communication solutions for mobile terminal 1100. Wireless communication module 1105 can provide wireless communication solutions such as wireless LAN, Bluetooth, and near-field communication for mobile terminal 1100.
[0280] The display screen 1106 is used to implement display functions, such as displaying user interfaces, images, videos, etc.
[0281] The camera module 1107 is used to implement the shooting function. In one embodiment, an ISP can be set in the camera module 1107, which acquires the RAW domain image to be processed.
[0282] The audio module 1108 is used to implement audio functions, such as playing audio and capturing voice.
[0283] The power module 1109 is used to implement power management functions, such as charging the battery, powering the device, and monitoring the battery status.
[0284] The sensor module 1110 may include one or more sensors for implementing corresponding sensing and detection functions.
[0285] It should be noted that although several modules or units for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to exemplary embodiments of this disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.
[0286] Those skilled in the art will understand that various aspects of this disclosure can be implemented as systems, methods, or program products. Therefore, various aspects of this disclosure can be embodied in entirely hardware implementations, entirely software implementations (including firmware, microcode, etc.), or implementations combining hardware and software aspects, collectively referred to herein as “circuit,” “module,” or “system.” Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and embodiments are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the claims.
[0287] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is defined only by the appended claims.
Claims
1. An image denoising method, characterized in that, include: In the image to be processed, a target image block and one or more candidate image blocks corresponding to the target image block are identified; Obtain the gradient of the target image patch in the filtering direction, and determine the orientation weight of the candidate image patch in the filtering direction based on the gradient; The filtering direction is the direction in which the candidate image block is located relative to the target image block; The filtering weights of the candidate image blocks are determined based on the directional weights of the candidate image blocks and the similarity between the candidate image blocks and the target image blocks. The target image block is filtered based on the filtering weights of the candidate image blocks; The similarity between the candidate image patch and the target image patch is determined by at least one of the following methods: The noise intensity of the target image patch is determined, and the noise intensity of the candidate image patch is also determined. Based on the noise intensity of the candidate image patch and the noise intensity of the target image patch, the similarity between the candidate image patch and the target image patch is determined. The closer the noise intensity of the candidate image patch and the target image patch are, the higher the similarity. The texture intensity of the target image patch is determined, and the texture intensity of the candidate image patch is determined; based on the texture intensity of the candidate image patch and the texture intensity of the target image patch, the similarity between the candidate image patch and the target image patch is determined; wherein, the closer the texture intensity of the candidate image patch and the target image patch are, the higher the similarity.
2. The method according to claim 1, characterized in that, The step of determining the filtering weight of the candidate image patch based on the orientation weight of the candidate image patch and the similarity between the candidate image patch and the target image patch includes: The product of the directional weight of the candidate image block and the corresponding similarity, or the normalized value of the product, is used as the filtering weight of the candidate image block.
3. The method according to claim 1, characterized in that, Determining the noise intensity of the target image patch includes: Obtain the brightness value of the target image block; Using a noise function pre-calibrated for the image to be processed, the noise intensity corresponding to the brightness value of the target image block is determined, and used as the noise intensity of the target image block; the noise function is a function between the brightness value and the noise intensity.
4. The method according to claim 3, characterized in that, The method further includes: Multiple sets of data to be fitted are determined in the image to be processed. Each set of data to be fitted includes a local brightness value and a corresponding local standard deviation. Using the local standard deviation as the noise intensity, the noise function is calibrated by fitting the local brightness value with the local standard deviation.
5. The method according to claim 1, characterized in that, Determining the noise intensity of the target image patch includes: By using a pre-calibrated functional relationship between photosensitivity and noise parameters, the noise parameters corresponding to the photosensitivity of the image to be processed are determined and used as the noise parameters of the image to be processed. Obtain the brightness value of the target image block; The noise intensity of the target image block is calculated based on the brightness value of the target image block and the noise parameters of the image to be processed.
6. The method according to claim 1, characterized in that, Determining the similarity between the candidate image patch and the target image patch based on the noise intensity of the candidate image patch and the noise intensity of the target image patch includes: Obtain multiple noise intensity value ranges; The noise weight of the target image block is determined based on the noise intensity value range in which the noise intensity of the target image block is located; the noise weight of the candidate image block is determined based on the noise intensity value range in which the noise intensity of the candidate image block is located. The similarity between the candidate image patch and the target image patch is determined based on the noise weight of the candidate image patch and the noise weight of the target image patch.
7. The method according to claim 1, characterized in that, The filtering of the target image block based on the filtering weights of the candidate image blocks includes: The candidate image blocks and the target image block are weighted based on the filtering weights of the candidate image blocks, and the weighted result is used as the filtering value of the target image block.
8. The method according to claim 1, characterized in that, Determining the texture intensity of the target image patch includes: The pixel dispersion value of the target image block is statistically analyzed, and the texture intensity of the target image block is determined based on the pixel dispersion value.
9. The method according to claim 1, characterized in that, Determining the similarity between the candidate image patch and the target image patch based on the texture intensity of the candidate image patch and the texture intensity of the target image patch includes: The texture intensity of the target image patch is compared with the noise intensity of the target image patch, and the texture weight of the target image patch is determined based on the comparison result; The texture intensity of the candidate image patch is compared with the noise intensity of the candidate image patch, and the texture weight of the candidate image patch is determined based on the comparison result. The similarity between the candidate image patch and the target image patch is determined based on the texture weights of the candidate image patch and the target image patch.
10. The method according to claim 1, characterized in that, The method further includes: Determine the noise intensity of the target image block, and determine the noise intensity of the candidate image block; Determine the texture intensity of the target image patch, and determine the texture intensity of the candidate image patch; The similarity between the candidate image patch and the target image patch is determined based on the noise intensity of the candidate image patch and the noise intensity of the target image patch, as well as the texture intensity of the candidate image patch and the texture intensity of the target image patch.
11. The method according to claim 1, characterized in that, The step of obtaining the gradient of the target image patch in the filtering direction includes: Within the target image block or in the neighborhood of the target image block, one or more sets of pixel pairs are selected along the filtering direction; The gradient of the target image block in the filtering direction is determined based on the difference between each pair of pixels.
12. The method according to claim 1, characterized in that, Determining the orientation weight of the candidate image patch in the filtering direction based on the gradient includes: Obtain multiple gradient value ranges; Determine the gradient value range of the gradient along the filtering direction of the candidate image block, and determine the directional weight of the candidate image block based on the weight corresponding to the gradient value range.
13. The method according to claim 12, characterized in that, The process of obtaining multiple gradient value intervals includes: Obtain the maximum value in the gradient, and divide the interval from 0 to the maximum value into the plurality of gradient value intervals.
14. An image denoising method, characterized in that, include: In the image to be processed, a target image block and one or more candidate image blocks corresponding to the target image block are identified; Obtain the gradient of the target image patch in the filtering direction, and determine the orientation weight of the candidate image patch in the filtering direction based on the gradient; The filtering direction is the direction in which the candidate image block is located relative to the target image block; The filtering weights of the target image patch are determined based on the noise intensity and texture intensity of the target image patch; wherein the filtering weights are negatively correlated with the noise intensity and positively correlated with the texture intensity; the filtering weights of the candidate image patch are determined based on the orientation weights of the candidate image patch and the filtering weights of the target image patch. The target image block is filtered based on the filtering weights of the candidate image blocks.
15. An image noise reduction device, characterized in that, include: The image block determination module is configured to determine a target image block and one or more candidate image blocks corresponding to the target image block in the image to be processed; The orientation weight determination module is configured to acquire the gradient of the target image patch in the filtering direction, and determine the orientation weight of the candidate image patch in the filtering direction based on the gradient; The filtering direction is the direction in which the candidate image block is located relative to the target image block; The filter weight determination module is configured to determine the filter weight of the candidate image block based on the directional weight of the candidate image block and the similarity between the candidate image block and the target image block. The image patch filtering module is configured to filter the target image patch based on the filtering weights of the candidate image patch; The similarity between the candidate image patch and the target image patch is determined by at least one of the following methods: The noise intensity of the target image patch is determined, and the noise intensity of the candidate image patch is also determined. Based on the noise intensity of the candidate image patch and the noise intensity of the target image patch, the similarity between the candidate image patch and the target image patch is determined. The closer the noise intensity of the candidate image patch and the target image patch are, the higher the similarity. The texture intensity of the target image patch is determined, and the texture intensity of the candidate image patch is determined; based on the texture intensity of the candidate image patch and the texture intensity of the target image patch, the similarity between the candidate image patch and the target image patch is determined; wherein, the closer the texture intensity of the candidate image patch and the target image patch are, the higher the similarity.
16. An image noise reduction device, characterized in that, include: The image block determination module is configured to determine a target image block and one or more candidate image blocks corresponding to the target image block in the image to be processed; The orientation weight determination module is configured to acquire the gradient of the target image patch in the filtering direction, and determine the orientation weight of the candidate image patch in the filtering direction based on the gradient; The filtering direction is the direction in which the candidate image block is located relative to the target image block; The filter weight determination module is configured to determine the filter weight of the target image block based on the noise intensity and texture intensity of the target image block; wherein the filter weight is negatively correlated with the noise intensity and positively correlated with the texture intensity; and to determine the filter weight of the candidate image block based on the orientation weight of the candidate image block and the filter weight of the target image block. The image patch filtering module is configured to filter the target image patch based on the filtering weights of the candidate image patch.
17. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method described in any one of claims 1 to 14.
18. An electronic device, characterized in that, include: processor; as well as Memory for storing the executable instructions of the processor; The processor is configured to execute the method of any one of claims 1 to 14 by executing the executable instructions.
Citation Information
Patent Citations
Non-local means image denoising with an adaptive directional spatial filter
CN107278314A