Image noise reduction method, device and storage medium
By preprocessing the image data and similarity noise reduction operations, the problem of difficult to take into account both image noise reduction effect and computing efficiency in the prior art is solved, and efficient image noise reduction and real-time performance improvement are achieved.
Patent Information
- Application Number
- CN202211564115.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-07
- Publication Date
- 2025-05-23
- Estimated Expiration
- 2042-12-07
AI Technical Summary
The prior art is difficult to improve the image noise reduction effect while improving the computing efficiency, especially in real-time application scenarios.
By preprocessing the image data, the irrelevant points are removed according to the correlation between the pixels, and the amount of data participating in the calculation is reduced; then the similarity-based noise reduction operation is performed on the preprocessed data to suppress oversmoothing and maintain signal detail characteristics.
It realizes the reduction of computational complexity while reducing noise, improves the real-time performance of image noise reduction, and suppresses local oversmoothing and maintains image structure information.
Smart Images

Figure CN115797212B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing technology, and in particular to an image noise reduction method, device and storage medium. Background Art
[0002] Since images are inevitably contaminated by noise to varying degrees during the process of acquisition, transmission, and display, which reduces the image quality, the main goal of image denoising is to filter out random noise and retain image detail information as much as possible.
[0003] Researchers have proposed a large number of denoising algorithms to remove noise from images, and this process is called image smoothing or image filtering. According to the signal domain where the filter exists, image denoising algorithms can be divided into two categories: one is the spatial domain method, which mainly processes pixels in the image spatial domain; the other is the transform domain method, which corrects the image coefficients in the transform domain and then obtains the final processed spatial domain image through inverse transformation.
[0004] More and more application scenarios require improving the real-time performance of image noise reduction algorithms, such as distributed fiber optic sensing systems for long-distance power cable health status monitoring. Summary of the invention
[0005] The technical problem to be solved by the present invention is to provide an image noise reduction method, device and storage medium to solve the technical problem of how to improve the noise reduction effect and calculation efficiency.
[0006] The main inventive concept of the technical solution provided by the present invention is: first, pre-process the data, remove irrelevant points in the search window according to the degree of correlation between pixels, and reduce the amount of data involved in the operation; then perform a similarity-based noise reduction operation on the pre-processed data to suppress over-smoothing while maintaining signal detail characteristics.
[0007] In order to solve the above technical problems, the technical solution adopted by the present invention is:
[0008] An image noise reduction method comprises the following steps: S1, preprocessing a pixel set X of a two-dimensional image signal, using pixels x of the pixel set X k The correlation between them is judged and irrelevant pixels are removed to obtain the preprocessed pixel set V = {V(i), i∈I}, where I is the coordinate domain where the pixel set X is located; S2, calculate the similarity w(i, j) between the neighborhood V'(i) where the pixel V(i) of the pixel set V is located and the neighborhood V'(j) where the related point V(j) in the search window of the pixel V(i) is located; S3, calculate the denoised pixel u(i) according to the similarity w(i, j), and obtain the pixel set u of the denoised two-dimensional image signal, u(i) = ∑ j∈Ω(i)w(i,j)V(j), where Ω(i) represents the set of related pixels within the search window of the pixel V(i); the search radius is D s , the neighborhood radius is d s .
[0009] An image noise reduction system comprises: a preprocessing module for preprocessing a pixel set X of a two-dimensional image signal, using pixels x of the pixel set X k The correlation between the pixels is judged and irrelevant pixels are removed to obtain a preprocessed pixel set V = {V(i), i∈I}, where I is the coordinate domain where the pixel set X is located; a similarity calculation module is used to calculate the similarity w(i, j) between the neighborhood V'(i) where the pixel V(i) of the pixel set V is located and the neighborhood V'(j) where the related point V(j) in the search window of the pixel V(i) is located; a denoising module is used to calculate the denoised pixel u(i) according to the similarity w(i, j) to obtain the pixel set u of the denoised two-dimensional image signal, u(i) = ∑ j∈Ω(i) w(i,j)V(j), where Ω(i) represents the set of related pixels within the search window of the pixel V(i); the search radius is D s , the neighborhood radius is d s .
[0010] An image noise reduction storage medium includes a stored program, wherein the program executes the above method when it is run.
[0011] The beneficial effects of the present invention are as follows: firstly, the data is preprocessed, and the pixels in the search window are judged as irrelevant points according to the correlation between the pixels, and the irrelevant points are removed; then, the noise reduction operation based on similarity is performed on the preprocessed data. In this way, the amount of data involved in the operation can be reduced, and local over-smoothing can be suppressed while noise reduction is performed, and the structural information of the image itself can be maintained. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] Figure 1 It is an overall flow chart of the image denoising method in a specific implementation manner of the present invention. DETAILED DESCRIPTION
[0013] In order to explain the technical content, achieved objectives and effects of the present invention in detail, the following is an explanation in combination with the implementation modes and the accompanying drawings.
[0014] The present invention provides an optimized and efficient denoising method for noisy two-dimensional images with a large amount of redundancy and similar features between pixels. This method belongs to the spatial domain denoising method, which directly processes all the pixels in the two-dimensional image space, suppresses local over-smoothing and maintains the structural information of the image itself while denoising.
[0015] The present invention provides an image noise reduction method, comprising the following steps:
[0016] S1, preprocessing a pixel set X of a two-dimensional image signal, using pixels x of the pixel set X k The correlation between them is judged and irrelevant pixels are removed to obtain a preprocessed pixel set V = {V(i), i∈I}, where I is the coordinate domain where the pixel set X is located;
[0017] S2, calculating the similarity w(i, j) between the neighborhood V'(i) where the pixel V(i) of the pixel set V is located and the neighborhood V'(j) where the related point V(j) in the search window of the pixel V(i) is located;
[0018] S3, calculating the denoised pixel u(i) according to the similarity w(i,j) to obtain a pixel set u of the denoised two-dimensional image signal,
[0019] u(i)=∑ j∈Ω(i) w(i,j)V(j),
[0020] Wherein, Ω(i) represents the set of related pixels in the search window of the pixel V(i);
[0021] The search radius is D s , the neighborhood radius is d s .
[0022] From the above description, we can know that the data is first preprocessed, and the pixels in the search window are judged as irrelevant points according to the correlation between the pixels, and the irrelevant points are removed; then the noise reduction operation based on similarity is completed on the preprocessed data. In this way, the amount of data involved in the operation can be reduced, and local over-smoothing can be suppressed while noise reduction, and the structural information of the image itself can be maintained.
[0023] Furthermore, the step S1 includes the following steps:
[0024] S11, the pixel set X={x k |x k =f(v i ,z i ),k=1,2,…,mn}, where v 1 ,v 2 ,…,v m is the column variable, z 1 ,z 2 ,…,z n is a row variable, the pixel x of the pixel set k The set of pixels within the search window is Calculate the pixel set Y k The median A kand the pixel set Y k The volatility of B k ;
[0025] S12, calculating the pixel set Y k The median absolute deviation (MAD) k ,
[0026] MAD k =c·median(B k ),
[0027] Where c is the weighting coefficient;
[0028] S13, determine the pixel set Y k The pixel y kr Whether it is the irrelevant pixel,
[0029]
[0030] Where ρ is the threshold, P kr =1 indicates that the pixel y kr is the pixel x k irrelevant pixels, and vice versa;
[0031] S14, the pixel set Y k The irrelevant pixels in are removed to obtain the pixel x k The set of relevant pixels within the search window Among them, D s1 is the new search radius after removing irrelevant pixels;
[0032] S15, the related pixel set Y′ k Combined into the preprocessed pixel set V.
[0033] From the above description, it can be seen that the present invention utilizes the correlation and redundant information in the image itself, selects the neighborhood of the pixel as a unit, and searches for units similar to the unit in the search window. The purpose of the pixel correlation measurement is to find and remove irrelevant points in the search window to reduce the amount of data involved in the calculation.
[0034] Furthermore, the step S2 comprises the following steps:
[0035] S21, calculating the Euclidean distance between the neighborhood V'(i) and the neighborhood V'(j) Among them, G a is the Gaussian kernel function;
[0036] S22, calculating the similarity w(i, j) according to the Euclidean distance d(i, j),
[0037]
[0038]
[0039] Among them, z(i) is the normalization constant and h is the smoothing coefficient.
[0040] From the above description, it can be seen that the similarity is measured by the Euclidean distance between the neighborhood of the target pixel and the neighborhood of its related points in the search window. By calculating the Euclidean distance between pixels in similar units and using weighted average processing, the noise reduction of the target pixel is achieved.
[0041] Furthermore, the step S21 further includes: constructing an integral matrix Among them, K Δ (z)=||V'(i)-V'(j)|| 2 ,Δ∈[-D s1 ,D s1 ] 2 , calculate the Euclidean distance d(i,j),
[0042]
[0043] From the above description, it can be seen that by constructing an integral matrix, calculating the square of the difference values of all data points and integrating them, it is possible to avoid repeatedly traversing pixels in the neighborhood and reduce the computational complexity.
[0044] Furthermore, the step S21 further includes: using the integral matrix K Δ (i) integral symmetry, calculate the Euclidean distance d(i,j),
[0045]
[0046] in,
[0047] From the above description, we can see that using K Δ The integral symmetry of (i) can avoid constructing K -Δ (i), thus reducing the amount of computation by half.
[0048] Furthermore, the method further comprises step S4: optimizing the search radius D s1 , the smoothing coefficient h and the neighborhood radius d s At least one parameter in the optimization step, and executing S2 and S3 according to the optimized parameter to obtain a signal-to-noise ratio SNR after noise reduction, wherein the optimization criterion of the parameter is to maximize the signal-to-noise ratio SNR.
[0049] From the above description, it can be seen that the denoising effect is affected by the search radius, neighborhood radius and smoothing coefficient. The denoising effect can be improved by optimizing these three parameters.
[0050] Furthermore, the step S4 also includes fixing the search radius D s1 , the smoothing coefficient h and the neighborhood radius d s As the optimized parameters, step S4 includes the following steps:
[0051] S41, set the population size N and the number of iterations E, and randomly generate the parameters h and d s The range of x a,b (t) is the position of the ath individual in the population in the bth dimension before the tth iteration, a=1,2,...N,b=1,2,t=1,2,...E;
[0052] S42, taking the negative value of the signal-to-noise ratio SNR as a fitness value, and finding the minimum value of the fitness, wherein the signal-to-noise ratio SNR is defined as follows:
[0053]
[0054] S43, performing iterative optimization, updating the value of the parameter, and updating the historical minimum value of the fitness;
[0055] S44. If the iteration termination condition is met, the iteration is terminated and the optimized value of the parameter is output.
[0056] It can be seen from the above description that after weighing the algorithm efficiency and optimization time, the present invention selects a fixed search radius and utilizes the optimization characteristics of the optimization algorithm to optimize the smoothing coefficient and the neighborhood radius to improve the noise reduction effect.
[0057] Furthermore, the step S43 further includes: setting a migration frequency Q, and updating the parameter according to the following different behaviors:
[0058] (1) Optimization behavior: t / Q has a remainder, and a random number between (0, 1) that follows a uniform distribution is generated. When the random number is less than the probability P, the following formula is used for update:
[0059] x a,b (t+1)=x a,b (t)+(p a,b -x a,b (t))·rand(0,1)·C·(g b -x a,b (t))·S·rand(0,1),
[0060] Among them, x a,b (t+1) is the position of the ath individual in the population in the bth dimension after the update, p a,b is the best position of the ath individual in the population before updating, gb is the optimal position of the population before updating, C and S are two constants;
[0061] (2) Warning behavior: When t / Q has a remainder, when the random number is greater than or equal to the probability P, the following formula is used for updating:
[0062] x a,b (t+1)=x a,b (t)·A 1 ·(mean b -x a,b (t))·rand(0,1)+A 2 ·(p a,b -x a,b (t))·rand(-1,1),
[0063]
[0064]
[0065] Among them, mean b is the average position of all individuals in the population, A 1 and A 2 They are external indirect factors and direct interference factors, α 1 and α 2 is a constant, pFit a represents the historical minimum value of the fitness of the ath individual in the population, k is a random integer between [1, N], and k≠a, sumFit represents the sum of the fitness values of all individuals in the population, and ε is the minimum constant in the computer to avoid the zero divider problem;
[0066] (3) Migration behavior: t / Q has no remainder and is updated using the following formula:
[0067] x a,b (t+1)=x a,b (t)+randn(0,1)·x a,b (t).
[0068] From the above description, it can be seen that updating parameters according to different behaviors can improve the population diversity and optimization accuracy of the algorithm.
[0069] The present invention also provides an image noise reduction system, comprising:
[0070] A preprocessing module is used to preprocess a pixel set X of a two-dimensional image signal, using pixels x of the pixel set X k The correlation between them is judged and irrelevant pixels are removed to obtain a preprocessed pixel set V = {V(i), i∈I}, where I is the coordinate domain where the pixel set X is located;
[0071] A similarity calculation module, used to calculate the similarity w(i, j) between the neighborhood V'(i) where the pixel V(i) of the pixel set V is located and the neighborhood V'(j) where the related point V(j) in the search window of the pixel V(i) is located;
[0072] A denoising module is used to calculate the denoised pixel u(i) according to the similarity w(i,j) to obtain a pixel set u of the denoised two-dimensional image signal.
[0073] u(i)=∑ j∈Ω(i) w(i,j)V(j),
[0074] Wherein, Ω(i) represents the set of related pixels in the search window of the pixel V(i);
[0075] The search radius is D s , the neighborhood radius is d s .
[0076] The present invention also provides an image noise reduction storage medium, the storage medium includes a stored program, wherein the above method is executed when the program is run.
[0077] The above-mentioned image noise reduction method, device and storage medium are described through the following specific embodiments:
[0078] Embodiment 1
[0079] In a first aspect, an image denoising method is provided. The method described in this embodiment utilizes inter-pixel redundant features to improve the signal-to-noise ratio of a two-dimensional image, and is used in measurement applications based on image processing technology.
[0080] The method described in this embodiment mainly includes two contents:
[0081] 1) Data preprocessing: Based on the local statistical characteristics of pixels, the correlation between pixels is calculated, and irrelevant points are identified and removed to reduce the amount of data to be processed;
[0082] 2) The denoising process based on similarity calculation integrates integral acceleration and key parameter optimization to improve algorithm efficiency while removing noise and suppressing local over-smoothing.
[0083] Please refer to the attached Figure 1 The method described in this embodiment includes the following steps:
[0084] S1. Preprocess the pixel set X of the two-dimensional image signal, and use the pixel x of the pixel set X k The correlation between them is judged and irrelevant pixels are removed to obtain the preprocessed pixel set V.
[0085] The pixel matrix of a two-dimensional image signal is represented as:
[0086]
[0087] In the above formula, v 1 ,v 2 ,…,v m is the column variable, z 1 ,z 2 ,…,z n is a row variable. It is transformed into a pixel set X = {x k |x k =f(v i ,z i ),k=1,2,…,mn}.
[0088] The method described in this embodiment utilizes the correlation and redundant information in the image itself, selects the neighborhood where the pixel is located as a unit, and searches for units similar to the unit in the search window. Set the search window and the neighborhood window, and their radii are D s and d s If we traverse the neighborhood windows of all pixels in the search window and calculate the similarity, the amount of calculation will be huge. In order to improve the efficiency of the operation, the data is preprocessed and pixel correlation measurement is performed. Irrelevant points refer to pixels that are irrelevant to the central pixel and do not affect the local features of the central pixel neighborhood. The purpose of pixel correlation measurement is to find and remove irrelevant points in the search window to reduce the amount of data involved in the operation.
[0089] For a pixel x in the image set k , calculate the correlation of pixels in the search window centered at this point. k The center is D, and the search radius is s Construct a search window, and the pixel set within the search window is Calculate pixel y kr With x k of relevance.
[0090] First calculate the median A of the pixels in the search window k =median(Y k ) and volatility B k =abs(Y k -A k ), and use this to derive the median absolute deviation (MAD) of the pixel k ,
[0091] MAD k =c·median(B k ).
[0092] In the above formula, the weighting coefficient c represents a parameter related to the statistical characteristics of pixels, and its value is the weighted value of the fluctuation degree within the search window. In this embodiment, it takes 1.428.
[0093] Then calculate each pixel y within the search window kr Deviation from A k And set a threshold ρ. The setting of the threshold ρ is related to the value of the median absolute deviation MAD k Of the pixels. Generally, ρ is 2. If it is higher than the threshold ρ, it means that this point is a relevant point of the central pixel x k And needs to be retained; if it is lower than the threshold ρ, it means that this point is an irrelevant point of x k .
[0094] Judge whether the pixel y kr Is an irrelevant point:
[0095]
[0096] If P kr =1, it means that y kr Is an irrelevant point of x k , otherwise it is not.
[0097] Remove the irrelevant pixels from the pixel set To obtain the relevant pixel set as D s1 Is the new search radius after removing the irrelevant points. Obviously
[0098] The method described in this embodiment constructs a search window with a radius of D s And a neighborhood window with a radius of d s . Then the side length of the search window D = 2D s +1, and the side length of the neighborhood window d = 2d s +1. If it is necessary to traverse all the neighborhood windows within the search window and calculate the similarity, then the calculation amount of the similarity between two neighborhood windows is d 2 =(2d s +1) 2 . And for each pixel point x k In the pixel set X, it is necessary to calculate D 2 =(2D s +1) 2 Times of similarity within the search window. The calculation complexity of each pixel point is Then the calculation complexity of the entire image is After the pixel correlation measurement, the search radius is reduced to D s1 . At this time, the calculation complexity is Lower than the calculation complexity before data preprocessing.
[0099] By using pixel correlation metric, x k The pixels to be traversed in the search window are divided into a set of related points and a set of irrelevant points. When calculating the similarity, only x k The similarity between the neighborhood where the point is located and the neighborhood where the related point is located can reduce the amount of data to be processed in the search window, improve the computing efficiency, and increase the running speed of the algorithm.
[0100] The preprocessed signal is represented as a pixel set V = {V(i), i∈I}, where I is the coordinate domain where the pixel set X is located.
[0101] V=u+nosie,
[0102] In the above formula, u represents the effective information contained in the signal, and noise represents the noise. V(i) and u(i) are the corresponding pixels before and after noise reduction.
[0103] S2. Calculate the Euclidean distance d(i, j) between the neighborhood V'(i) of the pixel set V and the neighborhood V'(j) of the related point V(j) in the search window of the pixel V(i).
[0104] The similarity w(i,j) is measured by the Euclidean distance d(i,j) between the neighborhood of pixel V(i) and the neighborhood of the related point V(j) in the search window of pixel V(i), centered at V(i).
[0105] The neighborhood of the central pixel V(i) is V'(i), and the neighborhood of the related point V(j) is V'(j), then d(i,j) can be expressed as:
[0106]
[0107] In the above formula, G a is the Gaussian kernel function.
[0108] If the calculation of d(i,j) requires traversing all pixels in the neighborhood window, calculating the square of the difference between each pair of pixels and summing them up, then for two certain neighborhoods, the amount of calculation required to obtain d(i,j) is d 2 =(2d s +1) 2 , the computational complexity is For each pixel V(i), it is necessary to calculate D within its search window 2 =(2D s1 +1) 2 times d(i,j), the computational complexity is And there are a lot of repeated calculations, and the running time is very slow.
[0109] To improve the computational efficiency, construct an integral matrix KΔ (i) Integrate the square of the difference of all pixels in the neighborhood,
[0110]
[0111] In the above formula, K Δ (z)=||V'(i)-V'(j)|| 2 ,Δ∈[-D s1 ,D s1 ] 2 , for a fixed offset Δ, when calculating d(i,j), the operation can be completed in constant time O(1),
[0112]
[0113] Therefore, the computational complexity for each pixel V(i) is reduced to
[0114]
[0115] Using K Δ The integral symmetry of (i) further reduces the computational complexity. Due to the symmetry of the data integral, we only need to calculate +Δ∈[0,D s1 ] 2 Part of the data.
[0116] According to this K -Δ The value of (i) can be expressed as K +Δ The symmetric value of (i) can avoid constructing K in the calculation. -Δ (i), thus reducing the amount of computation by half,
[0117]
[0118] At this time, the computational complexity of each pixel V(i) is reduced to
[0119] S3. Calculate the similarity w(i, j) based on the Euclidean distance d(i, j).
[0120]
[0121]
[0122] In the above formula, z(i) is the normalization constant and h is the smoothing coefficient.
[0123] S4. Calculate the denoised pixel u(i) according to the similarity w(i,j) to obtain a pixel set u of the denoised two-dimensional image signal.
[0124] For each pixel u(i) in u, its value is obtained by non-local weighted averaging of the corresponding V(i). Traverse the similarity w(i,j) between the neighborhood of V(i) and the neighborhood of all related points V(j).
[0125] u(i)=∑ j∈Ω(i) w(i,j)V(j),
[0126] In the above formula, Ω(i) represents the set of all relevant points in the search window of pixel V(i).
[0127] Perform steps S2-S4 on each pixel V(i) in V to obtain a noise-reduced signal u.
[0128] For an image with mn pixels, the computational complexity of the denoising process is reduced by the integral acceleration. Reduced to
[0129] In this embodiment, the noise reduction effect of the noise reduction process is affected by the search radius D s1 , neighborhood radius d s and the influence of the smoothing coefficient h. Among them, the larger the search radius, the better the noise reduction effect, but too large a search radius will reduce the operation efficiency; too large a neighborhood radius will reduce the number of similar structures and weaken the noise reduction ability, while too small a neighborhood radius will make the structural characteristics of the pixel unclear; the smoothing coefficient h directly determines the final noise reduction effect of the signal. Too large a neighborhood radius will make the signal too smooth, while too small a neighborhood radius will not be enough to remove the noise. Therefore, based on the considerations of noise reduction effect and operation efficiency, it is very important to adaptively select appropriate filtering parameters according to the characteristics of the signal. In this embodiment, the algorithm efficiency and optimization time are weighed. The method described in this embodiment selects a fixed search radius, and uses the optimization characteristics of the optimization algorithm to optimize the smoothing coefficient and the neighborhood radius to improve the noise reduction effect. The optimization goal is to maximize the signal-to-noise ratio SNR after noise reduction.
[0130] The specific steps of optimization are as follows:
[0131] Step 1: Initialize the parameters, set the population size N, the number of iterations E and the migration frequency Q, and construct a vector with dimension b of 2 (the dimension is the number of parameters to be optimized), and randomly generate parameters h and d. s The range of the individual initial position, x a,b (t) is the position of the ath individual in the population in the bth dimension before the tth iteration, a=1,2,...N,b=1,2,t=1,2,...E.
[0132] Step 2: Calculate the initial value of fitness. Take the negative value of the signal-to-noise ratio (SNR) after noise reduction as the fitness value, and find the minimum value of fitness, that is, the maximum value of SNR. SNR is defined as follows:
[0133]
[0134] Step 3: Perform iterative optimization, update parameter values, and update the historical minimum value of fitness.
[0135] Update said parameters according to different behaviors:
[0136] (1) Optimization behavior: When t / Q has a remainder, each individual can switch between optimization and alert behavior at will. When optimizing, the individual records the best position it has passed through in real time based on individual and group experience, and records the best position of the population. Based on this rule, a random strategy can be formulated: generate a random number between (0, 1) that follows a uniform distribution. When the random number is less than the probability P, use the following update formula:
[0137] x a,b (t+1)=x a,b (t)+(p a,b -x a,b (t))·rand(0,1)·C·(g b -x a,b (t))·S·rand(0,1),
[0138] Among them, x a,b (t+1) is the position of the ath individual in the population in the bth dimension after the update, p a,b is the best position of the ath individual in the population before updating, g b is the optimal position of the population before updating, C and S are two constants;
[0139] (2) Alert behavior: When on alert, each individual moves closer to the center of the population, while competing with other individuals, so it cannot move directly to the center of the population. When the random number is greater than or equal to the probability P, the following update is used:
[0140] x a,b (t+1)=x a,b (t)·A 1 ·(mean b -x a,b (t))·rand(0,1)+A 2 ·(p a,b -x a,b (t))·rand(-1,1),
[0141]
[0142]
[0143] Among them, mean bis the average position of all individuals in the population, A 1 and A 2 They are external indirect factors and direct interference factors, α 1 and α 2 is a constant, pFit a represents the historical minimum value of the fitness of the ath individual in the population, k is a random integer between [1, N], and k≠a, sumFit represents the sum of the fitness values of all individuals in the population, and ε is the minimum constant in the computer to avoid the zero divider problem;
[0144] (3) Migration behavior: In order to improve the survival ability of the population, the population needs to migrate to another area regularly to re-optimize and be alert. When t / Q has no remainder, the population migrates. During the migration process, the position of each individual is updated using the following formula:
[0145] x a,b (t+1)=x a,b (t)+randn(0,1)·x a,b (t).
[0146] Step 4: If the iteration termination condition is met, the iteration ends and the parameters h and d are output. s Otherwise, return to step 3 to continue the iteration.
[0147] Using optimized parameters to reduce the noise of preprocessed data can improve computational efficiency while removing noise and maintaining signal detail characteristics.
[0148] The present invention provides an optimized and efficient denoising method for noisy two-dimensional images with a large amount of redundancy and similar features between pixels. This method belongs to the spatial domain denoising method, which directly processes all the pixels in the two-dimensional image space, suppresses local over-smoothing and maintains the structural information of the image itself while denoising.
[0149] The present invention has the following advantages:
[0150] 1. Through pixel correlation measurement, irrelevant points are identified and removed to reduce the amount of data involved in the calculation and improve calculation efficiency;
[0151] 2. Construct an acceleration matrix during the similarity calculation process to reduce the computational complexity while effectively suppressing local over-smoothing and maintaining the structural information of the image itself;
[0152] 3. Optimize the noise reduction algorithm parameters to improve the noise reduction performance and adaptability.
[0153] In a second aspect, an image noise reduction system includes:
[0154] The preprocessing module is used to preprocess the pixel set X of the two-dimensional image signal, using the pixel x of the pixel set X k The correlation between them is judged and irrelevant pixels are removed to obtain the preprocessed pixel set V = {V(i), i∈I}, where I is the coordinate domain where the pixel set X is located.
[0155] In pixels x k The center is D, and the search radius is s Construct a search window, find out irrelevant points within the search window and remove them, and reduce the amount of data involved in the calculation.
[0156] The similarity calculation module is used to calculate the similarity w(i, j) between the neighborhood V'(i) of the pixel set V and the neighborhood V'(j) of the related point V(j) in the search window of the pixel V(i).
[0157] The similarity is measured by the Euclidean distance between the neighborhood of the target pixel and the neighborhood of its related points in the search window. During the calculation process, an integral matrix K is constructed Δ (i) Calculate the square of the difference of all data points and integrate them to avoid repeated traversal of pixels in the neighborhood and improve computational efficiency.
[0158] The denoising module is used to calculate the denoised pixel u(i) according to the similarity w(i,j) to obtain the pixel set u of the denoised two-dimensional image signal.
[0159] u(i)=∑ j∈Ω(i) w(i,j)V(j),
[0160] Where Ω(i) represents the set of non-irrelevant pixels within the search window of pixel u(i).
[0161] For each pixel u(i) in u, its value is obtained by taking the non-local weighted average of the corresponding V(i).
[0162] Parameter optimization module, used to optimize the search radius D s1 , smoothing coefficient h and neighborhood radius d s At least one of the optimization objectives is to maximize the signal-to-noise ratio (SNR) after noise reduction.
[0163] The method described in this embodiment selects a fixed search radius D s1 , using the optimization algorithm's optimization characteristics to optimize the smoothing coefficient h and neighborhood radius d s , to improve the noise reduction effect.
[0164] In a third aspect, an image noise reduction storage medium includes a stored program, wherein the program executes the above method when running.
[0165] The above descriptions are merely embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent transformations made using the contents of the present invention's specification and drawings, or directly or indirectly applied in related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A method for image denoising, It is characterized in that The following steps are involved: S1. Pixel set of two-dimensional image signal Preprocessing is performed using the pixel set Pixels Determine the correlation between them and remove irrelevant pixels to obtain the preprocessed pixel set , For the pixel set The coordinate domain in which it is located; The step S1 comprises the following steps: S11, the pixel set ,in, is the column variable, is a row variable, the pixels of the pixel set The set of pixels within the search window is , calculate the pixel set the median of and the pixel set The degree of volatility ; S12, calculating the pixel set The median absolute deviation , , in, is the weighting coefficient; S13, determining the pixel set Pixels Whether it is the irrelevant pixel, , in, is the threshold value, Indicates the pixel The pixel irrelevant pixels, and vice versa; S14, the pixel set The irrelevant pixels in are removed to obtain the pixels The set of relevant pixels within the search window ,in, is the new search radius after removing irrelevant pixels; S15, the relevant pixel set Combined into the preprocessed pixel set ; S2. Calculate the pixel set Pixels Neighborhood and the pixel Related points within the search window Neighborhood Similarity between ; The step S2 comprises the following steps: S21, calculating the neighborhood and the neighborhood The Euclidean distance between ,in, is the Gaussian kernel function; S22, according to the Euclidean distance Calculate the similarity , , , in, is the normalization constant, is the smoothing coefficient; S3, according to the similarity Calculate the denoised pixels , get the pixel set of the two-dimensional image signal after noise reduction , , in, Indicates the pixel The set of relevant pixels within the search window; The search radius is , the neighborhood radius is .
2. The image denoising method according to claim 1, Features: The step S21 also includes: constructing an integral matrix ,in, , , calculate the Euclidean distance , 。 3. The image denoising method according to claim 2, Features: The step S21 also includes: using the integral matrix The integral symmetry of , , in, .
4. The image denoising method according to claim 3, Features: Also includes step S4: optimizing the search radius , the smoothing coefficient and the neighborhood radius At least one parameter in the above embodiment, and performing S2 and S3 according to the optimized parameter to obtain a signal-to-noise ratio after noise reduction. The optimization criteria of the parameters is to make the signal-to-noise ratio Highest.
5. The image denoising method according to claim 4, Features: The step S4 also includes fixing the search radius , the smoothing coefficient and the neighborhood radius As the optimized parameters, step S4 includes the following steps: S41. Set the size of the population and the number of iterations , randomly generate the parameters and range, It is Before the iteration, the Individual in the The location of the dimension, ; S42, the signal-to-noise ratio Take the negative value as the fitness value, find the minimum value of the fitness, the signal-to-noise ratio The definition is as follows: ; S43, performing iterative optimization, updating the value of the parameter, and updating the historical minimum value of the fitness; S44. If the iteration termination condition is met, the iteration is terminated and the optimized value of the parameter is output.
6. The image denoising method according to claim 5, Features: The step S43 also includes: setting the migration frequency , updating said parameters according to the following different behaviors: (1) Optimization behavior: There is a remainder, generate a random number between (0, 1) that follows a uniform distribution, when the random number is less than the probability When , use the following update: , in, is the first Individual in the The location of the dimension, is the first The best position for each individual, is the optimal position of the population before the update, and are two constants; (2) Vigilance behavior: There is a remainder when the random number is greater than or equal to the probability When , use the following update: , , , in, is the mean position of all individuals in the population, and They are external indirect factors and direct interference factors. and is a constant, Indicates the population The historical minimum value of the fitness of each individual, yes A random integer between , represents the sum of the fitness values of all individuals in the population, is the smallest constant in a computer to avoid the zero divider problem; (3) Migration behavior: No remainder, update using the following formula: 。 7. An image noise reduction system, It is characterized in that include: Preprocessing module, used to process pixel sets of two-dimensional image signals Preprocessing is performed using the pixel set Pixels Determine the correlation between them and remove irrelevant pixels to obtain the preprocessed pixel set , For the pixel set The coordinate domain in which it is located; The implementation consists of the following steps: S11, the pixel set ,in, is the column variable, is a row variable, the pixels of the pixel set The set of pixels within the search window is , calculate the pixel set the median of and the pixel set The degree of volatility ; S12, calculating the pixel set The median absolute deviation , , in, is the weighting coefficient; S13, determining the pixel set Pixels Whether it is the irrelevant pixel, , in, is the threshold value, Indicates the pixel The pixel irrelevant pixels, and vice versa; S14, the pixel set The irrelevant pixels in are removed to obtain the pixels The set of relevant pixels within the search window ,in, is the new search radius after removing irrelevant pixels; S15, the relevant pixel set Combined into the preprocessed pixel set ; A similarity calculation module is used to calculate the pixel set Pixels Neighborhood and the pixel Related points within the search window Neighborhood The similarity between ; The implementation includes the following steps: S21, calculating the neighborhood and the neighborhood The Euclidean distance between ,in, is the Gaussian kernel function; S22, according to the Euclidean distance Calculate the similarity , , , in, is the normalization constant, is the smoothing coefficient; A noise reduction module is used to reduce the noise according to the similarity Calculate the denoised pixels , get the pixel set of the two-dimensional image signal after noise reduction , , in, Indicates the pixel The set of relevant pixels within the search window; The search radius is , the neighborhood radius is .
8. An image noise reduction storage medium, It is characterized in that The storage medium includes a stored program, wherein the program executes the method described in any one of claims 1 to 6 when executed.
Citation Information
Patent Citations
Nonlocal uniform digital image denoising method based on Mahalanobis distance
CN106296591A
Non-local mean value image de-noising method based on unsupervised learning
CN107909558A