Keywords

1 Introduction

Enamel caries, dentin caries and calculus are common dental lesions. It can be challenging to detect them by visual observation, even with assisted white light transillumination. Intraoral X-ray is also used in clinical practice, but it provides only a 2D illustration from a limited imaging angle and the patient is exposed to ionizing radiation. As complications created by dental lesions can be avoided if the changes on tooth surfaces are identified at an early stage, efficient lesion detection methods are in demand. Spectral imaging is used in many fields of research, including medical imaging [1]. Spectral imaging differs from conventional one-band grayscale and three-band Red/Green/Blue (RGB) imaging in a sense that spectral images typically contain more than three wavelength bands. Therefore, spectral images contain more wavelength-dependent information from the target-of-interest. The visibility of features in a spectral image can be improved further by using spectral image enhancement methods [2, 3].

In this study, spectral reflectance images captured from 16 extracted human teeth were used as a data set. All spectral images in the set contained dental lesions, especially caries and calculus. The goal of the study was to use spectral image enhancement to improve the visibility of these lesions [4]. The optimal spectral band weights for the spectral image enhancement were determined with the Particle Swarm Optimization (PSO) algorithm [5].

The task of the PSO algorithm was to maximize grayscale contrast between lesion and non-lesion areas in a tooth image. The results of the optimization, i.e., the optimal spectral band weights and the resulting grayscale and RGB presentations of the enhanced spectral images are presented. In the future, the obtained optimal spectral band weights could be used together with hand-held spectral cameras for near-real-time dental lesion detection at dental clinics.

The paper is organized as follows: In Sect. 2.1, details of the extracted tooth samples and spectral image acquisition are given. In Sect. 2.2, the spectral image enhancement method used in this study is described. In Sect. 2.3, brightness normalization, RGB image calculation and Particle Swarm Optimization are described. Results and discussion are in Sect. 3 and Conclusions are in Sect. 4.

2 Materials and Methods

2.1 Human Tooth Samples and Spectral Imaging

In this study, 16 extracted human teeth (14 molars and 2 incisors), which contained various dental lesions, were used as samples. The teeth were extracted at the Dental School Clinic of the University of Eastern Finland (Kuopio, Finland) due to periodontitis, periapical lesions, decay or pericoronitis. The ground truth data for the extracted teeth was provided by dental experts. The samples were gently rinsed with isotonic 0.9% saline solution, dehydrated and stored at room temperature. The observation was performed on dry tooth samples.

Spectral reflectance images were captured from the tooth samples using a Specim VNIR imaging spectrograph (Specim, Spectral Imaging Ltd., Finland). Spectral images were acquired in the wavelength range of 400–1000 nm, by an average step of 2.8 nm. All spectral images contained 240 wavelength bands. During spectral imaging, the teeth were illuminated by halogen lights. A spectral reflectance image was acquired from the side and from the occlusal surface of each tooth (see the top row of Fig. 1). Ultimately, a set of 31 spectral reflectance images were used as data: 16 images from the occlusal surface and 15 images from the side of each tooth. For one tooth, only the spectral image of the occlusal surface was used as the sides of the tooth contained no lesions.

Fig. 1.
figure 1

Flowchart of spectral reflectance image acquisition (top row), contrast value calculation for original spectral image (middle row), and for enhanced spectral image (bottom row). Here, x and y are spatial coordinates, \(\lambda \) is the wavelength, \(R_{\mathrm {ref}}(\lambda )\) is the spectral reflectance of the reference sample, and VIS is the visible range of light (380–780 nm). See also Sect. 2.3 and Algorithm 1.

2.2 Spectral Image Enhancement

The spectral image enhancement method used in this study is described in detail in Ref. [4]. Here, a brief outline of the method is given. A reflectance spectral image \(R_{\mathrm {sample}}(x,y,\lambda )\) is a data cube containing X rows, Y columns and N spectral bands. The spectral image is enhanced as follows: first, principal component analysis (PCA) is used for calculating an estimate of the original spectral image [6]. This PCA estimate is calculated using m principal components (\(m<N\)). Next, the PCA estimate is subtracted from the original spectral image:

$$\begin{aligned} \mathbf {s}_{\mathrm {diff}}(x,y)=\mathbf {s}_{0}(x,y)-\mathbf {\hat{s}}(x,y), \end{aligned}$$
(1)

where \(\mathbf {s}_{0}(x,y)\) and \(\mathbf {\hat{s}}(x,y)\) are spectra from spatial coordinates (xy) in the original spectral image and in the PCA estimate, respectively.

In multiband spectral image enhancement, vector \(\mathbf {g}=\mathbf {s}_{\mathrm {target}}-\mathbf {s}_{\mathrm {mean}}\) is the difference between a selected target spectrum \(\mathbf {s}_{\mathrm {target}}\) and the mean spectrum of the original spectral image \(\mathbf {s}_{\mathrm {mean}}\). Target spectrum is the spectrum of the color to be used for the enhanced visualization of the spectral features. In an enhanced spectral image \(R_{\mathrm {enh}}(x,y,\lambda )\), each pixel (xy) contains a spectrum

$$\begin{aligned} \mathbf {s}_{\mathrm {enh}}(x,y) = \mathbf {g}\mathbf {k}^{\mathtt {T}}\mathbf {s}_{\mathrm {diff}}(x,y)+\mathbf {s}_{0}(x,y), \end{aligned}$$
(2)

where \(\mathbf {k}=[k_{1},k_{2},\ldots ,k_{N}]^{\mathtt {T}}\) contains the weights for the N wavelength bands.

2.3 Brightness Normalization, RGB Images and Particle Swarm Optimization

Brightness normalization was applied to all spectral tooth images in order to remove the effect of uneven illumination. First, an illumination map was obtained for each spectral band separately by convolving the original spectral bands with a Gaussian filter (standard deviation: 20 pixels; size: 20 \(\times \) 20 pixels). Secondly, an average illumination map was calculated by taking the mean of all the band-specific illumination maps. Finally, the original spectral bands were divided by the average illumination map. Here, the use of division produces an even illumination field across the image while preserving the image contrast.

An RGB image was calculated from a spectral image as follows: CIE XYZ tristimulus values were calculated from the spectral data for CIE D\(_{65}\) daylight illuminant and CIE 1931 standard observer, followed by conversion to RGB [7]. For contrast evaluation, RGB images were transformed into grayscale images. All numerical computations were done in MATLAB (The MathWorks, Inc., USA).

Particle Swarm Optimization (PSO) is an iterative optimization scheme based on swarm intelligence [5]. Let \(t_{\mathrm {max}}\) be the maximum number of iterations allowed for the optimization. First, a swarm of M particles is initialized randomly in the solution space. After this, each particle’s velocity and position are updated during each iteration loop according to the following rules:

$$\begin{aligned} velocity _{i}(t+1)\leftarrow & {} C_{0} velocity _{i}(t) + C_{1}\mathbf {r}_{1}\left( localBest _{i} - position _{i}(t)\right) \nonumber \\&+\; C_{2}\mathbf {r}_{2}\left( globalBest - position _{i}(t) \right) \\ position _{i}(t+1)\leftarrow & {} position _{i}(t) + velocity _{i}(t+1),\nonumber \end{aligned}$$
(3)

where \( velocity _{i}\) and \( position _{i}\) are the velocity and position vectors for the \(i^{\mathrm {th}}\) particle in the swarm (\(i=1,\ldots ,M\)), respectively. Here, t is the number of the iteration loop (\(t=1,\ldots ,t_{\mathrm {max}}\)), and \(\mathbf {r}_{1}\) and \(\mathbf {r}_{2}\) are vectors of random values from range [0, 1]. Constant \(C_{0}\) is inertia, and \(C_{1}\) and \(C_{2}\) are the weights each particle gives to the best solution it has found so far (vector localBest) and to the best solution the entire swarm has found so far (vector globalBest), respectively.

In this study, all the vectors above were N-dimensional vectors, where N is the number of wavelength bands in the spectral image (\(N=240\)). The parameters for the PSO were as follows: number of particles \(M=500\), \(t_{\mathrm {max}}=100\), \(C_{0}=0.95\), \(C_{1}=2\), and \(C_{2}=2\). Additionally, for the iteration, the following stopping condition was used: if the best solution found by the swarm (i.e., globalBest) does not change during three consecutive loops, the current globalBest is considered to be the final solution of the optimization. As with all optimization methods, it is possible that the globalBest solution produced by PSO is only a local optimum and not a global optimum of the solution space. For the spectral image enhancement, the following settings were used: the PCA estimate for Eq. (1) was calculated using the three most significant principal components, and the target color spectrum \(\mathbf {s}_{\mathrm {target}}\) was set to black (i.e., a vector of zeros). The weights in \(\mathbf {k}\) were allowed to have any values within the range \([-1,1]\). A detailed description of the PSO routine used in this study is given in Algorithm 1.

The task of PSO was to find the spectral band weights for the enhancement which maximize Michelson constrast value between user-selected lesion and non-lesion areas \(A_{1}\) and \(A_{2}\). Michelson contrast c is defined as follows:

$$\begin{aligned} c = \frac{max\{p_{1},p_{2}\}-min\{p_{1},p_{2}\}}{max\{p_{1},p_{2}\}+ min\{p_{1},p_{2}\}}, \end{aligned}$$
(4)

where \(p_{1}\) and \(p_{2}\) are the mean grayscale pixel values from areas \(A_{1}\) and \(A_{2}\), respectively. As some lesions were relatively small in size, the size for \(A_{1}\) and \(A_{2}\) was chosen to be \(3 \times 3\) pixels. Lesion/non-lesion pairs were selected from applicable spectral tooth images for the following lesion types: early-stage initial caries (11 pairs), initial caries (9 pairs), progressed caries (8 pairs), and white calculus (8 pairs). In all cases, non-lesion areas were selected from healthy enamel.

figure a

3 Results and Discussion

The goal of optimization was to maximize grayscale Michelson contrast between two selected areas in an image. The resulting average contrast values, calculated from all pairs of a selected lesion type for the original and enhanced images, are shown in Table 1. Also, the improvements gained by enhancement are given. The personal computer used for the optimization had an Intel i5-7200U processor (2.50 GHz) and 16 GB of RAM. The optimization was relatively slow: for a single lesion/non-lesion pair, PSO required on average 41 and 138 min for occlusal surface and side-view spectral images, respectively. For all pairs, the stopping condition was reached (average: 17 iteration loops). The long PSO-times are partially due to the relatively large number of spectral bands (\(N=240\)).

Table 1. Average Michelson contrast value of all selected pairs for original and enhanced grayscale images, and improvement gained by enhancement.
Fig. 2.
figure 2

Early-stage initial caries: example results for average weights from PSO, and for one pair (blue/red points). Using average weights, \(c_{\mathrm {orig}}\,=\,0.0351\) and \(c_{\mathrm {enh}}\,=\,0.0535\), and using individual weights \(c_{\mathrm {enh}}\,=\,0.1286\) for the displayed pair. (Color figure online)

Fig. 3.
figure 3

Initial caries: example results for average weights from PSO, and for one pair (blue/red points). Using average weights, \(c_{\mathrm {orig}}\,=\,0.0034\) and \(c_{\mathrm {enh}}\,=\,0.0343\), and using individual weights \(c_{\mathrm {enh}}\,=\,0.5160\) for the displayed pair. (Color figure online)

Fig. 4.
figure 4

Progressed initial caries: example results for average weights from PSO, and for one pair (blue/red points). Using average weights, \(c_{\mathrm {orig}}\,=\,0.2629\) and \(c_{\mathrm {enh}}\,=\,0.4843\), and using individual weights \(c_{\mathrm {enh}}\,=\,1.0\) for the displayed pair. (Color figure online)

For both caries and calculus, the resulting wavelength band weights \(\mathbf {k}\) from PSO exhibit a relatively large amount of variance across the wavelength range (see Figs. 2(d), 3(d), 4(d) and 5(d)). The mean of the weights \(\mathbf {k}\) differs strongly from the results for individual pairs (e.g., see Figs. 2(c) and (e); analogously for Figs. 3, 4 and 5). The most probable explanation for this is that the optimization for each lesion/non-lesion pair ended in a local optimum. Using a larger number of particles in PSO could solve this issue. Naturally, this would increase the computational time needed for optimization. Nonetheless, for all selected pairs, the contrast in the enhanced images was larger than in the original images (Figs. 2, 3, 4 and 5, (a) and (b)).

Fig. 5.
figure 5

White calculus: example results for average weights from PSO, and for one pair (blue/red points). Using average weights, \(c_{\mathrm {orig}}\,=\,0.0061\) and \(c_{\mathrm {enh}}\,=\,0.0863\), and using individual weights \(c_{\mathrm {enh}}\,=\,0.1822\) for the displayed pair. (Color figure online)

4 Conclusions

In this paper, spectral image enhancement was applied to spectral reflectance images of extracted human teeth for the visibility enhancement of dental lesions (caries and calculus). Optimal wavelength band weights for different lesion types were obtained with Particle Swarm Optimization (PSO). In all cases, spectral image enhancement improved the contrast between lesion and non-lesion areas. In the future, optimization could be performed with a larger number of lesion/non-lesion pairs and particles in PSO. Also, the applicability of the obtained results will be tested with a hand-held spectral camera in the dental clinic.