Inverse Sigmoid-Based X-Ray Image Enhancement

Medical images suffer from overall dim and low contrast, often making it difficult for doctors to make accurate diagnoses of diseases. Many image enhancement algorithms1 such as gamma correction, contrast enhancement2,3 histogram equalization approaches4–7 and retinex algorithms8–11 has been applied to medical images. The histogram equalization approaches such as Local Histogram Equalization (LHE)4, Adaptive Histogram Equalization (AHE)5 and Contrast Limited Adaptive Histogram Equalization (CLAHE)6 effectively improve various low contrast medical images. However, they often cause visually unpleasing results and require difficulty in determining a suitable parameter value. The retinex theory was first proposed by7 to model the eye perception of light intensities. The human visual system can perceive the color of a scene without considering the illumination of the scene. The retinex algorithms model the scene in terms of the reflectance and illumination. Then, they separate the reflectance component of a given input image as an enhanced result. The reflectance component is less sensitive to lighting environments. They have been successfully applied to various applications including medical imaging10–12. The improved retinex algorithms in the literature have been focused on color restoration and illumination estimation. For better color restoration, they decompose a given input image into luminance and chrominance components, and then they enhance the luminance component only13,14. We can usually approximate the illumination component of the input image by smoothing. This approach is simple, but causes a halo effect usually occur on the boundary between bright and dark regions. This effect can be reduced by using segmentation14,15 or adopting elaborate smoothing16 using edge preserving filters such as bilateral filter17. Most of the retinex algorithms8, 9 estimates the illumination component using the Gaussian like filters. There have been some other approaches. In18 estimates the illumination by taking a maximum count of R, G, and B instead of a weighted-average of them to guarantee Abstract


Introduction
Medical images suffer from overall dim and low contrast, often making it difficult for doctors to make accurate diagnoses of diseases. Many image enhancement algorithms 1 such as gamma correction, contrast enhancement 2,3 histogram equalization approaches 4-7 and retinex algorithms [8][9][10][11] has been applied to medical images. The histogram equalization approaches such as Local Histogram Equalization (LHE) 4 , Adaptive Histogram Equalization (AHE) 5 and Contrast Limited Adaptive Histogram Equalization (CLAHE) 6 effectively improve various low contrast medical images. However, they often cause visually unpleasing results and require difficulty in determining a suitable parameter value.
The retinex theory was first proposed by 7 to model the eye perception of light intensities. The human visual system can perceive the color of a scene without considering the illumination of the scene. The retinex algorithms model the scene in terms of the reflectance and illumination. Then, they separate the reflectance component of a given input image as an enhanced result. The reflectance component is less sensitive to lighting environments. They have been successfully applied to various applications including medical imaging [10][11][12] .
The improved retinex algorithms in the literature have been focused on color restoration and illumination estimation. For better color restoration, they decompose a given input image into luminance and chrominance components, and then they enhance the luminance component only 13,14 . We can usually approximate the illumination component of the input image by smoothing. This approach is simple, but causes a halo effect usually occur on the boundary between bright and dark regions. This effect can be reduced by using segmentation 14,15 or adopting elaborate smoothing 16 using edge preserving filters such as bilateral filter 17 .
Most of the retinex algorithms 8,9 estimates the illumination component using the Gaussian like filters. There have been some other approaches. In 18 estimates the illumination by taking a maximum count of R, G, and B instead of a weighted-average of them to guarantee that all colors will remain in gamut. Since brighter areas are closer to illumination, 19 only takes into account the brighter neighbors of the central pixel. In 20 used the coarse part only in the wavelet expansion of the image to estimate the illumination component since the lowfrequency component covers the illumination part.
The retinex algorithm increases the intensity of a pixel that is brighter than its neighbors therefore it recovers effectively hidden details in dark regions. This paper assumes that the logarithm in the retinex algorithms also plays an important role in this property; however, the logarithm prevents this algorithm from recovering details in bright regions. For example, Figure 1 shows an X-ray sensor image and the retinex processed result image. The darkness of the rib region is lightened so that details in the background become more visible. But the bright spine regions become dim.
This paper proposes a modified approach for X-ray sensor images by introducing a new logarithm formula to obtain contrast improvements in both dark and bright regions.
This paper is organized as follows. In section 2, we briefly review the retinex algorithms. In section 3, we introduce a new formula for the modified version of the retinex algorithm. In section 4, comparison in terms of visibility with the conventional works is presented. Finally the conclusion and future work are discussed in section 5.

Single-Scale Retinex
In this section, we give a brief review on the retinex algorithms. The retinex algorithm assumes that a given input image I is represented as follows: Where R is the reflectance part and L is the illumination part at each pixel (x, y). The goal of the retinex algorithm is to compute the reflectance R by estimating the illumination L from the given input image I. To obtain the reflectance output it applies the logarithm on both sides of the equation (1). ( The illumination is estimated by applying a surround function to the input image, the illumination can be obtained: ( Where " " denotes the convolution operation and is Gaussian function.
Where is a spatial scale that controls the size of the surrounding space and K is normalization constant as follows: (5)

Multi-Scale Retinex
The retinex algorithm explained above is called Single-Scale Retinex (SSR) 8 because it uses only one Gaussian surround function. The SSR fails to handle various images.
To alleviate this drawback, in 9 proposed to integrate different spatial scales called Multi-Scale Retinex (MSR) 9 .
Example of the retinex processing on an X-ray image. Input image (left) and output image (right).
Where is a weighting factor for each SSR. The strength of MSR comes from combining the advantages of several SSR results with different spatial scales. However, the MSR often causes a colorshift problem since it processes each RGB channel independently. This problem can be partially solved by a color restoration technique. We call this approach MSR with Color Restoration (MSRCR) 9 .
Where the channel is output of and is a weighting function.
Where a and b denote constants.

Proposed Inverse Sigmoid-Based Method
The retinex algorithm increases / decreases the intensity of a pixel that is brighter / darker than its neighbors. From the image formation model, equation (1), we can easily understand that this property is mainly due to the process of dividing the intensity of the pixel by the weighted mean intensity of its neighbors. However, this dividing process cannot explain why the retinex algorithm is more effective to recover hidden details in dark regions than bright regions. This leads us to pay attention to the logarithm function applied to the retinex algorithm as described in (2). The logarithm has an increasing curve shape as shown in Figure 2. It starts with a rapid increase and ends with a slow increase. Therefore, we can expect that the dynamic range of darker pixels is sufficiently expanded meanwhile the dynamic range of brighter pixels is compressed. In order to get expanded dynamic ranges for both darker and brighter regions, this paper proposes to use the inverse sigmoid function expressed in equation (9) and shown in Figure 2 instead of the logarithm used in the conventional method.
The inverse sigmoid function draws a significant increase for both beginning (near zero) and ending (near one) areas. The curve of this function meets our goal of enhancing both dark and bright regions simultaneously.
Then the proposed modified retinex algorithm based on MSR using the inverse sigmoid function is represented: (10) Where the operation prevents zero denominators and is a small constant given 0.001 in this paper.
The output of the retinex algorithm should be adjusted for display purpose. We use a simple normalization  Inverse Sigmoid-Based X-Ray Image Enhancement technique using the mean and standard variation of the output. The final enhanced output is computed as follows: (11) Where are the retinex outputs, and are the mean and standard deviation of for all pixels. The and determine the range of dark and bright regions respectively.

Experimental Results
In this section, to demonstrate the expected effects with the proposed algorithm we choose X-ray images that usually consist of both dark and bright regions. Firstly, we provide the enhanced results for the retinex algorithms with different spatial scales. And then we provide LHE results for the reference. We also compare them in terms of visibility using gradient images. In our experiments we choose the proper manually for the final output images.
In Figure 3 compares our results with the conventional MSR. For these results we choose properly and for each image to keep them to be similar intensity without making any pixel to become white or black. Our results successfully recover the details of the spine regions with comparable details on the ribs regions; meanwhile the conventional method achieves a good contrast on the ribs regions (originally dark) but fails to recover the spine regions (originally bright). In Figure 3, the conventional method (1st row) and our method (2nd row) with different spatial scales 5, 10, and 15 (1st column) and 40, 80, and 120 (2nd column) for the input images are shown. The rib region is dark and the spine region is very bright. The detail of the spine region of the proposed method is obvious regardless of a given spatial scale while archiving comparable details in the rib region as well.
In Figure 4, we varied different spatial scales, 40, 80, and 120 for the conventional method and our method. In case of a larger spatial scale, the conventional method has better contrast on the ribs regions. However, the two gradient images shown have similar edges occurs in the ribs regions. In addition, Figure 4 clearly shows that the proposed method attains better visibility than the conventional approach on the spine regions. In the spine region, it is obvious that our method has more edges than the conventional method. In addition, the edges of rib region is just comparable each other.
In Figure 5, the result of a mammography image is another example of demonstrating that our method can recover bright details considerably compared with the conventional method.
In Figure 6 shows that our retinex based approach is superior to histogram techniques on X-ray images. With regardless of window sizes, the results of LHE are visually unpleasing. Further, different window size produces a very different result.

Conclusion
This paper demonstrated that the logarithm plays an important role in recovering details of dark regions due to its curved shape. Inspired with this investigation, we proposed to use the inverse sigmoid instead of the logarithm to obtain better results in both dark and bright regions. In our experiments on X-ray images, the comparison results clearly demonstrated that our method is superior to the conventional method in the view point of recovering bright regions. Another advantage of our method is that it can be easily extended by adopting the improved frameworks for the retinex algorithms. In future works, we will design a new curve function with additional parameters that can control a weight on dark and bright regions.