Abstract
Background
X-ray is an effective measure in the diagnosis of coronavirus disease 2019. However, it suffers from low visibility and poor details. A plausible solution is to decompose the captured images and enhance the details. The bilateral weighted least square model can be an effective tool for this task. However, it is highly computationally expensive.
Method
In this article, we propose an efficient algorithm for the bilateral weighted least square model. We approximate the bilateral weight with the bilateral grid and then incorporate it into the optimization model. This significantly reduces the number of variables in the linear system. Therefore, the model can be efficiently solved. We employ the proposed algorithm to decompose the input X-rays into base and detail layers. The detail layers are then boosted and added back to the input to derive the detail-enhanced results.
Results
The subjective results indicate that our method achieves higher contrast than the best-performing method (
Conclusion
We have conducted extensive experiments to evaluate the proposed image detail enhancement method. It can be concluded that (1) our method could significantly improve the visibility of the X-ray images. (2) our method is fast and effective, thus facilitating real applications.
Introduction
The coronavirus disease 2019 (COVID-19) is extremely contagious due to the high basic reproduction number (R0).1–4 During the last three years, it has spread rapidly across the world. The booming development of COVID-19 has imposed a heavy burden on the control of the disease. Even though the impact of the virus is being alleviated, the number of reported reinfections is increasing.5–7 A timely diagnosis of COVID-19 could prevent the spread of the virus. However, the dominant variants8,9 of COVID-19 are characterized by a range of clinical signs of asymptomatic infection,10,11 which complicates the diagnosis.
Chest radiography (X-ray) is an essential measure for human experts to diagnose COVID-19 disease.12,13 Moreover, researchers have also attempted to investigate deep learning-based approaches for the diagnosis of COVID-19. Comprehensive studies of these methods can be found in existing surveys.14,15 However, due to the low dynamic range and contrast of the X-ray images, subtle but meaningful details may be challenging to identify for both humans and machines. Therefore, it is critical to enhance the details so that the visibility of the X-ray images can be improved.
Detail enhancement refers to the process to enhance the details of images. It can be leveraged to improve the clarity of X-ray images. The early attempts on this task are based on the histogram equalization and its variants, such as the adaptive histogram equalization, 16 contrast limited adaptive histogram equalization,17,18 and normalized contrast limited adaptive histogram equalization. 19 The Histogram equalization-based methods could promote the image details, but they may also increase the contrast of noise and suppress the contrast of meaningful structures.
Recent methods for detail enhancement mostly rely on image decomposition with edge-aware smoothing filters, such as the bilateral filter,20,21 anisotropic diffusion filter,
22
guided filter,23,24 soft clustering filter,
25
It is worth noting that, among the decomposition-based methods, the weighted least square (WLS) filter 29 is shown to be particularly useful for detail manipulation, that is, it can significantly enhance the details without causing the gradient reversal or halo artifacts. However, the weighted design only involves the range, making it less edge-aware. Moreover, similar to many methods based on global optimization, it is highly time-consuming, as it requires to solve a linear system with a large inhomogenous Laplacian coefficient matrix.
With the booming advancement of the deep learning technique, we are seeing significant progress in the field of medical data/image processing, such as COVID-19 prediction, 30 segmentation of cervical cytology, 31 thyroid 32 and iris, 33 pulse extraction, 34 and breast cancer detection. 35 Different from these researches, our objective is to enhance the details of the COVID-19 chest X-ray images, thus aiding the diagnosis. We intend to develop a method that is not learning-based, and can be more stable and interpretable.
To facilitate our objective, we develop a novel decomposition-based image detail enhancement method, where we extract the detail layer, boost it, and add it back to the input image. The main contributions of this article are:
We propose a bilateral WLS model for the task of the X-ray image detail enhancement. The bilateral weighted scheme involves not only the range, but also the domain, thus can be more edge-aware. We propose a fast solution to our bilateral WLS model, where we approximate the bilateral weight with the bilateral grid. This significantly reduces the size of the problem, thus can be highly efficient. We have conducted subjective and objective experiments to evaluate our method. The subjective results show that our method achieves better contrast than existing methods. The objective results indicate that our method can improve the visibility of COVID-19 chest X-ray images.
The rest of the article is organized as follows. In the “Literature review” section, we summarize relevant methods. The “Method” section covers the details of the proposed method. Both objective and subjective experiments are presented in the “Experimental settings” section and both objective and subjective evaluations are presented in the “Experimental results” section. We discuss the proposed model in the “Discussion” section. Finally, we conclude the article and present future directions of research in the “Conclusion and future work” section.
Literature review
The most important step in our detail enhancement method is image decomposition. In this section, we will focus on various smoothing filters for image decomposition, which can be mainly divided into two categories, namely local and global methods. The former ones are based on explicitly define filter kernels, while the latter ones are based on sophisticated global optimization models.
Local methods
The bilateral filter 36 is perhaps the most prevalent non-linear filter for edge-preserving smoothing. It consists of a spatial kernel and a range kernel. Both of the two kernels are mostly Gaussian functions that are used to penalize pixels that are distant in space and range. Even though there are various artifacts, such as halos and gradient reversals, the bilateral filter is still effective in practice. The main impediment is the high computational cost.
Over the last decade, researchers have made various attempts to improve the efficiency of the bilateral filter. Most of the methods are built upon range quantization,37,38 range decomposition,39,40 or spatial subsampling. 27 These strategies significantly accelerate the bilateral filter, but they may not be able to improve the quality of image decomposition over the naive bilateral filter.
Another popular local method is the guided image filter. 23 The basic assumption in the work is that there exist local linear relations between the corresponding patches of the output and guidance images. Based on this assumption, the authors build a set of local linear regression problems that have closed-form solutions. The guided image filter can be computed efficiently. However, it suffers from severe halo artifacts in image decomposition.
In order to alleviate the halo artifacts that haunt the guided image filter, various strategies have been proposed, such as the anisotropic guided filter, 24 the weighted guided filter with steering kernel, 41 and the soft clustering guided filter. 42 These strategies all focus on the weighted averaging operation in the final step. These variants of guided filter significantly suppress the halo artifacts. However, the improvement is at the cost of sacrificing efficiency.
Global methods
The WLS filter
29
is the pioneering work for global image decomposition. It seeks to minimize the
The
The iterative least square filter
45
explores a non-convex penalty for regularization. It optimizes the
The generalized smoothing filter 28 is designed to provide a framework for various edge-aware image processing tasks. The model is based on a novel truncated Huber penalty function, which is friendly to weak edges. Therefore, the resultant filter is strongly edge-aware. However, it tends to sharpen the salient edges, thus may be subject to the gradient reversal artifacts. Moreover, the piece-wise objective function can be computationally expensive to solve.
Different from existing optimization-based image decomposition methods that impose gradient regularization, the soft clustering filter 25 models the task as image clustering similar to super-pixel segmentation. The partition matrix derived from the clustering process is then leveraged to construct the affinity matrix for image decomposition. The method accommodates a variety of applications, yet it may not be able to protect thin structures.
From the above discussion, we see that the local methods are mostly fast, but they suffer from poor quality. Moreover, the global methods suffer from artifacts in detail enhancement except for the WLS filter, which on the other hand, is time-consuming to solve. In this article, we propose a global method for image decomposition based on the bilateral WLS model. We consider not only the range, but also the domain in the weighted design, thus can be more edge-aware. Furthermore, we propose a fast solution to our model based on the bilateral grid. 38
Proposed method
Bilateral WLS model
The bilateral WLS model seeks to minimize the summed squared error regularized by the bilateral weighted
Rewriting equation (1) into the matrix form, we have
Taking the derivative of equation (3) to
Efficient solver
Directly solving equation (4) can be time-consuming. Inspired by the bilateral grid,
38
which is essentially a fast approximation of the bilateral filter, we propose a fast solver to the bilateral WLS model. According to the idea of the bilateral grid, the bilateral weight can be approximated as:
Based on equation (5), equation (3) can be approximated as
We introduce an auxiliary variable
When
System model
To achieve detail enhancement, the input X-ray image is firstly decomposed into the base and detail layers with our fast bilateral WLS filter. The detail layer is then boosted (

The flowchart of the proposed X-ray image detail enhancement method.
Our detail enhancement process can be mainly divided into three steps, which are detailed as follows:
Derive the base layer Extract the detail layer The detail layer is then boosted and added back to the input image to derive the detail-enhanced image, that is, X-ray image detail enhancement
Our detail enhancement method is highly efficient. Assume that the number of pixels and grids are
Experimental settings
We have conducted both objective and subjective experiments to evaluate the proposed X-ray image detail enhancement method. In this section, we will detail the experimental settings from these two aspects.
Objective evaluation
Metrics
For objective evaluation, we leverage the contrast measure as the objective metric to evaluate the quality of the detail-enhanced X-ray images, as shown below
Furthermore, we record and compare the running time (measured in seconds) of various methods on images with varying resolutions. Note that the running time of all methods is collected on a modern desktop with an Intel i7-6700 CPU, an Nvidia GTX 1070, and 16 GB memory. The running time could be an essential criterion to validate the practicability of the proposed method.
Dataset
The objective evaluation is conducted on the COVID-19 chest X-ray image dataset. 48 The dataset is initially developed to advance the detection of COVID-19 using chest X-rays. It contains 317 X-ray images in total, which can be mainly divided into three categories, that is, COVID-19, viral pneumonia, and normal chest X-rays. Our method is not learning-based and it does not require training. We test our method on the 61 images in the test dataset.
Methods
We compare the proposed method to a variety of prevalent methods. The full names, abbreviations, and references of all the methods involved in this experiment can be found in Table 1. We use the official implementations of these methods, which are provided by the authors. For the parameter settings, we best tune the parameters based on the recommended values for all methods.
Brief of the methods in our experiment.
Subjective evaluation
Procedure
For the subjective evaluation, we conduct a user study to validate the effectiveness of the proposed method. We invite a total of 36 doctors to participate in our user study. We randomly choose 20 X-ray images from the COVID-19 chest X-ray image dataset 48 and then enhance the detail of the images with our method. The doctors are required to observe and analyze 10 original X-ray images, and the other 10 detail-enhanced X-ray images, through a 32-inches monitor with 2K resolution.
After carefully observing all of the 20 images, the doctors are required to provide responses to a questionnaire, which includes the following questions:
I think the images are clear for diagnosis. I think the images contain adequate details. I am satisfied with the presented images.
We adopt a five-point Likert scale
52
for the answers to the questions. The doctors need to choose responses from the following: strongly disagree (SD); disagree (D); neutral (N); agree (A); and strongly agree (SA). The ratings for the choices are 1, 2, 3, 4, and 5, respectively.
Grouping information
The 36 doctors are from the departments of respiratory, emergency, and geriatrics. There are 15 males and 21 females. They are randomly divided into two groups, namely the control and the treatment groups. The doctors in the control group are presented with the original X-ray images, and the doctors in the treatment group are presented with the detail-enhanced X-ray images derived from our method. We divide the 20 pairs of X-ray images into two image sets, that is, S1 and S2, with 10 pairs in each set. The control group observing image set S1 is the treatment group observing image set S2. The treatment group observing image set S2 is the control group observing image set S1. In this way, all subjects are exposed to both the original X-ray images and the detail-enhanced image. The detailed arrangement can be found in Table 2.
Grouping information.
Research hypotheses
Through the user study, we want to find out the answers to the following research questions:
What were the perceived clarity of the original X-ray images and the detail-enhanced X-ray images? What were the perceived details of the original X-ray images and the detail-enhanced X-ray images? What were the satisfaction levels provided by the original X-ray images and the detail-enhanced X-rays? The detail-enhanced X-ray images derived from our method are clearer than the original X-ray images. The detail-enhanced X-ray images derived from our method contain more details than the original X-ray images. The detail-enhanced X-ray images derived from our method improve the satisfaction levels over the original X-ray images.
The corresponding research hypotheses are as follows:
Data collection and analysis
The doctors’ responses to the questionnaire are used to validate hypotheses H1, H2, and H3 in our user study. We printed the questions on paper so that it would be convenient for collecting the responses. The doctors are required to provide their responses by filling in their answers on the papers.
We record the number of subjects choosing each answer for each of the questions in the questionnaire. We leverage the chi-square test to study hypotheses H1, H2, and H3, as the measurements are discrete variables, and the purpose is to test whether the number of individuals in different categories fits a null hypothesis.
Experimental results
Objective evaluation
Quality
Table 3 shows the contrast measures of the original X-ray images and the enhanced images derived with various methods. The contrast measures are averaged over the entire testing dataset. It can be observed that enhancing the X-ray images with any one of the methods could significantly promote the contrast measures. However, among all the methods involved in this experiment, our method achieves the highest contrast for all the three categories of X-ray images. Therefore, our method could better improve the clarity and details in the X-ray images.
Contrast measures of the detail-enhanced X-ray images derived with various methods.
FBF: fast bilateral filter; GIF: guided image gilter; DTF: domain transform filter; MSF: mutual structure filter; WLS: weighted least square; AD: anistropic diffusion; SSF: smoothing sharpening filter; ILS: iterative least square; L1RF:
The superiority of the proposed method can be also validated from the qualitative comparisons in Figure 2. We observe that enhancing the images with any method could improve the clarity, as any one of the enhanced images has a clearer appearance than the input X-ray image. However, the image derived with our method demonstrates even more details than that of fast bilateral filter (FBF), guided image gilter (GIF), domain transform filter (DTF), and iterative least square (ILS). Furthermore, our filter tends to better preserve the intensity of the original X-ray image compared to WLS, soft clustering filter (SCF), and

Qualitative comparisons on medical image detail enhancement: (a) input, (b) FBF, (c) GIF, (d) DTF, (e) WLS, (f) ILS, (g) L1RF, (h) SCF, and (i) ours. FBF: fast bilateral filter; GIF: guided image gilter; DTF: domain transform filter; WLS: weighted least square; ILS: iterative least square; L1RF:
Efficiency
To further validate the practicality of our method, we compare its running time (measured in seconds) to that of other methods. Note that all the recorded time is averaged over 10 runs. As shown in Table 4, our method is highly efficient. It takes 0.92 seconds to process a 720P image, enabling interactive image processing. Through comparison, we can see that our method is faster than most of the methods involved in our experiments. DTF, FBF, GIF, and SCF achieve better efficiency than our method. However, our method delivers much better image quality, as demonstrated in the previous subsection. Finally, our method significantly improves the efficiency of WLS.
Running time of various methods under different resolutions (measured in seconds).
FBF: fast bilateral filter; GIF: guided image gilter; DTF: domain transform filter; MSF: mutual structure filter; WLS: weighted least square; AD: anistropic diffusion; SSF: smoothing sharpening filter; ILS: iterative least square; L1RF:
Subjective evaluation
Image clarity
Figure 3 demonstrates the subjects’ responses to the question “I think the images are clear for diagnosis.” Their ratings from 1 to 5 are used to evaluate the clarity of the images. The results are analyzed with the chi-square test as shown in Table 5. We observe that the subjects in the treatment group (presented with the detail-enhanced images) hold a more positive attitude (

Subjects’ responses to the question “I think the images are clear for diagnosis.”
Chi-square test result for the perceived image clarity (degree of freedom = 4).
SD: strongly disagree; D: disagree; N: neutral; A: agree; SA: strongly agree.
Image details
Figure 4 illustrates the subjects’ responses to the question “I think the images contain adequate details.” Their ratings from 1 to 5 are used to evaluate the details of the images. The results are analyzed with the chi-square test as shown in Table 6. It can be observed that the average ratings about the details of the image in the treatment group (presented with the detail-enhanced images) are higher (

Subjects’ responses to the question “I think the images contain adequate details.”
Chi-square test result for the perceived image details (degree of freedom = 4).
SD: strongly disagree; D: disagree; N: neutral; A: agree; SA: strongly agree.
Satisfaction level
The subjects’ responses to the question “I am satisfied with the presented images” are shown in Figure 5. The subjects’ ratings from 1 to 5 are used to evaluate the satisfaction level provided by the images. The results are studied with the chi-square test as demonstrated in Table 7. It can be observed that the satisfaction levels of the subjects in the treatment group (presented with the detail-enhanced images) are higher (

Subjects’ responses to the question “I am satisfied with the presented images.”
Chi-square test result for the perceived satisfaction levels (degree of freedom = 4).
SD: strongly disagree; D: disagree; N: neutral; A: agree; SA: strongly agree.
Discussion
In this article, we propose a novel and efficient method to enhance the details of images and explore the COVID-19 chest X-ray image dataset 48 as an example to demonstrate the effectiveness of the proposed method. In fact, our method essentially defines a general framework for image detail enhancement, that is, besides the X-ray images, our method can be potentially applied to an even broader range of images, such as computed tomography images, magnetic resonance imaging images, or even natural images. More studies need to be conducted to evaluate our method in enhancing other types of images. Our method is implemented on the CPU, which processes 720P images at interactive rates. It would be beneficial to implement the proposed method on GPU so that it can achieve real-time enhancement for 720P images.
Due to the lack of ground truth labels, we leverage the contrast measure for objective evaluation of the proposed image detail enhancement method. The contrast measure is a good indicator of the details and clarity. However, it does not reflect artifacts or degradation generated in the enhancing process. More efforts need to be spent to build a dataset with ground truth labels for X-ray image detail enhancement. The ground truth labels can be obtained with more extensive user studies, where human experts are invited to select the best-looking images from a set of detail-enhanced images derived from a variety of methods. In this way, one can study the quality of the detail-enhanced images in a more objective sense, using measures such as peak noise-to-signal ratio and structure similarity.
The proposed method can be used to enhance the details of the X-ray images. It can be beneficial to down-streaming diagnosis tasks conducted by either machines or human experts. However, the tones of images are not involved in this article. The X-ray images suffer from low dynamic range. Therefore, the tone can be also important to the visibility of the X-ray images. More studies need to be done to consider the tones of the X-ray images in order to further improve the clarity. Possible directions can be the HDR tone mapping operator 20 and the tone manipulation method. 53 It would be interesting to investigate the proposed fast WLS filter in the tasks of tone mapping and manipulation to see how it can be applied to further improve the visibility of the X-ray images.
The proposed solution to the optimization model shown in equation (11) is highly efficient. However, it is based on the approximation with the bilateral grid, which is essentially a hard quantization technique. Therefore, the results of our filter may exhibit blocky artifacts. Even though the artifacts can be eliminated by post-processing with the domain transform filter, degradation in the quality of the results may be introduced. It would be also interesting to investigate soft quantization or clustering techniques to approximate or define the affinity matrix in the weighted scheme, so that the results can be free of blocky artifacts without post-processing. Possible ways to achieve this objective can be the approximation of the bilateral affinity with spatial subsampling 21 or the soft clustering affinity. 25
Conclusion and future work
X-ray images can be essential to the diagnosis of COVID-19, which has brought significant impacts on our lives. However, the original X-ray images may suffer from low dynamic range and low contrast, which would hinder the diagnosis by either human experts or machine learning methods. Aiming at improving the clarity of the X-ray images, we propose an efficient method to enhance the details of the X-ray images. The proposed enhanced method is based on image decomposition with the bilateral WLS model. In order to efficiently solve the model, we propose to approximate the bilateral weight matrix with the bilateral grid so that the large sparse linear system would be simplified into a linear system with much fewer unknowns.
We have conducted extensive experiments to evaluate the proposed X-ray image detail enhancement method. Both objective and subjective evaluations are leveraged in our experiment. For the objective evaluation, we analyze the contrasts of the enhanced images derived with different methods. It is shown that our method could achieve higher contrast than the methods being compared. Furthermore, we compare the running time of different methods in deriving the enhanced images. Our method can process 720P 3-channel images at interactive rates on an i7-6700 CPU. For the subjective evaluation, we conduct a user study that involves 36 doctors. The chi-square test results indicate that the ratings of our detail-enhanced X-ray images are significantly higher than that of the original X-ray images. Therefore, we draw that our method could significantly improve the visibility of the X-ray images. Moreover, it can be applied to real practice, as it is efficient and effective.
Based on the discussion in the previous section, we summarize the future directions of research as follows:
We only apply our detail enhancement method in X-ray images, more studies need to be conducted to evaluate our method on a broader range of images. In order for a more objective evaluation, more efforts need to be spent to build a dataset with ground truth labels for X-ray image detail enhancement. The proposed method only deals with the details, more studies need to be carried out to investigate the tone manipulation techniques20,53 to further improve the clarity. Our fast solution is based on a hard quantization technique, that is, the bilateral grid, more studies need to be conducted to explore affinity designs with soft quantization
21
or clustering.
25
Footnotes
Acknowledgements
We would like to thank all participants for their time and efforts in our user study.
Contributorship
Conceptualization: YY and WB; data curation: WB and YY; methodology: WB and YY; formal analysis: WB and YY; supervision: YY; validation: YY; writing–original draft: WB; writing–review and editing: YY.
Consent statement
Patient consent was not required for the present manuscript, as the COVID-19 image dataset in this study is publicly available.
Declaration of conflicting interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship and/or publication of this article.
Ethical approval
Not applicable.
Funding
The author(s) disclosed receipt of the following financial support for the research, authorship, and/or publication of this article: This project was funded by National Natural Science Foundation of China (Ref: 61402205), China Postdoctoral Science Foundation (Ref: 2015M571688), Jiangsu University (Ref: 13JDG085), and Jiangsu Province Elderly Health Project (Ref: LD2021039).
