# Oral and Dental Spectral Image Database--ODSI-DB
## 2 Materials and Methods
The reflectance spectral images \(R(x,y,\lambda)\) were normalized with flat-field correction from a sample measurement \(s_{i}(x,y,\lambda)\) as  
\[R(x,y,\lambda)=\frac{s_{i}(x,y,\lambda)-s_{d}(x,y,\lambda)}{s_{r}(\lambda)-s_{ d}(x,y,\lambda)}\times\frac{t_{r}}{t_{i}}\times R_{r}(\lambda) \tag{1}\]  
Figure 3: Representational example image set consisting of the base set of spectral images acquired of every test subject. Images (**c,d**) demonstrate the use of a dental mirror in imaging. where \(s_{r}(\lambda)\) is the measurement from a reference sample, \(s_{d}(x,y,\lambda)\) is the measured dark-current, \(t_{i}\) and \(t_{r}\) are the integration times of the sample and reference, respectively, and finally \(R_{r}(\lambda)\) is the known spectral reflectance of the reference sample. The reference measurement \(s_{r}(\lambda)\) was averaged from a small, well-lit rectangular area of full tile \(s_{r}(x,y,\lambda)\). This was done because the relatively small reference tile could not cover the whole imaging area, nor did the physical shapes of the reference (flat tile) and the sample (oral cavity, teeth) match. Since the physical shapes of the imaged samples and the flat reference tile are different, the reflectance values in the spectral reflectance image \(R(x,y,\lambda)\) cannot be expressed in the range 0-100%. Instead, the relative values in the spectral image are scaled to the range 0-1. It is important to notice that the flat-field correction does not affect the shape of the spectra. Camera-specific image post-processing was needed. The Nuance EX camera contained some dust particles in its internal optics, producing dark artifacts in the images (Figure 3(a)). Artifact removal was done by imaging a white reference plate (30 \(\times\) 30 cm, diffuse reflectance target, Edmund Optics Inc., Barrington, NJ, USA) covering the whole image area and creating an artifact mask (Figure 3(b)). The mask was used to mark areas for digital inpainting with OpenCV's inpaint-function (Navier-Stokes-based inpainting) [18], see Figure 3(c). The Nuance EX spectral camera operates in the band-sequential mode [6] capturing the spectral image one spectral band at a time. Integration time for an individual band image can be as long as 5 s, meaning that technically the longest possible acquisition time per spectral image is 4 min 15 s. The camera system determines the optimal integration times automatically. In practice, the full acquisition took 1-2 min only. The involuntary movements of the test subject cause the individual spectral band images to be misaligned with respect to each other. We utilized generalized dual bootstrap iterative closest point (GDB-ICP) image registration [19] to align the band images. The GDB-ICP-tool provided by [PERSON] et al. performs image registration on a pair of images only. To handle the 51 bands in Nuance EX spectral images, we chose the middle band image (700 nm) as the reference and performed the image registration of the other band images against this reference band. As the algorithm can choose the comparison points automatically, occasionally the image registration did not perform adequately. In these cases, a mask image was used to guide the process to concentrate on aligning the teeth. The need for these post-processing steps were a major motivation factor for switching the spectral camera to Specim IQ. Specim IQ is a line scanning system [6; 20]. The integration time is therefore per line and it is impossible to adjust per band integration times. On average, the line integration times were \(5.4\pm 3.4\) ms, meaning the spectral image acquisition time is only seconds. The camera, however,  
Figure 4: **(a–c)** Nuance EX dark artifact cleaning by digital inpainting and (**d–e)** the effect of involuntary movements before image registration. uses relatively long time--1 min--preparing and finishing the image acquisition. As the whole spectrum is acquired at once, involuntary movements do not affect individual bands of the spectrum.