Improving radiographic image contrast using multi layers of histogram equalization technique

Received Apr 19, 2020 Revised Jan 18, 2021 Accepted Feb 12, 2021 Usually, X-ray image has distortion in many parts because it is focusing on bones rather than other, However, when dentist needs to make decision analysis, he does that by using X-ray and many opinions can be judged by looking closely on it like (inflammation, infection, tooth nerve, root of the tooth...). This paper proposes on new suggested technique by applying multilayers of histogram equalization (HE) and contrast limited adaptive histogram equalization (CLAHE) in order to make high contrast of X-ray, this technique provides very satisfied results and smooth intensity which leads to high clear X-ray image, by using Python3 and OpenCV.


INTRODUCTION
If a patient feels dental pain, he should see a dental clinic, usually, dentists analyze the reason by observing both visually and radiographically for organic or functional abnormalities. Usually, different pain is caused by an organic problem such as periodontitis, trauma, dental caries, or pulpitis [1]. X-rays are commonly the dental radiographs, radiographs are used by dentists for some reasons, for example to find hidden malignant, benign masses or dental structures, cavities and bone loss. A radiographic image is formed by a controlled eruption of X-beam radiation that pass in oral structures at various stages, contingent upon fluctuating anatomical densities, prior to striking the film or sensor. Teeth may seem lighter on the area that less radiation passes in them to reach at the film. Dental caries, the changing in the bone thickness and contaminations and the periodontal tendon, seem darker on the grounds that X-beams promptly infiltrate these less thick structures. Dental repairing (fillings, crowns) may appear lighter or darker, depending on the density of the material.
X-ray has many details if it is managed well, many methods are available for re-processing the Xray image. Pre-processing refers to familiar term for processing with pictures at the early stage of processing. Usually, the images are taken by sensors or cameras, the intensity image almost transferred by a matrix of many values of pixels each pixel has special brightness. The main goal of pre-processing is an enhancement of the data that consists the image, and make more enhancement or improvement for image to decrease distortion of it [2]. Histogram equalization (HE) algorithm is one of the most popular technique, which is used for improving image contrast. It tries to distribute the intensities of image in order to be more brightness. Many works interested with image enhancement using HE algorithm, and many authors were studied these algorithms and showed the effect of improvement it.
Liyun et al. [3], developed a histogram model to smooth the curve of histogram, that is used to avoid the information's loss in the processed image. In addition, an adaptive gamma correction is proposed to stretch the brightness contrast for the histogram, but this work used complex modification of log-exp transformation strategy and focused on colored images. Sonal Raj et al. [4], proposed research using improved HE to solve the problem of unclear images, but this method is not automated and need to test all the results for estimating the best factor for enhancement. Zhen C. et al. [5], proposed a research to resolve the drawback of unsatisfied detection effect of underwater visual saliency map, an image saliency detection algorithm based on improved histogram equalization. But this way focused on increasing the brightness only regardless to the edges appearance.
Manuel G. Forero et al. [6], presented an improvement method of intensity which is used in microscopy, where, images contain similar textures, but the intensity or density may change vividly. Two new profiles are introduced, and the Bhattacharyya distance is employed to find the best matching result, this method is affected with microscopy images with standard size. Ebele Onyedinma et al. [7], aimed at improving the information content of original image for contrast improvement of images by using histogram and fuzzy. Biswas et al. [8], used HE in Iris enhancement with other techniques like canny for edges detection and provided very accepted results, but using HE with canny is useless in our case, because the detection of gingivitis does not need edge detection.
Borra et al. [9] used HE as second stage after noise removal in order to enhance the fingerprint images, and got good results, but as will be shown in this paper the using of multi layers will present more efficient results. Mohammed et al. [10][11][12][13] focused on using HE to enhance many types of images (breast cancer, fingerprint, finger-vein and face) with good results, but also using one layer of this technique. Ahmed et al. [14] proposed a real-time significant model for the detection of the blood vein using mobile application under android with CLAHE technique as one layer of enhancement image. Shamsudeen et al. [15][16][17][18] used HE with other techniques to enhance images in order to get more contrast image, but no studies using HE with many layers. All previous studies either complex or dealt with specific type of image size or type, but the suggested method which is used multilayers of standard algorithms of HE and CLAHE.
In 2020 [19] studied background difference, and used Canny technique for edge shapinig, this methos was very effected, but is used for edges sharpinig not for enhancing contrast.
In [20] authors, used HE and CLAHE to make enhancement of COVID-19 (corona virus 2019) chest X-ray, and these techniques enhanced the contrast of X-ray, and made high recognition in convolutional neural network (CNN).

HISTOGRAM REPRESENTATION
It is a graphical description which shows the spreading of intensity in picture, it computes the number of pixels for each intensity value, and used to enhance the contrast in an image, in order to stretch out the intensity range, to make it sharpener and clearer. Figure 1 shows that the pixels (on right) seem gathered about the middle of the obtainable range of intensities [21][22].
As shown in right part of Figure 1 which represents the original image, this image is in grayscale mode, and after applying histogram equalization the new image is denoted in right part of Figure 2, and as shown in the left part of Figure 2, the histogram representation is stretched along the intensity.

HISTOGRAM EQUALIZATION ALGORITHM
HE algorithm, is one of the popular computer image pre-processing algorithms, used to enhance contrast in images. It achieves the improving by efficiently distribution out the intensity values, by. stretching out the intensity range along the image. This technique growths the universal contrast of images when its operational values are represented by nearby contrast data. HE lets the lesser local difference in intensities to get mor contrast.
Contrast limited adaptive histogram equalization technique (CLAHE), is another enhancement technique is used to adjust the level of strong contrast and the local details for more relevant interpretation. The values of spreading of intensity in an image can be observed as arbitrary values that may be any value from 0 to L-1. The random calculation is also called cumulative distribution function (CDF) associated to itself. This function defines the probability that the arbitrary value may assigned a value less or equal to a specific value. In general, HE is an algorithm for regulating picture intensities to improve the whole contrast. Let f be an input image denoted as array of numeral pixel of intensities value in range start with 0 and end in L − 1. which L refers the value of intensity probability. And p refers the regularized histogram of main image f for this terms the formula will be: let HE of image defined as g: (1) Hence, the flor() turned to the nearest down integer. which is equal to converting the values of densities, k, of f by the formula: (2) The inspiration for this conversion originates from thoughtful of the densities for f and g as continuous arbitrary values X, Y on duration ranging 0 to L − 1 with variable Y is: Wherever pX is likelihood intensity formula of f. Where T means the collective distribution values of X multiplied by (L−1). for ease, assume the variable T is invertible and differentiable. while Y denoted by function T(X) is regularly spread [23][24].

MODEL AND RESULTS
Basically, X-ray gray scale image is considered, sometimes the radiographics are actually dark, at the same time, the histogram focused on the minor values of the intensity. So, the objective of this part is to improve the contrast of the X-ray images by equalizing the histogram. For Figure 3, the histogram representation of original image is shown in the left where X-axis represents image pixel and Y-axis is the value of intensity, accordingly to the histogram representation, and can be seen that the pixels seem clustered

MODEL AND RESULTS
In order to improve contrast, hence, the original X-ray image for teeth is not clear to decide if there is an inflammation or not, for Figure 4, histogram equalization algorithm is applied so more contrast is improved also the CDF curve is little smoothed but still there is confusion in orange ellipses if the gum is inflamed or not.
Test using CLAHE algorithm as denoted in Figure 5, the dentist can see that the orange ellipse has big infection near the roots of the two fillings teeth, which causes toothache, while CDF curve is less smoothing than the Figure 4, but the result image has more details than the later. Improving radiographic image contrast using multi layers of… (Farah F. Alkhalid) 155 When test using CLAHE Algorithm two times Figure 6 Appling CLAHE Algorithm two times, the dentist can be ensuring the orange ellipse is inflammation, at the same time the histogram representation has smooth top and smoother CDF curve with improved X-ray image. Figure 7 Appling HE Algorithm then CLAHE Algorithm gives very satisfied result, with smoother CDF curve and flat histogram, in addition, high contrast in X-ray image. Overall, using two algorithms can presents very good results to improve gray scale X-ray image, the code of this project is available in [25] using Anaconda Navigator, and "Jupyter Notebook" based "Python 3.0".

CONCLUSION
Equalization suggests plotting one spreading the assumed histogram to one more with wider spreading and more unvarying spreading of intensity data so the intensity data are separated along the entire area. The system is proposed to improve tooth X-ray which always be not clear, however, each feature appears in the image can mean something, so by applying different scenarios to make enhancement on image contrast , visually, it is observed when applying multi layers of CLAHE Algorithm twice time can provide very satisfied result, also can use multi layers consist from HE Algorithm and then CLAHE Algorithm also can give more details with high contrast, free cost by using OpenCV library.