A radiation image denoising algorithm based on median filter improvement
By setting thresholds and area thresholds to identify radiation noise points, and combining median filtering and neighborhood mean processing, the problem that traditional median filtering cannot identify radiation noise points is solved, effective noise reduction and detail protection are achieved under strong radiation fields, and image quality is improved.
Patent Information
- Application Number
- CN202211535382.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-02
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2042-12-02
AI Technical Summary
Traditional median filtering cannot accurately identify radiation noise, resulting in a decrease in image quality in the irradiation field and affecting subsequent processing.
By setting the threshold Dif that causes visual changes and the maximum radiation noise area threshold Smax, noise points are identified, and the median of the signal points or the mean of the neighborhood points in the filter window are used for noise reduction. The images processed with different Dif values are compared and selected to protect the details of the picture.
Accurately identify radiation noise points in strong radiation fields, achieve effective noise reduction, retain image details to the greatest extent, and improve image quality.
Smart Images

Figure CN116012267B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of image processing, and in particular relates to a radiation image denoising algorithm based on an improved median filter. Background Art
[0002] In an irradiated field, the image capture process of a CCD or CMOS image sensor is affected by radiation. The interaction between radiation and matter causes numerical anomalies in the affected areas of the sensor array, resulting in a large amount of noise in the image. This radiation noise severely degrades image quality and hinders subsequent image processing tasks. Therefore, noise reduction is particularly important for images exposed to strong radiation.
[0003] The noise in the irradiation field is mainly composed of salt and pepper noise and Gaussian noise. Traditional median filtering cannot accurately identify radiation noise. Therefore, the present invention has made a series of improvements to radiation noise. Summary of the Invention
[0004] In order to solve the defects of the existing technology, the purpose of the present invention is to provide a radiation image denoising algorithm based on an improved median filter, which can meet the needs of image denoising processing under strong radiation fields and improve the quality of images under strong radiation fields.
[0005] In order to achieve the above purpose, a technical solution adopted by the present invention is:
[0006] An improved radiometric image denoising algorithm based on median filtering includes the following steps:
[0007] S1. Set the threshold value Dif that causes visual changes and the maximum radiation noise area threshold Smax, and identify noise points by analyzing the pixel value and radiation noise area of the midpoint of the noise image;
[0008] S2. Establish a filtering window with a noise point as the center. If a signal point exists within the filtering window, perform noise reduction on the noise point using the median of the pixel values of all signal points within the filtering window; otherwise, perform noise reduction on the noise point using the mean of the four processed pixels in the neighborhood of the noise point.
[0009] S3. Change the threshold Dif that causes visual changes, repeat steps S1-S2, and obtain an image processed with the corresponding Dif. By comparing and selecting images processed with different Dif values, protection of picture details is achieved.
[0010] Furthermore, in the above-mentioned improved radiometric image denoising algorithm based on median filtering, step S1 is specifically as follows:
[0011] S101. A judgment window of a set size is established with a certain pixel point in the noise image as the center. If the maximum difference between the pixel value of the current point and the pixel value of its neighboring points is greater than or equal to the threshold value Dif that causes visual change, the current point is judged as a suspected noise point; otherwise, it is judged as a signal point. All points in the noise image are traversed to complete the judgment of all points. The judgment formula is:
[0012]
[0013] In formula (1): Y i,j Represents the pixel value at point (i, j) in the noise image; Y m,n Represents the pixel value of the neighborhood point within the judgment window; Dif represents the threshold value that causes visual changes; N i,j =1 means the current point is a suspected noise point, N i,j =0 means the current point is a signal point;
[0014] S102: For two connected suspected noise points A and B, if the absolute difference of their pixel values is less than the threshold value Dif that causes visual change, then A and B are considered as a whole and the coordinates of A and B are put into the set NK, that is:
[0015] abs(Y A -Y B ) <Dif,则A∈NK,B∈NK(2)
[0016] In formula (2): Y A and Y B are the pixel values of two connected suspected noise points A and B;
[0017] S103, setting the maximum radiation noise area threshold to Smax, if the total number K of suspected noise points in the set NK is ≤ Smax, then the suspected noise points in the set NK are determined to be noise points, otherwise the suspected noise points in the set NK are excluded, that is:
[0018]
[0019] In formula (3), K represents the total number of points in the set NK; M i,j =1 means the current point is a noise point, M i,j =0 indicates that the current point is a signal point.
[0020] Furthermore, in the above-mentioned improved radiometric image denoising algorithm based on median filtering, in step S101, if the current point is a signal point but its upper, lower, left, and right points are all suspected noise points, the current point is recorded as a suspected noise point.
[0021] Furthermore, in the above-mentioned improved radiation image denoising algorithm based on median filtering, the size of the determination window is set to 3×3 in step S101.
[0022] Furthermore, in the above-mentioned improved radiometric image denoising algorithm based on median filtering, step S2 is specifically as follows:
[0023] S201, establishing an initial filtering window with an order of r0 centered on a certain noise point, and setting the order of the maximum filtering window to rmax, where r0 < rmax;
[0024] S202, traversing all points within the initial filtering window, if there are signal points within the initial filtering window, placing all signal points into a set NS; otherwise, if the current filtering window is smaller than the maximum filtering window, gradually expanding the filtering window until there are signal points within the filtering window, and then placing all signal points within the expanded filtering window into the set NS;
[0025] S203: If the set NS is not empty, the pixel value of the current noise point is replaced by the median of the pixel values of all signal points in the set NS, that is, the pixel value F of the current noise point after filtering. i,j for:
[0026] F i,j =Median(NS)(4)
[0027] Furthermore, in the above-mentioned improved radiometric image denoising algorithm based on median filtering, the order of the initial filtering window in step S201 is r0=3.
[0028] Furthermore, in the above-mentioned improved radiometric image denoising algorithm based on median filtering, the step of gradually expanding the filter window in step S202 is specifically: the filter window is increased by 2 steps in each step.
[0029] Furthermore, in the above-mentioned radiometric image denoising algorithm improved by median filtering, if the order of the filter window has been expanded to the order of the maximum filter window in step S2, but no signal point is found, the average of the four processed pixels in its neighborhood is used as the output, that is:
[0030] F i,j =(F i-1,j-1 +F i-1,j +F i-1,j+1 +F i,j-1 ) / 4(5)
[0031] Furthermore, the above-mentioned radiometric image denoising algorithm improved based on median filtering further includes smoothing the image after step S203, specifically:
[0032] The pixel values in the 3×3 fixed window are weighted and summed to replace the central pixel value. The calculation formula is:
[0033]
[0034] Furthermore, in the above-mentioned improved radiometric image denoising algorithm based on median filtering, step S3 is specifically as follows:
[0035] The thresholds Dif that cause visual changes are set to 16, 32, and 48 respectively, and the final output results at each pixel position are:
[0036] F i,j =[(F16 i,j +F32 i,j +F48 i,j )-Max(F16 i,j ,F32 i,j ,F48 i,j )] / 2(7)
[0037] In formula (7): F16 i,j 、F32 i,j and F48 i,j The image processing results for each pixel position when Dif is 16, 32, and 48 respectively.
[0038] The improved radiometric image denoising algorithm based on median filtering described in the present invention has the following significant technical effects:
[0039] The present invention can accurately identify radiation noise in strong radiation fields, achieves excellent noise reduction effects, and preserves image details to the greatest extent. Through algorithmic processing, it can significantly improve the quality of images in strong radiation fields. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 This is a flow chart of a radiometric image denoising algorithm based on an improved median filter provided in an embodiment of the present invention;
[0041] Figure 2 for Figure 1 Flowchart of the method for noise identification in the algorithm;
[0042] Figure 3 for Figure 1 A flow chart of the noise reduction method in the algorithm;
[0043] Figure 4 Another flow chart of an improved radiometric image denoising algorithm based on median filtering provided in an embodiment of the present invention;
[0044] Figure 5 Detailed protection process flow diagram. DETAILED DESCRIPTION
[0045] The present invention will be further described below with reference to specific embodiments and the accompanying drawings.
[0046] Traditional median filtering cannot accurately identify radiation noise, but median filtering has a good smoothing effect on sudden noise. Based on the idea of median filtering algorithm, this paper proposes a radiation image denoising algorithm based on median filtering to improve the radiation noise in the image.
[0047] Figure 1 and Figure 4 This is a flowchart of a radiometric image denoising algorithm based on median filtering improvement provided in an embodiment of the present invention. The method includes the following steps:
[0048] S1. Set the threshold value Dif that causes visual changes and the maximum radiation noise area threshold Smax, and identify noise points by analyzing the pixel value and radiation noise area of the midpoint of the noise image.
[0049] By analyzing the radiation noise points, we know that: the pixel values of the noise points are significantly higher than the surrounding normal pixels; and the area of the radiation noise points (the number of pixels that make up the noise points) converges under different irradiation intensities, that is, the area of the radiation noise points mainly exists in a certain range. Therefore, this algorithm will identify the noise points based on visual perception. Taking an 8-bit plane image as an example, the visual change will not change when the pixel grayscale value does not exceed 16. Set a threshold Dif that can cause visual changes, and mark the pixels that cause this visual change as suspected noise points; set the maximum radiation noise area threshold to Smax. If the number of interconnected suspected noise points is ≤ Smax, the suspected noise points are judged to be noise points. Based on the above ideas, refer to Figure 2 As shown in Figure 2, the specific process of noise recognition is as follows:
[0050] S101. Establish a judgment window of a set size with a certain pixel point in the noise image as the center. If the maximum value of the difference between the pixel value of the current point and the pixel value of its neighboring points is ≥ the threshold Dif that causes visual changes, then the current point is judged as a suspected noise point, otherwise it is judged as a signal point; traverse all points in the noise image and complete the judgment of all points.
[0051] Use Y i,j Represents the pixel value at point (i, j) in the noise image, Y m,n Represents the pixel value of the neighboring point within the decision window. In this embodiment, the size of the decision window is 3×3. The maximum difference between the current point pixel value and its neighboring point pixel value is compared with the threshold value Dif that causes visual change. The point (i, j) is marked according to the comparison result. The marking method is:
[0052]
[0053] Where: N i,j =1 means the current point is a suspected noise point, N i,j =0 indicates that the current point is a signal point.
[0054] If the current point is a signal point, but the points above, below, left, and right of it are all suspected noise points, the current point is also recorded as a suspected noise point.
[0055] S102: For two connected suspected noise points A and B, if the absolute difference of their pixel values is less than the threshold value Dif that causes visual change, then A and B are considered as a whole and the coordinates of A and B are put into the set NK, that is:
[0056] abs(Y A -Y B ) <Dif,则A∈NK,B∈NK(2)
[0057] In formula (2): Y A and Y B They are the pixel values of two connected suspected noise points A and B.
[0058] S103, setting the maximum radiation noise area threshold to Smax, if the total number of suspected noise points K in the set NK is ≤ Smax, then the suspected noise points in the set NK are determined to be noise points, otherwise the suspected noise points in the set NK are excluded, that is:
[0059]
[0060] In formula (3), K represents the total number of points in the set NK; M i,j =1 means the current point is a noise point, M i,j =0 indicates that the current point is a signal point.
[0061] S2. Establish a filtering window with a certain noise point as the center. If there is a signal point in the filtering window, use the median of the pixel values of all signal points in the filtering window to perform noise reduction on the noise point; otherwise, use the mean of the four processed pixel points in the neighborhood of the noise point to perform noise reduction on the noise point.
[0062] For the processing of noise, the algorithm proposed in this paper is adjusted based on the median filter and adopts the form of row filtering. Figure 3 As shown in Figure 2, the specific process of noise reduction is as follows:
[0063] S201. Establish an initial filtering window with an order of r0 centered on a certain noise point, and set the order of the maximum filtering window to rmax, where r0 < rmax.
[0064] In this embodiment, the order of the initial filtering window r0=3.
[0065] S202. Traverse all points in the initial filter window. If there are signal points in the initial filter window, put all signal points into the set NS; otherwise, under the condition that the current filter window is smaller than the maximum filter window, gradually expand the filter window until there are signal points in the filter window, and then put all signal points in the expanded filter window into the set NS.
[0066] In this embodiment, the order of the filter window needs to be an odd number, so the order increases by 2 each time the filter window is expanded.
[0067] S203. If the set NS is not empty, the pixel value of the current noise point is replaced by the median of the pixel values of all signal points in the set NS, that is, the pixel value F of the current noise point after filtering. i,j for:
[0068] F i,j =Median(NS) (4)
[0069] If the filter window has been expanded to or exceeds the set maximum filter window, but no signal point is found within the filter window, the average of the four processed pixels in its neighborhood is used as the output, that is:
[0070] F i,j =(F i-1,j-1 +F i-1,j +F i-1,j+1 +F i,j-1 ) / 4 (5)
[0071] Considering that some pixels that are less affected by radiation will not show obvious visual differences, but will destroy the original smoothing effect, the present invention also adds smoothing processing to the filtered image, and replaces the center pixel value with the weighted sum of the pixel values in the 3×3 fixed window, that is:
[0072]
[0073] S3. Change the threshold Dif that causes visual changes, repeat steps S1-S2, and obtain an image processed with the corresponding Dif. By comparing and selecting images processed with different Dif values, the protection of picture details is achieved.
[0074] The algorithm described in this paper draws on the concept of image fusion to preserve detail. By setting different thresholds (Dif) for visual change, it is found that the noise areas after processing vary significantly. Therefore, by comparing and selecting images processed with different Dif values, the maximum possible preservation of image detail is achieved.
[0075] In a specific embodiment of the present invention, Figure 5As shown in the figure, the threshold values Dif that cause visual changes are set to 16, 32, and 48 respectively. F16, F32, and F48 are the processing results when Dif is 16, 32, and 48 respectively. The final output result of each pixel position is:
[0076] F i,j =[(F16 i,j +F32 i,j +F48 i,j )-Max(F16 i,j ,F32 i,j ,F48 i,j )] / 2 (7)
[0077] This paper presents a radiometric image denoising algorithm based on an improved median filter. It can accurately identify radiation noise points in strong radiation fields, achieve excellent noise reduction results, and preserve image details to the greatest extent possible. Through algorithmic processing, it can significantly improve the quality of images in strong radiation fields.
[0078] The above embodiments are merely illustrative of the present invention, and the present invention may also be implemented in other specific ways or in other specific forms without departing from the gist or essential characteristics of the present invention. Therefore, the described embodiments are to be considered in all respects as illustrative and not restrictive. The scope of the present invention is to be determined by the appended claims, and any variations equivalent to the intent and scope of the claims are intended to be within the scope of the present invention.
Claims
1. A radiometric image denoising algorithm based on an improved median filter, comprising the following steps: S1. Set the threshold value Dif that causes visual changes and the maximum radiation noise area threshold Smax, and identify noise points by analyzing the pixel value and radiation noise area of the midpoint of the noise image; S2. Establish a filtering window with a noise point as the center. If a signal point exists within the filtering window, perform noise reduction on the noise point using the median of the pixel values of all signal points within the filtering window; otherwise, perform noise reduction on the noise point using the mean of the four processed pixels in the neighborhood of the noise point. S3, changing the threshold Dif causing visual changes, repeating steps S1-S2, obtaining an image processed with the corresponding Dif, and protecting the details of the image by comparing and selecting images processed with different Difs; Step S1 is specifically as follows: S101. A judgment window of a set size is established with a certain pixel point in the noise image as the center. If the maximum difference between the pixel value of the current point and the pixel value of its neighboring points is greater than or equal to the threshold value Dif that causes visual change, the current point is judged as a suspected noise point; otherwise, it is judged as a signal point. All points in the noise image are traversed to complete the judgment of all points. The judgment formula is: In formula (1): Y i,j Represents the pixel value at point (i, j) in the noise image; Y m,n Represents the pixel value of the neighborhood point within the judgment window; Dif represents the threshold value that causes visual changes; N i,j =1 means the current point is a suspected noise point, N i,j =0 means the current point is a signal point; S102: For two connected suspected noise points A and B, if the absolute difference of their pixel values is less than the threshold value Dif that causes visual change, then A and B are considered as a whole and the coordinates of A and B are put into the set NK, that is: abs(Y A -Y B ) < Dif, then A ∈ NK, B ∈ NK (2) In formula (2): Y A and Y B are the pixel values of two connected suspected noise points A and B; S103, setting the maximum radiation noise area threshold to Smax, if the total number K of suspected noise points in the set NK is ≤ Smax, then the suspected noise points in the set NK are determined to be noise points, otherwise the suspected noise points in the set NK are excluded, that is: In formula (3), K represents the total number of points in the set NK; M i,j =1 means the current point is a noise point, M i,j =0 indicates that the current point is a signal point.
2. The improved radiometric image denoising algorithm based on median filtering according to claim 1 is characterized in that: In step S101 , if the current point is a signal point but the points above, below, left and right of it are all suspected noise points, the current point is recorded as a suspected noise point.
3. The improved radiometric image denoising algorithm based on median filtering according to claim 1 is characterized in that: In step S101 , the size of the determination window is set to 3×3.
4. The improved radiometric image denoising algorithm based on median filtering according to claim 1 is characterized in that: Step S2 is specifically as follows: S201, establishing an initial filtering window with an order of r0 centered on a certain noise point, and setting the order of the maximum filtering window to rmax, where r0 < rmax; S202, traversing all points within the initial filtering window, if there are signal points within the initial filtering window, placing all signal points into a set NS; otherwise, if the current filtering window is smaller than the maximum filtering window, gradually expanding the filtering window until there are signal points within the filtering window, and then placing all signal points within the expanded filtering window into the set NS; S203: If the set NS is not empty, the pixel value of the current noise point is replaced by the median of the pixel values of all signal points in the set NS, that is, the pixel value F of the current noise point after filtering. i,j for: F i,j =Median(NS)(4)。 5. The improved radiometric image denoising algorithm based on median filtering according to claim 4 is characterized in that: In step S201 , the order of the initial filtering window is r0=3.
6. The improved radiometric image denoising algorithm based on median filtering according to claim 4 is characterized in that: The step of gradually expanding the filter window in step S202 specifically includes increasing the filter window by 2 steps in each step.
7. The improved radiometric image denoising algorithm based on median filtering according to claim 4 is characterized in that: In step S2, if the order of the filter window has been expanded to the order of the maximum filter window, but no signal point is found, the average of the four processed pixels in its neighborhood is used as the output, that is: F i,j =(F i-1,j-1 +F i-1,j +F i-1,j+1 +F i,j-1 ) / 4(5)。 8. The improved radiometric image denoising algorithm based on median filtering according to claim 4 is characterized in that: After step S203, the image is smoothed, specifically: The pixel values in the 3×3 fixed window are weighted and summed to replace the central pixel value. The calculation formula is:
9. The improved radiometric image denoising algorithm based on median filtering according to claim 1, characterized in that: Step S3 is specifically as follows: The thresholds Dif that cause visual changes are set to 16, 32, and 48 respectively, and the final output results at each pixel position are: F i,j =[(F16 i,j +F32 i,j +F48 i,j )-Max(F16 i,j ,F32 i,j ,F48 i,j )] / 2 (7) In formula (7): F16 i,j 、F32 i,j and F48 i,j The image processing results for each pixel position when Dif is 16, 32, and 48 respectively.