Computational Filters for Dental and Oral Lesion Visualization in Spectral Images

Clinically interesting low-contrast dental and oral features can be challenging to detect. In visual observation and clinical photographs, identification of low-contrast features can be hard or even impossible. Imaging methods, e.g., X-ray and magnetic resonance imaging, provide more information but often require use of ionizing radiation, expensive equipment, and specialized personnel to operate the devices. A cost-effective, non-ionizing, contrast-enhancing imaging method that can be used at any dental clinic is in great demand. Here we show a dental and oral feature visibility-enhancement based on a portable spectral camera and computational filters derived from principal component analysis. By applying computational filters on oral and dental spectral images, selected features of clinical interest can be highlighted against their surroundings. Due to the lack of information available in standard color images, this visibility-enhancement technique can only be realized using spectral images. Oral and dental spectral imaging does not use ionizing radiation, and modern spectral cameras are small, portable, and can be used without specialized training. In this paper, spectral image-based visibility-enhancement is demonstrated for the following cases: gingival recession, calculus, gingivitis, root caries, secondary caries, Fordyce’s granules, leukoplakia, and pigmentous lesions. The results gained with spectral images and computational filters from principal component analysis are compared against regular color images and grayscale images computed with band-pass filters from our earlier work. The results are promising as the visibility and contrast of the features of interests are enhanced in all the studied cases. This study provides a starting point for future research and demonstrates the applicability of spectral imaging-based methods for practical use at dental clinics.


I. INTRODUCTION
Caries, the most prevalent chronic endemic disease, and periodontitis are inflammatory diseases considered as a major cause of tooth loss. The chronic nature of these diseases manifests from slow lesion progression. Even though there has been considerable improvement in dental care, severe periodontitis is still found worldwide in approximately 11% The associate editor coordinating the review of this manuscript and approving it for publication was Jingang Jiang . of the adult population [1]. The standard diagnostic approach in clinical and radiological investigations of both caries and periodontal diseases rely on visual and morphological changes associated with these diseases, which makes early prediction challenging. Specifically, the current diagnostic techniques for caries are unable to detect the lesions until they are relatively well advanced and involve one-third or more of the thickness of the enamel. However, the slow progression of caries lesions offers a window of opportunity for intervention to reverse the loss of minerals or arrest lesion progression before irreversible damage develops on the dental hard tissues. Taking advantage of this window, however, necessitates development of techniques for early detection.
Periodontal probing is considered a necessity in diagnostics of periodontal diseases. The pocket depth, bleeding, and the amounts of plaque, supra-and subgingival calculus are assessed with the probe. This diagnostic procedure, however, may induce bacteremia. In some cases, especially in clinically compromised patients, invasive actions cannot be performed due to risk of systemic infection, for example. For these patients, noninvasive methods for periodontal diagnostics are warmly welcome.
Lesions may also exist on the oral mucosa. White lesions, including leukoplakia, hyperkeratosis, and Fordyce's granules, are relatively common in the oral cavity [2]. Leukoplakias, hyperkeratotic epithelia, may be related to mucocutaneous diseases [3]. Besides this, white hyperkeratotic lesions may also be caused by chronic irritation, e.g., tobacco, snuff, and mechanical irritation. In such case, the lesion may possibly disappear when the chronic irritation is removed. The oral mucosa may also present another lesion-like white spots unrelated to leukoplakias or hyperkeratosis: Fordyce's granules (sebaceous glands), which are normal variations in the subepithelial stroma. In the clinic, the diagnosis of oral mucosal lesions begins with a conventional oral examination and palpation followed by a scalpel biopsy for histopathological diagnosis. Development of non-invasive and fast diagnosis methods is thus warranted.
Major part of the dental imaging technology in use in clinical practice is based on the X-ray radiation. Panoramic radiographs and computed tomography scans reveal the anatomical and pathological structures of the teeth and alveolar bone, but they not only expose the patient to ionizing radiation and, in some cases, to non-risk-free contrast agents [4], but also require specialized personnel to safely operate the devices [5]. Due to the associated risks, the barrier for imaging is higher. However, treatment planning and patient education can benefit from images, and an increasing number of dental professionals have been including digital photography as a part of patient visits [6].
Discerning dental and oral lesions from their surrounding healthy tissue on intraoral digital photographs can be challenging due to subtle visual differences. The color characteristics of abnormalities in their early stages may remain largely unchanged. While photo editing software can improve the images to some extent, there is a fundamental technical limitation: color digital photography relies on an array of photosensitive sensors with wide spectral sensing range. The sensors have three different types, red, green, and blue, approximately matching the three cone cell types found in the human eye. Each of these sensor types is sensitive to a wide spectral range within the visible region of light and as such have limitation in data acquisition: each pixel in the image describes the color by only three values. This limitation can be overcome with digital spectral imaging [7].
Digital spectral cameras typically divide the light coming to the camera into narrow wavelength bands. These narrow bands allow for more accurate acquisition of the reflectance of a sample: each pixel in the image becomes a vector of intensities at different wavelength bands. A modern spectral camera can record hundreds of bands in the visible and near-infrared region [7]. Additionally, these devices are becoming smaller and increasingly mobile [8].
Like digital photography, spectral imaging can be limited to the visible light range of the electromagnetic spectrum. Often, though, some parts of the infrared region are also included into the imaging range. The use of visible and nearinfrared range is safe as the radiation is non-ionizing. The extended wavelength range and the large number of wavelength bands enables early detection of physiological changes by the changes in their reflectance spectrum [7]. Furthermore, reflectance spectral imaging does not rely on any contrastagents and is a non-contact detection method.
Spectral imaging, however, produces drastically more data than ordinary optical photography, which necessitates alternative analysis methods. In the context of visualization, the choice of the methodology depends on the aim of the analysis: a computational simulation of an optical system for enhancing an interesting feature necessitates methods that are implementable optically -at least partially, whereas a software-based visualizations may apply methods of arbitrary complexity. The simulations primarily produce optimized filters or illuminations. Typically, these are narrow-band spectra and combinations thereof [9], [10], though enhancement can be done with suitably chosen white light also [11]. This category may also include computational high-frequency filters [12], but these are unlikely implementable optically, as speculated in [13]. Purely computational methods may use statistical properties of the spectral image to produce enhanced images. One popular statistical method to handle spectral data is principal component analysis, PCA [14], [15]. PCA finds the directions of largest variances in a multidimensional dataset. In [16] and [17], PCA is used to estimate the spectral image through dimensionality reduction. The estimate's difference to the original spectral image is weighted with the spectrum of a target feature in order to enhance the visibility of the feature. In [18], multivariate histogram is used to enhance the visualization of remotesensed landscape. Machine and deep learning solutions, especially, enable classification of the spatial and spectral data, allowing the merging of the visualizations with specific semantic meanings allowing, e.g., tumorous tissue demarcation [19], [20].
In this paper, the computational simulation approach is taken by studying the PCA of spectra of oral and dental lesions and their surrounding area. Mathematically, the directions found with PCA can be interpreted as computational filters, a subset of which improve the contrast of clinically interesting, but normally low-contrast features. The result of the study is a set of novel partially negative computational filters that, when applied on oral and dental spectral images, produce contrast-enhanced grayscale images with high contrast between the lesions and their surroundings. The performance of the filters is quantified with Michelson contrast and is compared to grayscale versions of the RGB-color images, and grayscale images computed with fully positive filters from our previous study [10]. The partially negative filters found are optically implementable, e.g., using method of [13].

II. MATERIAL AND METHODS
A spectral reflectance image R(x, y, λ) is a multidimensional array of size X × Y × N , where x ∈ [1, X ] and y ∈ [1, Y ] are spatial coordinates, and λ is wavelength. Let λ i , i ∈ [1, N ] be a wavelength band. The spectral image can be computed from image acquisition data using the well-known flat-field correction [7]: where s s (x, y, λ i ) is the sample measurement, s r (x, y, λ i ) is a reference sample measurement, s d (x, y, λ i ) is a dark-current measurement, and finally R r (λ i ) is the reflectance spectrum of the reference sample. The contrast-enhancement method is briefly described in the flowchart presented in Fig. 1 summarizing the steps taken.

A. OPTICAL SETUP
We constructed an optical imaging system for dental and oral spectral imaging. The system mainly consists of a spectral camera, a halogen light source (Thorlabs OSL2, Thorlabs Inc., USA), and a chin-forehead rest. In the beginning of the imaging project, we used Nuance EX (CRI, USA) spectral camera that supports the spatial resolution of 1392 × 1040 pixels and spectral resolution from 450-950 nm with 10 nm steps giving 51 spectral bands. Later, the camera was replaced with Specim IQ (Specim, Spectral Imaging Ltd., Finland), which has a smaller spatial resolution of 512 × 512 pixels but an extended spectral resolution from 400-1000 nm with 204 bands (≈3 nm step). Only the spectral images captured with the latter were used for PCA due to the wider spectral range and narrower bands. The computational filters gained from PCA, however, were applied on spectral images originating from both devices.
During imaging, a test subject places their chin and forehead on the rest to prevent involuntary head movements. The area of interest is illuminated by the halogen light source via a ring illuminator (FRI61F50, Thorlabs Inc., USA) and is imaged by the spectral camera attached on its platform. A reference sample s r (x, y, λ), matt diffuse gray ceramic sample (''Matt Diff Grey'', Ceram Research, Ltd., UK), is also imaged for normalization purposes as per (1) once per imaging geometry.

B. TEST SUBJECTS
The research ethical permission was granted by The Hospital District of Northern Savo, Kuopio, Finland (413/2016).
In accordance to the informed consent principle, the volunteering test subjects were fully informed about the research and gave their written consent concerning the imaging and the use of the acquired spectral images prior to spectral imaging. This study covers data from a total of 22 test subjects.
For the assessment of caries, the International Caries Detection and Assessment System II (ICDAS II) [22] was applied so that first visible sign of non-cavitated caries were included. Cavitated lesions were excluded.

C. DATABASE
Using the optical setup, we have spectrally imaged the test subjects, and constructed a database of dental and oral spectral images. The spectral images have been annotated by experienced dentists (HJ, AK) with a custom-made software. This study was conducted with 116 annotated spectral images of 22 test subjects. Spectral images of the face, and maxillary and mandibular teeth were acquired of each test subject. Parts of the oral mucosa, or tongue were imaged on case-by-casebasis as deemed necessary.
The spectral images were segmented manually into classes, like oral mucosa, enamel, calculus, marginal and attached gingiva, and gingivitis. These classes allow automatic extraction of the associated spectra. The spectral image database has been published [21] and is freely available (https://sites.uef.fi/spectral/odsi-db/).

D. PRINCIPAL COMPONENT ANALYSIS
Principal component analysis (PCA) is a widely used statistical method for finding the directions of maximum variance from a numerical data set [14], [23]. PCA is used, e.g., in lossy data compression for excluding unimportant features [15], in machine learning for preprocessing data [24], and in machine vision applications for enhancing the visibility of desired features in an image scene [25].
We used PCA [23] to find the directions of the largest variances in specifically chosen datasets and treated the resulting directions (eigenvectors) as computational filters. Mathematically, a computational filterê(λ) applied on a spectral image R(x, y, λ) produces a singular weighted sum image of all band images of a spectral image: We call this grayscale sum image I (x, y) an inner product image.
We formed a set of contrast-enhanced images and their associated computational filters as per Algorithm 1. For training, 1000 random spectra were selected per class. The classes were used to form combinations of the spectra of an interesting feature (a lesion) and the spectra of a complementary type (tissue surrounding the lesion). For example, for a filter designed to highlight calculus, the spectra of interest would be of calculus class and the complementing class spectra of enamel. The process produced an initial set of over two FIGURE 1. Computational filter creation and application process: 1) oral and dental spectral imaging and annotation of the spectral images to form a database [21], 2) extraction of annotated oral and dental spectra to form a class-spectra mapping, 3) creation of pairings of two different classes to form datasets, 4) principal component analysis to form eigenvectors to separate the spectra in the two given classes in a dataset, 5) application of the eigenvectors on the spectral images, and visual inspection by dental experts to choose the best performing eigenvectors, 6) collection and storage of the best performing eigenvectors as a computational filter dataset, 7) creation of images showing optimal separation between the two classes using the computational filters, 8) rescaling of the intensity range to create contrast-enhanced images.
thousand contrast-enhanced inner product images of varying improvement levels. Visual evaluation was used to discard poorly performing computational filters. Finally, the reduced set was evaluated visually by dental experts, whose observations were used to select the most interesting filters. The dental experts noted unexpected contrast enhancements, like Fordyce's granules, that were not in the training classes. This is understandable, however, as PCA is not a classification algorithm and the eigenvectors affect all features present in the spectral image.

E. POSTPROCESSING
While the computational filters created with principal component analysis can greatly enhance discernibility of lowcontrast features, oftentimes the projection squeezes the image histogram. Images with such histograms exhibit low overall contrast. We rectified the low overall contrast by applying contrast stretching [26] that widens the narrow histogram, see Fig. 2. In the Fig. 2c, inner product image of leukoplakia computed with partially negative filter shows value range from −0.36 to 1.06. However, the histogram shows the majority of the pixel intensities lie in range from −0.06 to 0.08, which as such is a more suitable source range for scaling the data than the former. Likewise, a positive filter has produced a histogram, Fig. 2d, showing overall range from 0 to 0.66, with majority of the intensities in range from 0 to 0.10. After selecting the appropriate value range, the pixel intensities are feature scaled into 8-bit unsigned integer format for grayscale presentation, that is, into value range from 0 to 255. This method of contrast enhancement is chosen to avoid effects from more advanced methods in order to evaluate the performance of the computational filters

Algorithm 1
Generation and Collection of Contrast-Enhancing Partially Negative Filters Input: Sets of training reflection spectra X 1 and X 2 from Classes 1 and 2, and n test spectral images R k (x, y, λ i ), 0 ≤ k ≤ n exhibiting Classes 1 and 2. Output: Set U of contrast-enhancing partially negative computational filters. 1: Form training matrix X ← stack(X 1 , X 2 ) 2: Compute eigenvectors U ← pca(X ) 3: for k = 0 to n do 4: Project test spectral image for all l band images I (x, y) in P k (x, y, λ i ) do 6: Perform postprocessing step I (x, y) ← rescale(I (x, y)) 7: Evaluate visibility of the Classes 1 and 2 8: if Features separable then 9: Store candidate band number L ← (L, l) 10: end if 11: end for 12: end for 13: return Contrast-enhancing computational filters U {u l , l ∈ L} rather than that of various histogram equalization algorithms. In any case, some scaling is required as the unprocessed inner product images may contain negative intensity values due to the filter spectra being partially negative. Such images are non-physical and cannot be shown on, e.g., a computer display.
In some cases, the filters produced images that one might interpret as negatives. These images look unnatural and were VOLUME 9, 2021 inverted to look natural. For example, an image showing black enamel against white gingiva would change to show white enamel against black gingiva. The inversion can be performed by negating the computational filter or the pixel intensities of the computed inner product image, as can be deduced from (2). Both approaches work equally fine as the eigenvectors produced with PCA denote the directions of the largest variances, and their negation does not affect the meaning of the eigenvector.
The color images used for comparison in Figs. 5, 6, and 7 are computed from the spectral images assuming D65 standard daylight illuminant and CIE 1931 2 • standard observer [27]. Additionally, their brightness has been increased by +50%, but they were not altered otherwise in regard to their histogram or contrast.

F. PERFORMANCE EVALUATION
We evaluated the performance of the computational filters by inspecting the produced inner product images. Subjective visual evaluation was supplemented by computing Michelson contrast between the average intensities I s,µ and I c,µ of a sample area I s and its immediate surrounding area I c of an inner product image I (x, y). The sample areas I s are marked with magenta outlines in the RGB-versions of the lesion images in Figs. 5, 6, and 7, while the surrounding areas I c are marked with cyan outlines. Direct numeric contrast comparison between an RGB color image and a grayscale inner product image is not possible, and therefore the RGB-renders were converted to grayscale images I g (x, y) by weighting the three color channels, red I R (x, y), green I G (x, y), and blue I B (x, y), by as per luminance Y -channel calculation in [28]. Michelson contrast does not account for the overall contrast of the image, which can lead to a situation where the numerical and visual evaluations disagree. In order to reconcile the differences in the qualitative and quantitative results, we included a penalization term p based on the histogram h of the image: where n is index of the bin in a 256-bin histogram, h n is the number of pixels in a bin, and b a small valued (1 × 10 −6 ) bias term to avoid division-by-zero. Note that we exclude the first and the last bin from the penalization factor as these are the black and white areas of the image and in some cases contain a substantial number of the pixels but do not carry information of interest. The idea is to penalize images where the histogram contains many empty bins. If the histogram is narrow, the image does not utilize the wide range of intensities available and likely has a poor overall contrast. The final penalized contrast score c p for an image is The scores are then used to compare the performance and to determine whether an inner product image has an improved overall image contrast.

III. RESULTS AND DISCUSSION
We applied PCA on sets of spectra collected from spectral images based on manually segmented classes (see Fig. 1). Class pairs like Enamel-Calculus, Enamel-Root, Enamel-Attrition/Erosion, and Oral mucosa-Ulcer were used as the basis of the analysis. PCA applied on the spectra produced 204 computational filters, i.e., eigenvectors, per spectral image by default. These sets contained many uninteresting filters: the directions with low variance produced mostly noise when applied on a spectral image and some filters enhanced clinically uninteresting features. We found that some of the filters also enhanced other features than that indicated by the class labels. For example, a computational filter from Oral mucosa-Ulcer spectral set was found to enhance the visibility of caries.
Promising filters were selected for further evaluation and these filters were applied on all spectral images in our database. This produced several thousand potential inner product images, which the dental experts (AK, HJ) evaluated visually and narrowed down to a clinically interesting set. We then used this set of images to select the best performing computational filters. These filters are presented in Fig. 3.
In our earlier work [10], we created optimal light source spectra to enhance the contrast of various lesions on extracted human teeth. The optimization was done using particle swarm optimization (PSO) [29]. These light source spectra can be used as computational filters. We applied each PSObased filter presented in the earlier work on the spectral images shown in this work and chose the best performing filters per spectral image (Fig. 4). This blatantly ignores the original intended target of each filter, but since these filters were designed using extracted human teeth, we have no appropriate filter to use with spectral images of oral mucosal and gingival lesions. The best performing filters were A) crown-root, contributor-constricted, B) dark calculus against dentin, contributor-constricted, C) initial caries against dentin, contributor-constricted, D) initial caries against enamel, and E) white calculus against enamel, contributor-constricted.
The performance of these filters was then compared against the PCA-derived computational filters by comparing penalized Michelson contrasts of annotated lesions against their surroundings. The filters are presented in Fig. 4

A. EVALUATION OF FILTER PERFORMANCE
Each image set presented and selected for visual and numeric performance evaluation in Figs. 5, 6, and 7 contains annotations for a sample and its surrounding area. Michelson contrasts between the mean intensities of the annotated areas as per (3) are listed in Table 1.
Filter #1 (see Fig. 3) is based on the Enamel-Root class-pair. PCA-based filters (i.e., eigenvectors) are ordered according to the amount of variance they explain (first eigenvector explains the largest amount of variance, and the last eigenvector the least). Here, Filter #1 is the second eigenvector of the dataset. The filter has -among others -three small local extrema approximately at wavelengths 540 nm, 560 nm and 580 nm. These extrema correspond the absorption spikes of hemoglobin [30]. This connection implies that the filter would -at least to some degree -react to blood vessels. The filter proved itself an all-rounder being able to enhance the visibility of oral mucosal lesions (Fordyce's granules, leukoplakia, pigmentation), gingivitis, and caries.
Filter #2 is the fourth eigenvector of the Enamel-Calculus -pair dataset. The filter shares one of the hemoglobin absorption spikes with Filter #1 at 580 nm as a global minimum. The filter can be used to enhance the contrast of calculus, gingivitis, and secondary caries.
Filter #3 is from Oral mucosa-Ulcer set, third eigenvector. Perhaps unexpectedly, noting the significant difference in their spectral shapes, it improves the visibility of more advanced root caries in Fig. 7d, like Filter #1.
Generally, numeric and visual evaluation agree that the grayscale versions of the color images generally have poorer contrast compared to the inner product images. The PCA vs. PSO comparison, on the other hand, seems more challenging. The PSO images have systematically better Michelson contrast values than the PCA images (Table 1) while a visual subjective evaluation would disagree. This disagreement is solved by penalizing Michelson contrast scores with (6). As noted earlier, we exclude the first and the last bin from the penalization factor. For example, the PSO image for calculus (Fig. 6f), and PCA images of secondary caries (Figs. 7i and 7h) contain large black areas outside of the area of the interest, while the images of Fordyce's granules (Figs. 5a -5d) and leukoplakia (Figs. 5e -5h) contain specular reflections. These under-and over-saturated areas do not affect the overall visibility of the lesion and the surrounding tissue, while they do have an undue influence on the penalized score. The penalized scores are presented in the Table 2.
The grayscale versions of the color images have very low penalized scores ranging from 6.71 × 10 −11 to 1.44 × 10 −8 . This is caused by many empty histogram bins, which lead to large penalization factors for these images. As the scores are so low, all PCA-and PSO-filters present a drastic improvement in overall image contrast. This can be expected as the histograms of the grayscale images, Fig 8, show majority of the pixels lying in the lower half of the intensity range with values ranging approximately from 25 to 100.

1) FORDYCE'S GRANULES
Filter #1 is expected the react to hemoglobin, which is presumably causing an effect on the image set of Fordyce's granules in Figs. 5a -5d: the PCA inner product image (Fig. 5c) shows dark surroundings for the granules, presumably due to blood vessels, while the granules are weakly visible in the grayscale image (Fig. 5b). The PSO Filter B, however, seems to produce a more visually pleasing image with more uniform background shade of gray. The Fordyce's granules sample thus shows the difficulty in quantifying the results. The granules are better discernible from the background in the PSO-filtered image (Fig. 5d) than in the PCA-filtered image (Fig. 5c). This subjective observation is supported by the Michelson contrast, but the penalized score again favors PCA. The penalization score increases as the intensity value range 200 to 254 in histogram (Fig. 8a) contains low number of pixels in the PSO image.

2) LEUKOPLAKIA
Filter #1's hemoglobin connection is seen prominently in case of leukoplakia: the filter shows blood vessels surrounding the lesion in Fig. 5g, enhancing the contrast between the lesion and the surrounding oral mucosa. In comparison, the grayscale converted image in Fig. 5f has a very low overall contrast. Filter D gives the best result of the available PSO-derived filters. The image produced with Filter D is presented in Fig. 5h. It has an improved contrast compared to the grayscale image, but the filter does not react to hemoglobin and therefore the surrounding area remains light gray leading to lower contrast than with PCA.
Michelson contrasts of leukoplakia and the surrounding area in PCA-and PSO-filtered images show approximately 2.5× improvement over the original grayscale image, and their values are very close. The leukoplakia in Figs. 5g and 5h is well visible in both images. The PCA-filter also shows the blood vessel network on the oral mucosa surrounding the leukoplakia and an unrelated darker spot above the leukoplakia. The darker spot in turn is surrounded by thin white strains that are less visible in the PSO-filtered image. Histogram of the PCA-filtered image is slightly more spread out than the steeper decline in the PSO-filtered image's histogram in Fig. 8b, possibly explaining the difference in the penalized scores.

3) HYPERPIGMENTATION
Like in Fordyce's granules case, Filter #1 enhances the visibility of a pigmented lesion in Fig. 5k over the grayscale image in Fig. 5j, but the filter also reacts to a mechanically stressed area above a specular reflection ring. In this case, the lip is stretched over the white chin support to expose the pigmentation change for the camera. The performance is compared to PSO-based Filter C, which has peaks at 525 nm  and 565 nm and as a result does not add extraneous coloration into the lesion surroundings (Fig. 5l). This directly results in a more visually pleasing clear view of the pigmentation spot.
The spectral image region that the pigmentation sample has been extracted from has had a poor illumination and the sample image is thus dark overall (Figs. 5i-5l). Michelson contrast (Table 1) and its penalized versions (Table 2) also favor the PSO-filtered image over the PCA-filtered one. The penalization factor becomes large for PCA image due to the very low number of pixels at the value range 150 to 254 as shown in the histogram in Fig. 8c.

4) RECESSED GINGIVA
Filter #1 is surprisingly versatile, as it can be used to enhance small structural changes on gingiva in addition to contrast of various types of lesions on oral mucosa. A structural change can be seen when comparing a healthy marginal gingiva in Fig. 6a showing a clear and narrow contour surrounding the teeth, while the contour is wide and difficult to discern on a recessed marginal gingiva in Fig. 6b.

5) CALCULUS
While calculus on enamel is naturally visible, PCA-based filters can greatly enhance the contrast between the two. Filter #2 was found to be suitable for contrast enhancement of calculus, as can be seen in Fig. 6e. The PSO-based Filter E performs well also, but the Fig. 6f is ''softer'' or blurrier than the PCA inner product image in Fig. 6e, where the erosion, for example, seems sharper on top of the incisors. PSO-based Filter E has band-passes at 420 nm, 590 nm and 640 nm. Sparsity and low number of selected bands lead to notable blurring effect from the spectral imaging system (see Sec. III-B).
In the non-penalized calculus case, the PCA-filtering triples and PSO-filtering sextuples the original grayscale image score. Notably, the PSO-filtered image improves the visibility of calculus on the left-most and left-center tooth in Fig. 6f. Marginal gingiva, however, blends with the enamel and calculus in places. Despite the notable numeric Michelson contrast improvement (Table 1), visual evaluation gives preference to the PCA-filtered inner product image. The PCA filter has colored the marginal gingiva around the front teeth dark in Fig. 6e. This is due to gingivitis. Incidentally, it also makes the gingiva clearly separated from the enamel and calculus. Penalization lowers the scores for both PCA-and PSO-filtering. The effect is stronger on PSO-filtered image, likely due to the intensity distribution histogram shown in Fig. 8d. The histogram shows PSO image's intensity distribution having a downward trend as the intensity increases. The PCA image, on the other hand, clearly has a darker and a lighter area in the image. These two curves likely match the dark gingiva and light enamel and calculus.

6) GINGITIVIS
Gingivitis is present in two image series: the calculus case in Figs. 6c -6f and dedicated gingivitis case in Figs. 6g -6j. As Filter #1 contains clear connection to hemoglobin, it is expected to cause the gingivitis present on the incisor's gingiva in Fig. 6e to appear darkened. The PSO-filters D and E do not react to it at all. As gingivitis causes typical inflammatory changes, such as increased blood circulation and swelling, filters reacting to hemoglobin should also enhance the visibility of gingivitis. Filter #2 shares only one extrema with the hemoglobin absorption spikes. Effect is therefore seen more subdued in the gingivitis images from a different test subject in Figs. 6g-6j. The contrast optimization process chose a different PSO-filter for enhancing gingivitis, but the selected Filter D does not cause visible gingivitis-related improvements either. Gingivitis is difficult to notice in the color and grayscale version in Figs. 6g and 6h also. Numerically, gingivitis case is the one of the few cases, where Michelson contrast supports the PCA inner product image producing a better image ( Table 1). The penalization merely halves (approximately) the scores, and the main difference in the histogram (Fig. 8e) between PCA and PSO inner product images is the location of the maximum.

7) ROOT CARIES
The root caries sample (Fig. 7a) involves exposed and stained root, in which the smaller dark spots exhibit caries.
The Michelson contrasts for the grayscale (Fig. 7b) and PCA-image are close in case of Filter #1 (Fig. 7c). The filter colors a larger area dark surrounding the annotated caries spots. It has, however, largely ignored the annotated area on the molar and the whole deteriorated area is nearly indistinguishable from its surrounding enamel. This inevitably affects the Michelson contrast as the intensity difference within the sample area lowers the sample mean (the sample area in molar is larger than the combined sample area on the two premolars). The histogram of the PCA-image in Fig. 8f spreads over the value range while having a larger concentration at value range 75 to 240. Filter #3 darkens the spots with a closer match to the annotations on the premolars, while the shade of the molar is more distinguishable than in the previous case (Fig. 7d). This provides a small increase in the Michelson contrast in comparison to Filter #1. The histogram, Fig. 8g, for the PCA-filtered image is a triangle centered approximately at 100. This halves the Michelson contrast in the penalized score. The PSO-filtered image, Fig. 7e is relatively dark overall. Both the caries spots on the premolars and the deteriorated area on the molar are very dark in contrast to the enamel. This results in a very strong Michelson contrast. As can be expected, the histogram in Figs. 8f and 8g for the PSO image shows very low number of pixels in the intensity range 180 to 254. Consequently, the penalization factor grows large, and drops the penalized score down to fifth of the Michelson contrast.
We attempted to improve the visibility of non-cavitated caries, Fig. 7, but test data was limited to fairly clear cases of caries only. Nonetheless, a distinction can be made between non-cavitated caries and caries-free surfaces. In the root caries case (Fig. 7d), the caries lesion has clear contrast against the enamel and root cement and has a clearly defined area.

8) SECONDARY CARIES
The presented PCA-filters enhanced the visibility of caries. Filters #1 and #2, and Filter A for comparison, enhanced the visibility of secondary caries on a seam between enamel and a dental restoration. The seam is clearly separated from the enamel and the restoration in Figs. 7h, 7i, and 7j. The filtered images all perform well. Filters #1 and A seem to give the dental restoration piece a smoother surface, while with Filter #2 its surface has more noisy and bright white coloring camouflaging the restoration as enamel. The dark seam is longer and narrower on Fig. 7i than on the comparison images, though.
Numerically, PCA-filtered images present higher Michelson contrast. As the lesion is very dark, the differences in the contrast are likely caused by the brightness of the plastic filling (the non-lesion comparison area in Fig. 7f). Including the penalization factor further increases the difference between the two filter classes. The pixel intensities on the PSO-image lie on the lower half of the scale in Fig. 8h and 8i (they are the same distributions). Filter #2 has poorer performance than Filter #1 of the two as the former forms an intensity concentration around intensity value 100 in Fig. 8h, while the latter does the same approximately at value 75 within a smaller area giving a wider intensity spread over the scale in Fig. 8i.

B. TECHNICAL CONSIDERATIONS
The proposed approach requires a spectral imaging system. Depending on the chosen spectral camera, the image acquisition may be rather slow compared to color digital photography. Ideally, the found computational spectra could be implemented optically as an optical filter system attached to a camera or as a light source allowing quick imaging. It is important to note, however, that computational approach can implement arbitrary filters, whereas optical implementations are limited to smooth spectral shapes without high-frequency components [13], [31].
In performance evaluation, the images produced with PSO-filters seem slightly blurry. As these filters select only few narrow bands, any chromatic aberrations in the spectral imaging system become evident. In an ideal spectral imaging system, the image focus remains the same over the wavelength band range. The focus drifts slightly on the longer wavelengths in our dataset. This drift is typical for the Nuance EX spectral camera, which performs wavelength-scanning by using a liquid crystal tunable filter in front of a monochrome camera. Additionally, it should be noted that the pigmentation image set (Figs. 5i-5l) has blurry out-of-focus parts. The spectral image was acquired with a Specim IQ -based imaging system. Specim IQ spectral camera has a fixed objective lens with a fixed F-number leading to a short depth-of-field in close-ups, which in turn results in difficulties in managing out-of-focus areas when imaging the oral cavity. This is easier to handle in Nuance EX -based imaging systems as the camera itself does not have a fixed objective lens.
Physical interpretation of the filter spectra presented in Fig. 3 is challenging: the filters are partially negative. Such filters are not directly implementable as optical filters due to the negative parts in their spectra. For example, Filter #2 applies positive weights on spectral band images near 410 nm and 700 nm, and negative weights on band images near 590 nm and 970 nm. These negative parts make further interpretation of the filter spectrum and its effects challenging.
As PCA is a variance-based statistical method comparable to clustering techniques, selecting class pairs like enamelcalculus does not guarantee their separation. Any variations inside a class are also clustered and may present themselves as their own filter (e.g., white vs. yellowed enamel). When a filter separates two features-of-interest, its application to a full spectral image obviously alters the view of other parts of the image also. This can be seen in Fig. 7, where all of the presented filters, #1-#3, can separate caries from the enamel and restoration, but the coloration of the gingiva is noticeably different in Figs. 7d and 7i.
Spectral imaging provided detailed visualization of oral mucosal lesions. There are clear differences between the color and inner product images presenting oral mucosal features (Fig. 5). Spectral imaging of the oral mucosa is able to capture information below the epithelium, which is evident from the Fordyce's granules being captured, and of the change in thickness of the epithelium following the mechanical irritation by an orthodontic device, and finally pigmentation changes in the pigmentous lesion. This can be expected as normal, non-keratinized, epithelium is not particularly thick (294 ± 68 µm around the shown areas according to [32]). The wavelengths used have penetrated it and reflected a signal back. Contrary-wise, the visible and near-infrared illuminations used in the work (400 nm to 1000 nm) did not penetrate the gingiva. Acquiring information on structures below the gingival line and the teeth is necessary for detecting subgingival calculus, which at the moment must still be detected by probing.
It should be noted -and can be seen in the image seriesthat caries becomes noticeable in its advanced stages, which in turn makes initial caries difficult to annotate and segment in the spectral images used for data analysis. This could perhaps be remedied by close-up imaging of initial caries site after the site has been identified using an alternative method. For example, the carious teeth are known to have lower fluorescence intensity than sound teeth due to changes in fluorophore content, or in absorption and scattering properties in the carious layer. Utilizing laser-or light-induced fluorescence techniques, the carious site could be identified [33], [34] and spectral image analysis performed with more confident and detailed segmentation to produce computational or optical filters that do not rely on fluorescence and UV-exposure.

IV. CONCLUSION
In this paper, we demonstrate contrast-enhancement of dental and oral lesions by taking advantage of partially negative computational filters derived from principal component analysis of spectral images. The results are promising, and this study provides a starting point for further research. Diagnostics system based on spectral imaging would have several advantages over traditional approaches, including non-invasiveness, objectivity, speed and costeffectiveness. Spectral imaging could be used for planning treatment for targeted use of preventive care and of oral health. It could be used for reflection on the disease progression rates.
JONI HYTTINEN received the M.S. degree in physics from the University of Eastern Finland, Joensuu, Finland, in 2016, where he is currently pursuing the Ph.D. degree in computer science. He is also working as an Early Stage Researcher with the School of Computing, University of Eastern Finland. His research interests include the development of computational and optical imaging solutions and machine and deep learning systems, all based on spectral imaging. VOLUME 9, 2021 PAULI FÄLT received the M.S. degree in physics from the University of Joensuu, Finland, in 2006, and the Ph.D. degree in physics from the University of Eastern Finland, Finland, in 2012. He is currently working as a Senior Researcher with the School of Computing, University of Eastern Finland. His interests include the research and development of spectral imaging and spectral image analysis methods for medical imaging applications.
HELI JÄSBERG graduated as D.D.S. in 2013, and received the Ph.D. degree from the University of Turku, in 2017. She currently works as a Specializing Dentist at the University Hospital of Kuopio in the field of oral and maxillofacial surgery. As a Young Researcher, she has also worked at the University of Eastern Finland with special interest on oral microbiology, oral medicine, and infections.
ARJA KULLAA received the Ph.D. degree in dentistry from the University of Kuopio, Finland, in 1986. She is currently a Professor in oral medicine with the University of Eastern Finland. Her research focuses on the diagnostics of oral diseases. She has authored two scientific books and more than 100 journal articles and conference proceedings.
MARKKU HAUTA-KASARI received the M.S. degree in computer science from the University of Kuopio, Finland, in 1994, and the Ph.D. degree in information processing from the Lappeenranta-Lahti University of Technology, Finland, in 1999. He is currently a Professor in computer science with the University of Eastern Finland. He is also the Head of the Computational Spectral Imaging Research Group. His research interests include spectral color research, pattern recognition, and computer vision.