X-ray Image Enhancement Based on Nonsubsampled Shearlet Transform and Gradient Domain Guided Filtering

In this paper, we propose an image enhancement algorithm combining non-subsampled shearlet transform and gradient-domain guided filtering to address the problems of low resolution, noise amplification, missing details, and weak edge gradient retention in the X-ray image enhancement process. First, we decompose histogram equalization and nonsubsampled shearlet transform to the original image. We get a low-frequency sub-band and several high-frequency sub-bands. Adaptive gamma correction with weighting distribution is used for the low-frequency sub-band to highlight image contour information and improve the overall contrast of the image. The gradient-domain guided filtering is conducted for the high-frequency sub-bands to suppress image noise and highlight detail and edge information. Finally, we reconstruct all the effectively processed sub-bands by the inverse non-subsampled shearlet transform and obtain the final enhanced image. The experimental results show that the proposed algorithm has good results in X-ray image enhancement, and its objective index also has evident advantages over some classical algorithms.


Introduction
X-ray image has become widely employed in medical diagnosis, security inspection, aerospace, defect detection, machinery manufacture, and other industries since the development of photoelectric detecting technology and image analysis technology. The radiographic inspection system's detecting principle, the image of the hardware equipment, and the picture created by the X-ray instrument all suffer from low dynamic range, low definition, low contrast, and excessive noise. Defect detection and image analysis are performed directly on the collected image. It causes significant inaccuracy in the detection results. As a result, it is beneficial to use image enhancement algorithms to analyze X-ray images [1,2], increase image quality and visual effects, and make subsequent detection easier.
Spatial domain pixel enhancement and transform domain multi-scale coefficient improvement enhancement methods are the most common image enhancement algorithms. The spatial domain improvement is to improve the image by directly processing the pixels, such as histogram equalization [3][4][5], image sharpening and grayscale stretching [6][7][8], and retinex theory [9]. Zeng et al. [10] proposed a gray-level information histogram for X-ray image contrast enhancement, which improves the performance of many histogram-based enhancement techniques dramatically. However, when the image is enhanced, there will be an over-enhancement phenomenon that will cause the image to be distorted. Panetta et al. [11] introduced nonlinear unsharp masking for mammogram enhancement. This method has good performance for enhancing the fine details in the original images. However, it also amplifies noise and overshoots the sharp details at the same time. Tao et al. [12] introduced a retinex-based framework for medical X-ray image enhancement. The framework can increase the contrast, eliminate the noise, and enhance the details, but the contour edges of the image are affected by the dark area pixels in the original image, showing shadows that did not exist at all.
The enhancement based on the transform domain first transforms the original image into the frequency domain for multi-scale decomposition, amplifies or filters the decomposed sub-image, and then inversely transforms the image. The wavelet transform [13], ridgelet transform [14], curvelet transform [15], wedgelet transform [16], contourlet transform [17], nonsubsampled contourlet transform(NSCT) [18,19], shearlet transform [20,21], nonsubsampled shearlet transform (NSST) [22], and other transformations are commonly used. Tang et al. [23] proposed an algorithm based on a multiscale measure in the wavelet domain for screening mammograms to enhance the details at different scales. However, the wavelet transform can only capture information in three directions: horizontal, vertical, and diagonal, which is poor in representing anisotropic singular features in images. Ostojié et al. [24] proposed an intensity adaptive nonlinear multiscale detail and contrast enhancement algorithm for digital radiography. The method adapts to the local exposure level and thus reduces the artifacts' saliency, but the adaptation of detail enhancement to image pixel intensity needs to be strengthened. Zhou et al. [25] introduced a medical image enhancement method based on improved gamma correction in the shearlet domain, which makes the texture details of the image more prominent and the overall contrast is significantly improved. Nevertheless, since this method does not have translation invariance, the image will produce a pseudo-Gibbs phenomenon.
Because of the unconstrained shearing directions, images after NSST may achieve optimal sparse representation and nonlinear error approximation. There have been many achievements in applying the NSST to image enhancement. Zhang et al. [26] employed NSST and tetrolet transform to remote sensing images, effectively retaining the details and edges of the image and significantly improving the information entropy and mean; Li et al. [27] studied the NSST domain to improve blur. The contrast enhancement algorithm uses the remote sensing image enhancement coefficient as an adjustable pattern recognition task, effectively removing the pseudo-Gibbs phenomenon from the image during the enhancement process. Tong et al. [28] proposed a visual sensor image enhancement algorithm using NSST and phase stretching transformation. In this method, the author uses nonlinear models with different thresholds to process the different scale parts after NSST decomposition. The algorithm can suppress noise and effectively increase the contrast of the image. However, none of the above studies have analyzed the parameters and effects of the decomposition levels and shearing directions of NSST, and the parameter selection has a certain degree of randomness.
He et al. [29] proposed a linear edge-preserving guided image filtering algorithm. The filtered image can avoid a blurring effect on detailed information. Li et al. [30] introduced a weighted guided image filter by incorporating an edge-aware weighting into an existing guided image filter to address the problem of abiding by halo artifacts. Kou et al. [31] proposed gradient-domain guided filtering to reduce the effect of image edge smoothing and introduced first-order edge-aware constraints to processing images, which can better preserve image edges. However, using intensity domain constraints for edges and details can over-smooth edges and reduce edge retention.
To address the above issues, we propose an image enhancement method. It is based on NSST and gradient-domain guided filtering and applies it to X-ray images. The algorithm combines the advantages of NSST for sparse image representation with gradient-domain guided filtering for image detail enhancement. The low-frequency sub-band uses adaptive gamma correction with a weighted distribution to enhance contrast, highlighting tiny details in the background. The high-frequency sub-bands use gradient-domain guided filtering to filter out image noise and extract edge and texture information by analyzing the image quality of the four-levels direction decomposition under different scale decomposition levels, and the image quality of various direction decomposition sequences under the four-levels scale decomposition. We compare the running times of different decomposi-tions and obtain optimal NSST decomposition parameters. The enhancement experiments on medical and industrial X-ray images show that the proposed algorithm can enhance the image contrast, details, and texture information and obtain high-quality images for subsequent research and analysis.

Nonsubsampled Shearlet Transform
The nonsubsampled shearlet transform is extended based on the shearlet transform. The shearlet transform is an algorithm that combines synthetic dilated affine systems with multiscale analysis. It can decompose the image more sparsely and achieve optimal approximation. Its construction is simple and anisotropic, and in dimension n = 2, the affine systems with composite dilations are collections of the form: Among them, ψ ∈ L 2 (R 2 ) represents the basis function, A is a 2-dimensional invertible matrix of anisotropic expansion, which is related to scale transformation. B is a 2-dimensional shear invertible matrix, related to rotation or shear transformation, and |detB| = 1, j, l, k represents the scale parameter, shearing parameter, and translation parameter. If the system Λ AB (ψ) forms a Parseval frame (also called a tight frame) for L 2 (R 2 ), then ψ in the system is called a synthetic wavelet, and the following formula holds for all This synthetic wavelet is called a shear wave when a = 4, s = 1. As shown in Figure 1, the three-levels NSST decomposition structure diagram, in which the scale parameter j = 3 and the numbers of the shearing parameters of each level are set to [2][3][4] respectively, then the corresponding shearing directions of each level are [4,8,16].

Adaptive Gamma Correction with Weighted Distribution
Gamma correction can expand the bright part in the X-ray image to make the image contrast more obvious, and the simple form of the transform-based gamma correction is derived by

Adaptive Gamma Correction with Weighted Distribution
Gamma correction can expand the bright part in the X-ray image to make the image contrast more obvious, and the simple form of the transform-based gamma correction is derived by where v is the grayscale of the input image and v max is the maximum intensity of the input image, and γ is the varying adaptive parameter. Define the probability density function of each gray level in the image as pd f approximated by where n v is the number of pixels whose gray level is v, MN is the total number of image pixels, and its cumulative distribution function cd f is defined as The weighted distribution function is defined as Adjust the histogram of statistics with a weighted distribution function, where α is the adjustment parameter, pd f max is the maximum pd f of the statistical histogram, and pd f min is the minimum of the statistical histogram. Applying cd f (v) and pd f ω (v) to the normalized gamma function, the formula of adaptive gamma correction with weighting distribution (AGCWD) [32] is obtained as where with Since most of the pixels of the X-ray image are densely distributed in the low grayscale area, the AGCWD algorithm can gradually increase the low pixel intensity of the image based on the weight distribution function, smooth the fluctuation phenomenon, and thus reduce the excessive enhancement of the image by gamma correction.

Gradient Domain Guided Filtering
The output of any pixel in the filtered image can be expressed as the following linear model: Among them, ∧ Z(p) is the output image, G(p) is the guide image, Ω ς 1 (p ) is a local square window with the point p as the center and ς 1 as the radius in the guide image G(p), a p and b p are the constant term coefficients in the window Ω ς 1 (p ). To compute a p and b p , we define E(a p , b p ) (hereafter abbreviated as E) as the noise-dependent loss function within the window Ω ς 1 (p ) as follows: Among them, X(p) is the image to be filtered, λ is the regularization parameter to prevent a p from being too large, and ∧ Γ G(p ) is the edge perception weight, which is defined as follows: where σ G,1 (p ) and σ G,ς 1 (p ) represent the standard deviation within the window 3 × 3 and within the window (2ς + 1) × (2ς + 1), centered on the point p . ε defined as (0.001 × L) 2 , L is the dynamic range of the input image. γ p is the edge image factor, defined as follows: where µ χ,∝ is the mean of χ(p), and η is calculated as 4/(µ χ,∝ − min(χ(p))). It can be known from formula (15) that if the pixel p is in the smooth area of the image, the value of γ p is close to 0, and if it is at the edge of the image, the value of γ p is close to 1.
To minimize the noise of the filtered image, take the minimum value of E, and the linear regression is used to solve the formula (12) to obtain where is the dot product between the two matrices,µ G X,ς 1 (p ), µ G,ς 1 (p ) and µ X,ς 1 (p ) are the mean values of G X, G, and X. Bringing formulas (16) and (17) into formula (11), where − a p and − b p are the mean values of a p and b p in the window Ω ς 1 (p). Gradient-domain guided filtering preserves its detailed features while smoothing the image. To further enhance the edge and texture information of the image, the smoothed image is subtracted from the original image to obtain a different image, which is added to the smoothed image to obtain an enhanced one, and the specific formula is as follows where ξ is the scale coefficient of the differential gain effect of the image gradient-domain guided filtering.

Algorithm Implementation Steps
The flow of the enhancement algorithm is shown in Figure 2. The high-frequency subbands of the image contain noise, and as the decomposition scale increases, they become almost invisible. We use gradient-domain guided filtering to process the high-frequency sub-bands to reduce noise interference. The detailed information in the image can be well preserved. To display the high-frequency images more clearly, both the high-frequency subbands and the images enhanced by the gradient domain guided filtering have undergone a linear grayscale transformation. Step 1: Perform histogram equalization on the X-ray image, stretch the overall grayscale range of the image, and improve the image layering.
Step 2: Perform NSST scale decomposition on the image processed in Step 1 to obtain one low-frequency sub-band and multiple high-frequency sub-bands.
Step 3: Use adaptive gamma correction with weighted distribution to enhance the contrast of the low-frequency sub-band to highlight a small amount of detailed information in the background.
Step 4: Use gradient-domain guided filtering for the high-frequency sub-bands to filter out image noise and subtract the smoothed image from the original image to obtain a differential image, which was added to the smoothed image by scale coefficient ξ to perform image enhancement.
Step 5: Perform inverse NSST on the processed low-frequency sub-band and highfrequency sub-bands and output the final enhanced image.

Decomposition Levels Analysis of NSST
The key parameters of NSST decomposition are the decomposition levels and shearing directions of each level. To analyze the effect of decomposition levels on image quality, five X-ray images of different sizes and different grayscales were selected for the experiments. Experiments were performed on the 64-bit operating system of Windows 10 (Intel Core i7-8750H CPU2.20GHz), and the experimental tool was MATLAB R2016b. The scale decomposition levels are set to 1-5, respectively, the number of shearing parameter of each level is set to 4, and the corresponding shearing directions of each level are 16. The window radius of the gradient domain guided filtering ς is 16, the regularization parameter λ is 0.5, the scale coefficient ξ is 5, and the parameters of other experimental conditions are kept the same. Step 1: Perform histogram equalization on the X-ray image, stretch the overall grayscale range of the image, and improve the image layering.
Step 2: Perform NSST scale decomposition on the image processed in Step 1 to obtain one low-frequency sub-band and multiple high-frequency sub-bands.
Step 3: Use adaptive gamma correction with weighted distribution to enhance the contrast of the low-frequency sub-band to highlight a small amount of detailed information in the background.
Step 4: Use gradient-domain guided filtering for the high-frequency sub-bands to filter out image noise and subtract the smoothed image from the original image to obtain a differential image, which was added to the smoothed image by scale coefficient ξ to perform image enhancement.
Step 5: Perform inverse NSST on the processed low-frequency sub-band and highfrequency sub-bands and output the final enhanced image.

Decomposition Levels Analysis of NSST
The key parameters of NSST decomposition are the decomposition levels and shearing directions of each level. To analyze the effect of decomposition levels on image quality, five X-ray images of different sizes and different grayscales were selected for the experiments. Experiments were performed on the 64-bit operating system of Windows 10 (Intel Core i7-8750H CPU2.20GHz), and the experimental tool was MATLAB R2016b. The scale decomposition levels are set to 1-5, respectively, the number of shearing parameter of each level is set to 4, and the corresponding shearing directions of each level are 16. The window radius of the gradient domain guided filtering ς is 16, the regularization parameter λ is 0.5, the scale coefficient ξ is 5, and the parameters of other experimental conditions are kept the same.
Select two representative medical images for analysis: Image 1 with the size of 440 × 440 and image 2 with the size of 1024 × 1024. The enhanced X-ray images obtained under different decomposition levels are shown in Figures 3 and 4 where (a) is the original image, and (b-f) corresponds to the decomposition levels j equal to 1-5. When the number of scale decomposition levels is j, NSST decomposition requires 2j times of image and filter convolution; the running time of the algorithm gradually increases. Observing the image, the image contrast has been significantly improved after histogram equalization. When the decomposition scale j ≤ 3, with the increase of the NSST decomposition scale, the boundary and texture features of the image are gradually obvious, and the detailed information is enhanced. When 5 ≥ j > 3, the enhancement effect is further improved; the change is not significant. under different decomposition levels are shown in Figures 3 and 4 where (a) is the original image, and (b-f) corresponds to the decomposition levels j equal to 1-5. When the number of scale decomposition levels is j , NSST decomposition requires 2 j times of image and filter convolution; the running time of the algorithm gradually increases. Observing the image, the image contrast has been significantly improved after histogram equalization. When the decomposition scale 3 j ≤ ,with the increase of the NSST decomposition scale, the boundary and texture features of the image are gradually obvious, and the detailed information is enhanced. When 5 3 j ≥ > , the enhancement effect is further improved; the change is not significant.   The subjective evaluation of the enhancement effect purely from the visual aspect has a certain one-sidedness. Therefore, five indicators of average gradient (AG), information entropy (H), spatial frequency (SF), edge intensity (EI), and running time (RT) are selected to objectively analyze the enhancement effect.
The average gradient (AG) can reflect the sharpness of the image and is defined as: The subjective evaluation of the enhancement effect purely from the visual aspect has a certain one-sidedness. Therefore, five indicators of average gradient (AG), information entropy (H), spatial frequency (SF), edge intensity (EI), and running time (RT) are selected to objectively analyze the enhancement effect.
The average gradient (AG) can reflect the sharpness of the image and is defined as: The larger the average gradient of an image, the higher the image clarity. The information entropy (H) is an important indicator to measure the richness of image information and is defined as: where L refers to the number of gray levels, and P(l) represents the distribution probability of each gray level. The information entropy value indicates the average amount of information contained in the enhanced image. The larger the value, the richer the information contained in the enhanced image. Spatial frequency (SF) can reflect the overall activity of an image in the spatial domain. The higher the spatial frequency, the better the quality of the enhanced image. Its formula is defined as follows: Among them, RF represents the spatial row frequency and CF represents the spatial column frequency; the definitions of RF and CF are as follows: The edge intensity (EI) reflects the image clarity degree. The more abundant the image detail and edge, the higher the image clarity.
where G x (i, j), G y (i, j) represent the first-order partial derivative in horizontal and vertical directions and is defined as: where ⊗ is the convolution symbol, g x and g y are the horizontal template and vertical template for the Sobel operator. When the kernel size is 3, they are defined as: Having analyzed the effects of the decomposition levels on image enhancement, the statistical data is shown in Tables 1 and 2.  Table 2. An objective evaluation of the NSST decomposition levels for Figure 4.   The larger the above four parameters are, the better the enhancement effect. Observing the data in Tables 1 and 2 and Figure 5, under the condition of a certain number of shearing parameter in each level, with the increase of the decomposition scale, the information entropy slightly increases, but the overall fluctuation effect is not large. The average gradient, spatial frequency, and edge intensity of the image increase significantly, reaching their extreme value when the decomposition scale is 4. If the decomposition scale is increased again, the image enhancement effect is not obvious. Therefore, the primary decomposition scale is set to 4.  The larger the above four parameters are, the better the enhancement effect. Observing the data in Tables 1 and 2 and Figure 5, under the condition of a certain number of shearing parameter in each level, with the increase of the decomposition scale, the information entropy slightly increases, but the overall fluctuation effect is not large. The average gradient, spatial frequency, and edge intensity of the image increase significantly, reaching their extreme value when the decomposition scale is 4. If the decomposition scale is increased again, the image enhancement effect is not obvious. Therefore, the primary decomposition scale is set to 4.

Shearing Directions Analysis of NSST
Performing l -level directional decomposition on the high-frequency sub-band image can obtain a 2 l -directional sub-band image of the same size as the source image, achieving more accurate directional decomposition in the frequency domain. The time taken by the 4-level directional decomposition of the NSST algorithm is much longer than that of the 2-level directional one. The shearing directions experiment was carried out on the same batch of pictures by selecting two representative medical images for analysis. The enhanced X-ray images obtained under different shearing directions are shown in Figures 6 and 7. Having analyzed the effects of the shearing directions on image enhancement, the statistical data is shown in Tables 3 and 4.

Shearing Directions Analysis of NSST
Performing l-level directional decomposition on the high-frequency sub-band image can obtain a 2 l -directional sub-band image of the same size as the source image, achieving more accurate directional decomposition in the frequency domain. The time taken by the 4-level directional decomposition of the NSST algorithm is much longer than that of the 2-level directional one. The shearing directions experiment was carried out on the same batch of pictures by selecting two representative medical images for analysis. The enhanced X-ray images obtained under different shearing directions are shown in Figures 6 and 7. Having analyzed the effects of the shearing directions on image enhancement, the statistical data is shown in Tables 3 and 4.  Figure 6. The enhanced effects of different shearing directions on X-ray image 1. In (a), the shearing parameters of each level are set to (4,4,4) and the shearing directions are (16,16,16). For (b-h), the decomposition scale was set to 4 levels, the shearing parameters of each level are set from (2,2,2,2) to (4,4,4,4), and the shearing directions are from (4,4,4,4) to (16,16,16,16). The number of shearing directions of each level was gradually increased. Figure 7. The enhanced effects of different shearing directions on X-ray image 2. In (a), the shearing parameters of each level are set to (4,4,4) and the shearing directions are (16,16,16). For (b-h), the decomposition scale was set to 4 levels, the shearing parameters of each level are set from (2,2,2,2) to (4,4,4,4), and the shearing directions are from (4,4,4,4) to (16,16,16,16). The number of shearing directions of each level was gradually increased.  (4,4,4) and the shearing directions are (16,16,16). For (b-h), the decomposition scale was set to 4 levels, the shearing parameters of each level are set from (2,2,2,2) to (4,4,4,4), and the shearing directions are from (4,4,4,4) to (16,16,16,16). The number of shearing directions of each level was gradually increased.  Figure 6. The enhanced effects of different shearing directions on X-ray image 1. In (a), the shearing parameters of each level are set to (4,4,4) and the shearing directions are (16,16,16). For (b-h), the decomposition scale was set to 4 levels, the shearing parameters of each level are set from (2,2,2,2) to (4,4,4,4), and the shearing directions are from (4,4,4,4) to (16,16,16,16). The number of shearing directions of each level was gradually increased. Figure 7. The enhanced effects of different shearing directions on X-ray image 2. In (a), the shearing parameters of each level are set to (4,4,4) and the shearing directions are (16,16,16). For (b-h), the decomposition scale was set to 4 levels, the shearing parameters of each level are set from (2,2,2,2) to (4,4,4,4), and the shearing directions are from (4,4,4,4) to (16,16,16,16). The number of shearing directions of each level was gradually increased.  (4,4,4) and the shearing directions are (16,16,16). For (b-h), the decomposition scale was set to 4 levels, the shearing parameters of each level are set from (2,2,2,2) to (4,4,4,4), and the shearing directions are from (4,4,4,4) to (16,16,16,16). The number of shearing directions of each level was gradually increased.     To prove the effectiveness of the proposed algorithm in this paper, 30 chest X-ray images obtained from [33] are selected to simulate, and the average metrics are shown in Table 5. Five indicators of average gradient (AG), information entropy (H), spatial frequency (SF), edge intensity (EI), and running time (RT) are introduced to objectively analyze the enhancement effect. The line charts of the average values of the objective metrics data in Table 5 are given in Figure 8. To display the data in the same graph, the value of EI has taken one-ninth of the original value, the value of SF has taken half of the original value, and the value of T has taken one-fifth of the original value.
Observing the experimental data, under the condition of a certain decomposition scale, with the increase of the shearing parameter of each level, the operation time gradually increases due to the low efficiency of the iterative filtering operation during the direction division process. However, the average gradient, information entropy, spatial frequency, and edge intensity are not obvious, indicating that the number of clipping directions will increase the complexity of the operation and make the running time of the algorithm longer, but the enhancement effect on the image is not obvious. In the final algorithm scheme, the decomposition scale of NSST is set to four levels, the shearing parameters of each level are set to (2,2,2,2), and the shearing directions are (4,4,4,4). Table 5. The average objective evaluation of the methods on the 30 chest X-ray images.

Figure
Levels   Observing the experimental data, under the condition of a certain decomposition scale, with the increase of the shearing parameter of each level, the operation time gradually increases due to the low efficiency of the iterative filtering operation during the direction division process. However, the average gradient, information entropy, spatial frequency, and edge intensity are not obvious, indicating that the number of clipping directions will increase the complexity of the operation and make the running time of the algorithm longer, but the enhancement effect on the image is not obvious. In the final algorithm scheme, the decomposition scale of NSST is set to four levels, the shearing parameters of each level are set to (2,2,2,2), and the shearing directions are (4,4,4,4).

Subjective Analysis
To demonstrate the effectiveness of the algorithm in this paper, experiments were carried out on five X-ray images, as is shown in Figure 9, in which (1) and (2) are medical images mentioned before, (3) and (5) are industrial images with a size of 2048 × 2048, and (4) is a thermal battery image with a size of 1000 × 1000. The enhancement effect of the algorithm in this paper is compared with the FLM method [34], the AGCWD method [32], the TSSR method [9], and the LCM-CLAHE method [8] in terms of subjective visual effects and objective evaluation indicators.
To facilitate the observation and analysis of the detailed information in the image, we zoomed in on part of the image, as shown in the red box in the experimental results. It can be seen from Figure 9 that the FLM method may appear excessively enhanced, such as the bone background in (b)(2) being too bright, and the single-cell stack of the battery in (b)(4) being too bright, making the image lose a large amount of detail information; the AGCWD method has a certain enhancement effect on the image clarity, but the enhancement of details and texture information is not obvious in (c)(1) and (2); the TSSR algorithm enhances the contrast, but it will make the black areas in the image connect to produce a blurring effect, such as (d)(3)-(5); the LCM-CLAHE method can improve the texture information of the image, such as (e)(1), (2) and (5), but because the image is dark and the contrast is low, it is not conducive to the observation of image details. Figure 9f shows the results of the algorithm used in this paper, which suggests that the method proposed in this paper is very effective for X-ray image enhancement. Dealing with medical Xray images like Figure 9((1),(2)), we can see that the sharpness of bone and soft tissue information is significantly increased, image noise is suppressed, and contrast in local areas is also improved. The algorithm makes the texture information more prominent, which is beneficial to the doctor's diagnosis and follow-up treatment of the patient's disease. When applied to the industrial X-ray images in Figure 9((3)-(5)), we can see that the local details in the enhanced image are clearly visible, and the contrast between the battery texture information and the component edge information is obvious. The overall brightness of the image is moderate, and the noise components in the image are not seriously amplified so that the processed image is more in line with the visual effect of the human eye.
To demonstrate the effectiveness of the algorithm in this paper, experiments were carried out on five X-ray images, as is shown in Figure 9, in which (1) and (2) are medical images mentioned before, (3) and (5) are industrial images with a size of 2048 × 2048, and (4) is a thermal battery image with a size of 1000 × 1000. The enhancement effect of the algorithm in this paper is compared with the FLM method [34], the AGCWD method [32], the TSSR method [9], and the LCM-CLAHE method [8] in terms of subjective visual effects and objective evaluation indicators.

Objective Analysis
Four evaluation indicators, average gradient (AG), information entropy (H), spatial frequency (SF), and edge intensity (EI), were selected to objectively analyze the image enhancement effect. From the aggregated data in Table 6, we can see that the algorithm proposed in this paper has achieved the optimal values in the three indicators of average gradient, spatial frequency, and edge intensity compared with the other four enhancement algorithms, and the information entropy also ranks in second place. From the average index data of the five pictures, we can see that the proposed method has achieved the best results in all four indicators.
The algorithm in this paper can improve the local contrast and sharpness, making it easier for people to obtain useful information about the target area from the enhanced image. To verify the robustness and general adaptability of the algorithm, experimental statistics were performed on 30 COVID-19 X-ray images with a size of 1024 × 1024 collected from [33]. The average metrics of their objective evaluation are given in Table 7. The line charts of the average values of the objective metrics data in Table 7 are given in Figure 10. To display the data in the same graph, the value of EI has taken one-eighth of the original value. It can be seen from Figure 10 that the four evaluation indicators (AG, H, SF, and EI) obtained by the algorithm in this paper have achieved the optimal values among all the five algorithms. These results indicate that the proposed X-ray image enhancement algorithm can achieve a better enhancement effect.
Compared with existing enhancement methods, the proposed algorithm does not show significant advantages in terms of running time. The image enhancement model based on shearlet transform has relatively high computational complexity. The choice of the number of decomposition layers influences the effect of image enhancement, and the increase in the number of decomposition layers will bring higher computational complexity. This results in a long time for image enhancement. The different processing of sub-bands after multi-scale decomposition also affects the image enhancement effect and running time. Therefore, how to select a better sub-band processing method to obtain the optimal enhancement effect while reducing the number of decomposition layers is the next problem we will study. In addition, some parameter values in the algorithm need to be determined by empirical values. For X-ray images of different initial conditions, the algorithm parameters need to be changed accordingly. Future research will focus on the adaptability of this method. Compared with existing enhancement methods, the proposed algorithm does not show significant advantages in terms of running time. The image enhancement model based on shearlet transform has relatively high computational complexity. The choice of the number of decomposition layers influences the effect of image enhancement, and the increase in the number of decomposition layers will bring higher computational complexity. This results in a long time for image enhancement. The different processing of subbands after multi-scale decomposition also affects the image enhancement effect and running time. Therefore, how to select a better sub-band processing method to obtain the optimal enhancement effect while reducing the number of decomposition layers is the next problem we will study. In addition, some parameter values in the algorithm need to be determined by empirical values. For X-ray images of different initial conditions, the algorithm parameters need to be changed accordingly. Future research will focus on the adaptability of this method.

Conclusions
Due to the influence of the X-ray detection hardware system and other factors, the quality of the X-ray image will decline, and the visual effect will become worse, causing certain difficulties in the process of X-ray image detection. Therefore, it is necessary to perform enhancement processing on the radiographic image to obtain higher quality images for subsequent analysis. This paper proposes a new image enhancement algorithm combining NSST and gradient-domain guided filtering. The innovation is that the image is decomposed in the NSST domain. AGCWD is used to enhance the contrast of the low frequency. Gradient-domain guided filtering is performed on the high-frequency subbands to improve image details and texture features. The final enhanced image is obtained through NSST coefficient reconstruction. The algorithm makes full use of the image sparse representation characteristics of NSST, the advantages of adaptive gamma correction in image contrast enhancement, and the advantages of the gradient domain guided filter in image detail enhancement. The algorithm proposed in this paper has an obvious effect on image enhancement, not only improving the contrast and clarity of the image but also

Conclusions
Due to the influence of the X-ray detection hardware system and other factors, the quality of the X-ray image will decline, and the visual effect will become worse, causing certain difficulties in the process of X-ray image detection. Therefore, it is necessary to perform enhancement processing on the radiographic image to obtain higher quality images for subsequent analysis. This paper proposes a new image enhancement algorithm combining NSST and gradient-domain guided filtering. The innovation is that the image is decomposed in the NSST domain. AGCWD is used to enhance the contrast of the low frequency. Gradient-domain guided filtering is performed on the high-frequency sub-bands to improve image details and texture features. The final enhanced image is obtained through NSST coefficient reconstruction. The algorithm makes full use of the image sparse representation characteristics of NSST, the advantages of adaptive gamma correction in image contrast enhancement, and the advantages of the gradient domain guided filter in image detail enhancement. The algorithm proposed in this paper has an obvious effect on image enhancement, not only improving the contrast and clarity of the image but also improving the image quality, as demonstrated by experiments on 30 X-ray images compared to the other four advanced image enhancement methods at home and abroad. From the experimental results, we can see that the evaluation indicators AG, H, SF, and EI have all achieved optimal value. This demonstrates that the proposed algorithm can obtain a better enhancement effect for both medical and industrial radiographic images. It will provide a basis for later medical X-ray image diagnosis and industrial X-ray defect identification and detection.

Conflicts of Interest:
The authors declare no conflict of interest.