Panoramic Dental Radiography Image Enhancement Using Multiscale Mathematical Morphology

Panoramic dental radiography is one of the most used images of the different dental specialties. This radiography provides information about the anatomical structures of the teeth. The correct evaluation of these radiographs is associated with a good quality of the image obtained. In this study, 598 patients were consecutively selected to undergo dental panoramic radiography at the Department of Radiology of the Faculty of Dentistry, Universidad Nacional de Asunción. Contrast enhancement techniques are used to enhance the visual quality of panoramic dental radiographs. Specifically, this article presents a new algorithm for contrast, detail and edge enhancement of panoramic dental radiographs. The proposed algorithm is called Multi-Scale Top-Hat transform powered by Geodesic Reconstruction for panoramic dental radiography enhancement (MSTHGR). This algorithm is based on multi-scale mathematical morphology techniques. The proposal extracts multiple features of brightness and darkness, through the reconstruction of the marker (obtained by the Top-Hat transformation by reconstruction) starting from the mask (obtained by the classic Top-Hat transformation). The maximum characteristics of brightness and darkness are added to the dental panoramic radiography. In this way, the contrast, details and edges of the panoramic radiographs of teeth are improved. For the tests, MSTHGR was compared with the following algorithms: Geodesic Reconstruction Multiscale Morphology Contrast Enhancement (GRMMCE), Histogram Equalization (HE), Brightness Preserving Bi-Histogram Equalization (BBHE), Dual Sub-Image Histogram Equalization (DSIHE), Minimum Mean Brightness Error Bi-Histogram Equalization (MMBEBHE), Quadri-Histogram Equalization with Limited Contrast (QHELC), Contrast-Limited Adaptive Histogram Equalization (CLAHE) and Gamma Correction (GC). Experimentally, the numerical results show that the MSTHGR obtained the best results with respect to the Contrast Improvement Ratio (CIR), Entropy (E) and Spatial Frequency (SF) metrics. This indicates that the algorithm performs better local enhancements on panoramic radiographs, improving their details and edges.


Introduction
Panoramic dental radiography is one of the most widely used medical imaging techniques, both by the general practitioner and in the various dental specialties [1][2][3]. A good quality of the image obtained is essential to its correct interpretation. This can be affected by various factors such as the device used, the acquisition technique and the subsequent processing of the acquired images [4,5]. One of the limitations of this type of images is that it is a two-dimensional representation of a three-dimensional object, so the different anatomical structures are superposed in the images obtained.
Contrast enhancement techniques not only help the dentist make a better assessment of the radiographs, but they are also used as a preprocessing of other more advanced automatic identification schemes based on deep learning [6]. Many contrasts, brightness, detail and edge enhancement algorithms have been proposed. Histogram-based algorithms are very popular for improving image contrast, brightness and detail. Among the most popular are Histogram Equalization (HE) and Contrast-Limited Adaptive Histogram Equalization (CLAHE) [7]. There are many variants of the histogram-based algorithms, and they have been used to make improvements in different types of images [5,[8][9][10][11][12][13][14][15]. Ahmad et al. [16] compared contrast enhancement techniques based on histograms. These techniques help to improve the visual quality of the images. This allows specialists to better identify pathologies within the images. In addition, Rahmi-Fajrin et al. [12] studied how contrast enhancement results affect the dentist's evaluation. A relatively new contrast enhancement technique is based on mathematical morphology. This uses top-hat operations to extract bright and dark features from the image. These features are finally added to the original image. In this way, the contrast of the images is enhanced [17,18]. In [19], a method for improving chest radiographs that use Top-Hat transformations to iteratively extract useful image features is presented. The selection of the optimal scale is made taking into account the measurement of the contrast enhancement ratio. Other algorithms based on multi-scale mathematical morphology have been proposed more recently to improve the performance of Top-Hat transformations [20][21][22]. These schemes proved to be effective at improving contrast, detail and edges of images, and they have been applied to different types of images satisfactorily [20][21][22][23][24][25][26][27]. In [27], an algorithm using the Top-Hat transformations by reconstruction at multiple scales is presented. This makes it possible to improve the contrast of medical images without distorting them. There are also techniques with hybrid approaches, which consist of the strategic combination of two or more image enhancement techniques [4,[28][29][30]. In [29], a hybrid contrast enhancement scheme based on CLAHE and morphological operations is presented. With this approach, it is possible to enhance contrast and reduce noise in dental X-ray images.
This article presents a novel contrast and detail enhancement algorithm for panoramic dental radiography images. The proposed enhancement approach uses multi-scale mathematical morphology. First, in each iteration, the classic top-hat transform (mask) of the image and the top-hat transform by image reconstruction (marker) are calculated. Then, the marker is reconstructed starting from the mask. Here, only the most important bright and dark anatomical structures that may be present in panoramic dental radiographs are taken into account. Next, the extracted features are fused together by calculating the maxima between all the iterations of the bright and dark scales. Finally, the most important bright and dark areas are added to the original image.
Experimental results were evaluated using metrics that quantify global contrast, local contrast and detail and edge enhancement. Then, dental specialists performed an objective evaluation of the results obtained by the algorithms in a blind way.
The most important contributions of the work are:

1.
A novel algorithm for contrast, detail and edge enhancement of panoramic dental radiographs based on multi-scale mathematical morphology is proposed.

2.
Objective clinical evaluation of the results, obtained by the algorithms, was performed by specialists.
The organization of the article is as follows. Section 2 presents the set of panoramic radiographs and the proposed algorithm. Section 3 presents the experiments, discussions and clinical evaluation of the results. Finally, Section 4 presents the conclusions of the work.

Materials and Methods
This section presents the dataset on which the tests are performed and the proposed algorithm.

Dataset
In total, 598 patients (361 female and 237 male) were selected from consecutive patients undergoing dental panoramic radiography at the Department of Radiology of the Faculty of Dentistry, Universidad Nacional de Asunción. Of these images, 107 images have the following characteristics: complete dentition, without restorations and without radiographically detectable pathologies. Images of this type were then used to make a clinical validation of the results obtained by the different algorithms to be compared in Section 3.4. The mean age was 36.7 years. Written informed consent was obtained from each patient following the school's protocol. The digital radiograph images were stored in jpeg format with a resolution set to 2041 × 1024 pixels. The radiographs were taken between March 2015 and February 2020 using a panoramic radiograph (I-Max touch, Owandy Radiology, France) with a tube voltage of 80 kV, tube current of 9 mA and an acquisition time of 14.4 s. The dataset is available online https://doi.org/10.5281/zenodo.4457648, accessed on 26 January 2021.
The dataset contains mixed and permanent dentition images, with all teeth and missing teeth, no restorations and with different types of restorations. Example panoramic radiographs contained in the database are shown in Figure 1.

Proposed Algorithm
The proposed algorithm, described in this section, is called Multi-Scale Top-Hat transform powered by Geodesic Reconstruction for panoramic dental radiography enhancement (MSTHGR). The proposed algorithm (MSTHGR) is a variation of the method described by Roman et al. [27]. The main variation is in Equations (14) and (15). These equations seek to highlight the differences between the light and dark areas of the image (contrast) without altering too much the naturalness of the image. The results show images with greater detail and sharper edges.
Let I be the original image and H a flat structuring element. The dilation δ H (I) and erosion ε H (I) are defined as follows [31]: where (u, v) and (x, y) are the pixel coordinates of I and H, respectively. The opening and closing operations can be defined from the dilation and erosion operations. Morphological opening [17] is obtained by dilating the image that is first eroded using the same structuring element. Morphological opening of I for a H structuring element is denoted by γ(I, H) and defined as: whereȞ is the reflection of H.
Morphological closing [17] is obtained by eroding the image that is first dilated using the same structuring element. Morphological closing of I for a H structuring element is denoted by φ(I, H) and defined as: If a structuring element is symmetrical, then it is equal to its reflection, i.e., H =Ȟ. Top-hat transform by opening (WTH) [17] is obtained by subtracting from image I its morphological opening γ(I, H), and it is defined as follows: Top-hat transform by closing (BTH) [17] is obtained by subtracting from the morphological closing φ(I, H) the image I, and it is defined as follows: In geodesic transformations, two input images are used. The first image is modified by a morphological transformation and restricted above or below the second image. The morphological transformations allowed are erosion and dilation [32].
Let g be the marker image and I be the mask image and both have the same domain (D g = D I and g ≤ I). The geodesic dilation of size 1 or δ (1) I (g) is defined as the minimum point to point between I and the dilation of g, i.e., δ (1) If we perform m times the geodesic dilation of g with respect to I, we have to δ (m) Geodesic dilation of g from I iterated to stability is called dilation by reconstruction [32] and is defined as: where s is such that δ (s) . Let g be the marker image and I be the mask image and both have the same domain (D g = D I and g ≥ I).
The geodesic erosion of size 1 or ε (1) I (g) is defined as the maximum point to point between I and the erosion of g, i.e., ε (1) If we perform m times the geodesic erosion of g with respect to I we have to ε (m) Geodesic erosion of g from I iterated to stability is called erosion by reconstruction [32] and is defined as: where s is such that ε (s) . Opening by reconstruction [32] of an I image is defined as the reconstruction of I from the m size erosion of I: γ (m) where I is the mask image, ε H m (I) is the marker image and m is a scale factor of the structuring element. If H m is convex, then it is obtained as follows: where ⊕ is the operator of binary dilation. Binary dilation is the sum (vector) of all possible pairs of coordinate points of the H 1 set. That is, let p and q be the spatial coordinates of H 1 , then Closing by reconstruction [32] of an I image is defined as the reconstruction of I from the m size dilation of I: φ (m) where I is the mask image and δ H m (I) is the marker image.
Structures removed by the opening by reconstruction can be recovered by the white top-hat transform by Reconstruction (RWTH) [32]: Similarly, structures removed by the closing by reconstruction can be recovered by the dark top-hat Transformation by Reconstruction (RBTH) [32]: The multiple features of the bright areas are obtained, which are extracted by RTH [33] as follows: where WT i = WTH i (I, H i ) is the mask image obtained by Equation (5), is the marker image obtained by Equation (12), RTH i are the i-scales of brightness that are extracted from the image and i = {1, 2, 3, ..., n}.
Similarly, the multiple features of the dark areas of the image are extracted using RBH [33] as follows: where BT i = BTH i (I, H i ) is the mask image obtained by Equation (6), R (I) − I is the marker image obtained by Equation (13) and RBH i are the i scales of darkness extracted from the image.
The subtractions between the multiple scales of the bright regions of the image are obtained as follows [27]: Similarly, the subtractions between the multiple scales of the dark regions of the image are obtained as follows [27]: The maximum is obtained from all the multiple scales obtained in the different stages. The maximum bright and dark scales, extracted from the image, are calculated as follows: Figure 2 shows the bright and dark areas (maximum) extracted at the multiple scales. The pixels in Figure 2a,b were multiplied by a constant equal to 10, and then their complement was calculated. This is to better highlight the contour of the teeth. These operations were made for better visualization by the reader and they are not real operations applied to the algorithm. All maximum bright and dark scales, extracted from the image by subtraction, are obtained as follows: Figure 3 shows the maximum of the differences in the bright and dark areas. The pixels in Figure 3a,b were multiplied by a constant equal to 10, and then their complement was calculated. This is to better highlight the contour of the teeth. These operations were made for better visualization by the reader and they are not real operations applied to the algorithm. Finally, image enhancement is carried out as follows: where I E is the panoramic dental radiography with contrast enhancement. Figure 4 shows the final process of enhancing panoramic radiographs. The pixels in Figure 4a,b were multiplied by a constant equal to 10, and then their complement was calculated. This is to better highlight the contour of the teeth. These operations were made for better visualization by the reader and they are not real operations applied to the algorithm.

Edge Detection or Segmentation Application
Image enhancement algorithms are commonly used to adjust images, either for visual interpretation or as preprocessing for other algorithms such as edge detection or segmentation. The image features extracted by segmentation or edge detection algorithms are then used by classifiers to determine to which group the observed object belongs. An application that consists of first applying an edge detection (for example Sobel's algorithm) to the panoramic radiograph and then a thresholding algorithm to decompose it into its most representative parts can be seen in Figure 5. The Sobel algorithm performed better edge detection in the enhanced image and its thresholding (algorithm based on maximum entropy [34]) shows more representative parts of the image, as can be seen in Figure 5d,f.
Another potential utility of enhanced panoramic radiographs could be their use in a learning environment, for example teaching and practicing interpretation of normal anatomical structures in panoramic radiographs.

Results and Discussion
This section presents the experimental results carried out to validate the proposed algorithm. To successfully validate the proposed algorithm, two objectives were set: • To quantify the performance of the proposed algorithm in terms of improving panoramic dental radiography. For this purpose, comparisons were made against other state-ofthe-art algorithms and evaluation metrics were used to quantify the numerical results obtained by the algorithms. • Analyze clinically in an objective way how contrast enhancement algorithms affect panoramic radiographs. For this purpose, dentists performed a visual evaluation and objectively assess a sample of the results obtained.

Assessment Metrics
The results were evaluated with the following metrics: • Relative Enhancement in Contrast (REC) [35,36] quantifies the contrast of the enhanced panoramic radiography. The greater the REC is, the better contrast the dental image will have. REC is defined as, where I is panoramic dental radiography, I E is dental imaging with contrast enhancement and C is image contrast. C is defined as, where M × N are the dimensions of the dental image and (u, v) are the spatial coordinates. • Contrast Improvement Ratio (CIR) [37] quantifies the local contrast of the enhanced medical image. The greater the CIR is, the better local contrast the medical image will have. CIR is defined as, where ω is local contrast of original dental imaging,ω is local contrast of enhanced dental imaging and D is the domain of values. ω is defined as, where ρ is center pixel and ι is the average of the neighboring values in a window of 3 × 3. • Entropy (E) [11,24,36], in digital image processing, is used to quantify the details or features of the image. The greater is the E, the better is the detail. E is defined as, where k is intensity of the pixel in the image, P(k) is probability of occurrence of the k-value in the image, b is number of bits of the image and L is equal to 2 b and b = 8 for grayscale images. • Spatial Frequency (SF) [38], in digital image processing, is the metric that quantifies the spatial information contained in the image. If SF has a large value, the enhanced panoramic radiograph is considered to have more spatial information. SF is defined as follows: where • Peak signal-to-noise ratio (PSNR) [22,27], in digital image processing, is the metric adopted to quantify the distortion introduced in the image enhancement process. If PSNR has a large value, the enhanced panoramic radiograph is considered to have less distortion. PSNR is defined as follows: PSNR(I, I E ) = 10 × log 10 (L − 1) 2
The Mean Squared Error (MSE) is defined as: • Absolute Mean Brightness Error (AMBE) [22], in digital image processing, is the metric that quantifies the average brightness preservation of enhanced panoramic radiographs. If AMBE has a small value, the enhanced panoramic radiograph is considered to have preserved its average brightness. The AMBE is defined as follows: where A(I) is the average brightness of the panoramic radiographs and A(I E ) is the average brightness of the panoramic radiographs with contrast enhancement.
The MSTHGR and GRMMCE algorithms have the following parameters: original image I, number of iterations n = 7 and a disk shape structuring element with initial radius r = 1, where the radius increases in each iteration in a range r = {1, 2, 3, · · · , n}. Bai [42] used a small number of iterations, because the best details that can be extracted from the image are at small scales. Therefore, in this experiment, we used the number of iterations n = 7.
The CLAHE and GC algorithms were implemented in MATLAB 2014b. The parameters used were the default ones.

Numerical and Visual Results
The algorithms were tested on the 598 panoramic radiographs. Table 1 shows the average numerical results obtained by the algorithms. The two best average results are highlighted in bold. The MSTHGR algorithm obtained high average results in the CIR, E and SF metrics. However, it is also competitive in the other metrics. The proposed MSTHGR method is slightly better than GRMMCE (REC) in terms of contrast, but it is worse in terms of noise (PSNR) and Absolute Mean Brightness Error (AMBE). This is because the contrast enhancement is in trade-off relation to noise and average brightness. The better is the contrast values (REC), the worse are the PSNR and AMBE values. This can be seen in Figure 6. However, the improvement obtained by the MSTHGR method achieves better clinical assessments by dentists (this can be seen in Section 3.4). Figure 6 shows the results of each metric in box plots. It can be observed that MSTHGR obtained less dispersed numerical values for the E and AMBE metrics. The values obtained by MSTHGR in the E, PSNR and SF metrics had a similar dispersion to the set of algorithms that integrate this study. It is also possible to observe that MSTHGR obtained values for the CIR metric with a similar dispersion to GC, but relatively higher than that obtained by the other algorithms. The statistical analysis was carried out by means of non-parametric tests considering the amount of data in the database. Paired observations were made through the Wilcoxon Signed Rank Test [43], taking as pairs the results of each algorithm with respect to the proposed algorithm. The results of the Wilcoxon Signed Rank Test are presented in Table 2. The p-value close to zero (≈0) in the Wilcoxon signed-rank test for most of the paired observations leads to the conclusion that there are statistically significant differences between the medians obtained by the proposed MSTHGR algorithm and the other algorithms. Figure 7 shows that the panoramic dental radiographs, enhanced with the MSTHGR algorithm, presented a greater definition at the edges of the teeth in general, as well as a better visualization of the different structures, such as enamel, dentin and pulp chamber, which compose them. In addition, they allowed a visualization of the restorations at the coronary level in the cases where they were present. At the root level, the light of the root canals could be observed with greater definition. At the level of the mandibular condyle, a better definition of the edges could be observed as well as a better observation of the bone trabeculae. In the regions of the maxillary sinuses and inferior dental canal, no great variations were found in comparison with the original images.

Clinical Validation and Prospects
The objective of the clinical validation is to quantify how the enhancement algorithms affect panoramic radiographs from the perspective of the dentists. In other words, the aim is to check whether the results obtained in the previous experiment are related to those observed by the dentists. For this purpose, 20 sample images were first taken from a total of 107 images with the following characteristics: complete dentition, without restorations and without radiographically detectable pathologies. This represents a sample with a 22% error rate and a 99% confidence rate. Next, these 20 images were processed with the MSTHGR, GRMMCE, HE, BBHE, DSIHE, MMBEBHE and QHELC algorithms and presented to a group of three dental specialists for qualitative evaluation. The algorithms were anonymized by a numerical code as follows: BBHE (1); DSIHE (2); HE (3); MMBEBHE (4); MSTHGR (5); GRMMCE (6); QHELC (7); CLAHE (8); and GC (9). The dentists performed an evaluation of the improved radiographs with respect to the original image. The observation was made in seven different anatomical regions: maxillary anterior teeth, maxillary posterior teeth, maxillary sinuses, mandibular anterior teeth, mandibular posterior teeth, mandibular condyles and mandibular canals. For each region, the scores were: 0 (worse than the original), 1 (no variation) and 2 (better than the original). Therefore, 9 algorithms × 20 images × 7 regions were analyzed, making a total of 1260 regions analyzed.

Statistical Analysis
The sum of scores obtained in the seven anatomical regions for each enhancement/ algorithm was the dependent variable treated as numerical data. Interobserver agreement was determined by the intraclass correlation coefficient (ICC). The criteria for strength of agreement proposed by Koo and Lee [44] were used for ICC interpretation: 0.00-<0.50, poor agreement; 0.5-0.75, moderate agreement; >0.75-0.90, good agreement; and >0.90, excellent agreement. Normality (Shapiro-Wilk) and Homogeneity of Variance (Levene) tests were statistically significant (p < 0.05). Therefore, a Kruskal-Wallis test was run to determine if there were differences in median sum of scores according to enhancement/algorithm. Statistical analysis and graphical representation of data were performed with R version 3.6.0 at a 5% significance level.

Descriptive Statistics
Interobserver agreement was good (ICC = 0.835, 95% CI: 0.779-0.877). The Kruskall-Wallis test was statistically significant (p < 0.001). The results of the multiple comparisons using the Dunn test with Benjamini-Hochberg adjustment are shown in Table 3 (first column). In the box and whisker plot (Figure 8), the medians are marked with a horizontal line in the box. The lower and upper limits of the box are the first (Q 1 ) and third (Q 3 ) quartiles, respectively. Values below Q 1 and over Q 3 are located in the whiskers. Outliers are represented by open dots. In general, we can conclude that the algorithm MSTHGR improves the visual quality of the images with respect to the compared algorithms.

Usefulness for Diagnosis in Clinical Settings
The proposed algorithm allowed a clear observation of the teeth as well as the other anatomical regions analyzed in the selected images. Moreover, the different dental hard tissues (enamel-dentin junction), root canals and periodontal ligament were clearly visible.

Conclusions
Contrast and detail enhancement of panoramic radiographs helps dentists better evaluate the anatomical structures of the teeth present in the image. For this reason, an algorithm for contrast and detail improvement of panoramic dental radiographs is presented in this work. In addition, the help of dental specialists in the quantification of the results obtained by the algorithms is highlighted. They objectively evaluated the real impact of the improvements and how they affected the panoramic dental radiographs.
Experimentally, the numerical results show that the MSTHGR obtained the best results with respect to the CIR, E and SF metrics. This indicates that the proposal makes local improvements to the panoramic radiographs, enhancing their details and edges. With respect to the REC, PSNR and AMBE metrics, the proposal improves the global contrast of the radiographs, introduces less distortion to the image and preserves the average brightness. Even though its numerical results are inferior to some algorithms, the proposed method proved to be competitive.
The visual results obtained by the algorithms were clinically evaluated by specialist dentists. In general, according to the evaluations, the MSTHGR algorithm was better at enhancing the visual quality of panoramic dental radiographs.
As future work, quantitative evaluations of the improvements made to the images by areas of interest can be performed. In addition, this algorithm can be used as a preprocessing of other applications for automatic detection of pathologies affecting bone (cysts and tumors) or teeth (resorptions and caries).