# X-ray Image Enhancement Based on Adaptive Gradient Domain Guided Image Filtering
## 4 Experimental Results  
In order to demonstrate the effectiveness of the proposed method, we experimented on a large number of X-ray images from the website [[http://acm.cs.nctu.edu.tw/](http://acm.cs.nctu.edu.tw/)]([http://acm.cs.nctu.edu.tw/](http://acm.cs.nctu.edu.tw/)) (accessed on 20 September 2022) which was provided by Prof [PERSON], and the following seven image enhancement approaches are compared: McCann [32], RLBHE [33], RESIHE [11], TBCSSR [34], gradient domain guided image filtering (GDGIF) [25], statistical methods with image processing concepts (SMIPC) [35], and improved type-II fuzzy set (FuzzyII) [36]. Subjective and objective assessments are used to evaluate the performance of different image enhancement methods. In terms of the objective index, the average gradient (AG) [37], information entropy (H) [37], average local contrast (ALC) [38], spatial frequency (SF) [37] and mean gradient [38] are used in the comparison. The bigger these indexes are, the better the image enhancement effect is. The average gradient (\(AG\)) is defined as follows [37]:  
\[AG=\frac{\sum_{i}\sum_{j}\left(\left(f(i,j)-f(i+1,j)\right)^{2}+\left(f(i,j)- f(i,j+1)\right)^{2}\right)^{1/2}}{mn} \tag{21}\]  
where \(f(i,j)\) shows the pixel intensity at \((i,j)\), and \(m\times n\) shows the size of the image. Information entropy (\(H\)) estimates the amount of information in the image, and it is calculated by the following [37]:  
\[H=-\sum_{k=0}^{255}p_{k}\log_{2}(p_{k}) \tag{22}\]  
where \(p_{k}\) shows the probability of intensity value \(k\) in the image. The average local contrast (ALC) of the image is achieved by calculating the average value of the local contrast metric, and the local contrast is defined as follows [38]:  
\[C_{ij}=\frac{\sigma_{w}^{2}}{\mu_{w}} \tag{23}\]  
where the local mean of intensity \(\mu_{w}\) is calculated for the pixels within the sliding \(3\times 3\) window centered on the pixel \((i,j)\), and \(\sigma_{w}^{2}\) shows the local variance of intensity. Spatial frequency (\(SF\)) denotes the overall information level in the regions, and it is defined as follows [37]:  
\[SF=\sqrt{RF^{2}+CF^{2}} \tag{24}\]  
where  
\[RF=\sqrt{\frac{\sum_{i}\sum_{j}(f(i,j)-f(i,j-1))^{2}}{mn}} \tag{25}\]  
\[CF=\sqrt{\frac{\sum_{i}\sum_{j}(f(i,j)-f(i-1,j))^{2}}{mn}} \tag{26}\]  
The mean gradient (\(MG\)) evaluates the edge information of image; it is defined as follows [38]:  
\[MG=\frac{1}{mn}\sum_{j=1}^{n}\sum_{i=1}^{m}G_{ij} \tag{27}\]  
where \(G_{ij}\) shows the magnitude of the gradient at the pixel location \((i,j)\) in the image. Figure 1 shows the enhancement images of eight methods experimented on X-ray image 1. Figure 1a shows the original X-ray image 1; Figure 1b shows the image obtained by McCann, and the image is too bright; Figure 1c shows the image achieved by RLBHE--the image is too dark and the performance of enhancement is poor, the details of the image are difficult to ascertain; Figure 1d is the result obtained by RESIHE--the definition of the image is low; Figure 1e shows the image enhanced by TBCCSR; Figure 1f represents the image obtained by GDGIF--the image has a lot of noise; Figures 1g and 1h show the result enhanced by SMIPC and FuzzyII, respectively, and the images have poor enhancement performance; Figure 1i is the image achieved by the proposed method--it has moderate brightness and better clarity. Table 1 is the evaluation index values of various algorithms in Figure 1. From this table, we can denote that the values of AG, ALC, SF and MG obtained by the proposed technique are the best; the value of H achieved by SMIPC is the best, and the corresponding value obtained by the proposed method is still ranked second.